From:	CRDGW2::CRDGW2::MRGATE::"SMTP::PREP.AI.MIT.EDU::GNU-EMACS-SOURCES-REQUEST"  3-APR-1991 22:45:47.49
To:	ARISIA::EVERHART
CC:	
Subj:	Patch to patch to hilight selection under X11 for 18.57

From:	gnu-emacs-sources-request@prep.ai.mit.edu@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.93)
	 id AA05214; Wed, 3 Apr 91 20:04:17 EST
Received: by life.ai.mit.edu (4.1/AI-4.10) id AA16359; Tue, 2 Apr 91 17:41:28 EST
Return-Path: <gnu-emacs-sources-request@prep.ai.mit.edu>
Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.1/AI-4.10) id AA16274; Tue, 2 Apr 91 17:39:28 EST
Received: by tut.cis.ohio-state.edu (5.61-kk/5.910301)
	id AA18653; Tue, 2 Apr 91 17:34:31 -0500
Received: from USENET by tut.cis.ohio-state.edu with netnews
	for gnu-emacs-sources@prep.ai.mit.edu (gnu-emacs-sources@prep.ai.mit.edu)
	(contact usenet@tut.cis.ohio-state.edu if you have questions)
Date: 2 Apr 91 21:01:26 GMT
From: ringworld!laprade@trantor.harris-atd.com  (Ken Laprade)
Organization: Advanced Technology Dept., Harris Corp., Melbourne, Fl
Subject: Patch to patch to hilight selection under X11 for 18.57
Message-Id: <laprade.670626086@ringworld>
Sender: gnu-emacs-sources-request@prep.ai.mit.edu
To: gnu-emacs-sources@prep.ai.mit.edu


A month or so ago Matthieu Herrb <matthieu@laas.fr> posted an updated
version (for emacs 18.57) of Andy Norman's <ange@hplb.hpl.hp.com> patch to
do highlighting of mouse drags under X11.  Here is an additional patch that
fixes do-highlight so that it works in the minibuffer.
--------------------
*** src/x11fns.c~	Tue Feb 26 15:58:37 1991
--- src/x11fns.c	Mon Apr  1 17:25:11 1991
***************
*** 940,945 ****
--- 940,952 ----
    width = XWINDOW (window)->width;
    height = XWINDOW (window)->height;
  
+   if (window == minibuf_window)
+     {
+       left += minibuf_prompt_width;
+     }
+   else
+     height --;
+   
    col = XINT(Col);
    row = XINT(Row);
    last_highlight_pos = fake_mark =  Cdt(row,col);
***************
*** 955,961 ****
  
      if (row < 0) row = 0;
      if (col < 0) col = 0;
!     if (row > height-2) row = height-2;
      if (col > width-1) col = width-1;
  
      if (!moved && Cdt(row,col) != last_highlight_pos){
--- 962,968 ----
  
      if (row < 0) row = 0;
      if (col < 0) col = 0;
!     if (row > height-1) row = height-1;
      if (col > width-1) col = width-1;
  
      if (!moved && Cdt(row,col) != last_highlight_pos){

--------------------
Has anybody figured out how to fix (or use) do-highlight so that the
up-event is not delayed?  The symptom I see occurs when a mouse button has
functions bound to both the down and up presses and the down press function
calls do-highlight.  The up function does not seem to be called when the
button is released.  Rather it is executed when the next X event is
processed, like when a button or key is pressed - even just a shift key.

---
Ken Laprade			INTERNET: laprade@trantor.harris-atd.com
Harris Corporation 		Usenet:  ...!uunet!x102a!trantor!laprade
PO Box 37, MS 3A/1912		Voice: (407)727-4433
Melbourne, FL 32902		FAX: (407)729-3363
