🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #25011

Re: Uwm extensions, perhaps?

#25011
From: glennw
Date: Thu, 26 Feb 1987 16:25
80 lines
3323 bytes
   I have done the same bug fix to UWM to prevent it from stealing button
combinations from applications just to get that button over the root
window.  The change is simple, mainly in uwm.c, but in Menu, Move,
MoveOpaque, NewIconify, and Resize all calls to XGrabButton and Grab must
be replaced by XGrabMouse and XUngrabMouse.

   On window manager architectures, I believe that

   1. X default user interface policies need to be better thought out and
agreed on.

   2. Willy-nilly expansion of chording, multiple clicks, and other
complex ways to give selection input will make X user interfaces
impenetrable.  Therefore making 1. happen is imperative.

   2. A separate window manager process is necessary to use the V11
facilities to pull inconsistent application mouse usages into consistency
(via sending events) and the give users control of their user interfaces.
But the overhead of this redirection means it needs to be used sparingly,
therefore 1. is still necessary.

   3. An "external model" UI that owns the V11 widgets for integrated
applications is the way to go.  How this piece plays with the window
manager is an interesting architectural question.

-----------
692a693
> 	char NeedRootInput=1;
695c696,713
<         Grab(bptr->mask);
---
> 	    if ((bptr->context & (WINDOW | ICON | ROOT)) == ROOT)
> 		/* don't grab buttons if you don't have to - allow application 
> 		access to buttons unless context includes window or icon
> 		The rest of uwm must be careful to only use GrabMouse! */
> 		{
> 			/* instead, select input on the root window */
> 			if(NeedRootInput)
> 			{
> 				XSelectInput(RootWindow, EVENTMASK);
> 				NeedRootInput = 0;
> 			}
> 		}
> 		else
> 		{
> 			/* context includes a window, so must grab */
> 	        Grab(bptr->mask);
> 		}
> 
-----------------------
< old Move, > new Move
2c2
< static char *rcsid_Move_c = "$Header: Move.c,v 1.3 87/01/23 07:56:03 glennw Exp $";
---
> static char *rcsid_Move_c = "$Header: Move.c,v 1.4 87/02/10 13:25:45 glennw Exp $";
72c72
<      * Change the cursor.
---
>      * Change the cursor and grab the mouse even if button already down.
74c74,75
<     status = XGrabButton(RootWindow, ArrowCrossCursor, mask, EVENTMASK);
---
>     status = XGrabMouse(RootWindow, ArrowCrossCursor, EVENTMASK);
> 
76c77
<         Error("Move -> Unable to grab button and change cursor.");
---
>         Error("Move -> Unable to grab mouse and change cursor.");
166c167
<                 Grab(mask);
---
>                 XUngrabMouse(mask);
190c191
<                 Grab(mask);
---
>                 XUngrabMouse(mask);

-- 
Glenn Widener
Technical Details
Message-ID: <1788@hercules.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!uwvax!husc6!panda!genrad!decvax!tektronix!teklds!hercules!glennw
References: <8702211303.AA01735@gjetost.wisc.edu> <3940003@hpcvlo.HP.COM>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!uwvax!husc6!panda!genrad!decvax!tektronix!teklds!hercules!glennw
From: glennw@hercules.UUCP
Newsgroups: comp.windows.x
Subject: Re: Uwm extensions, perhaps?
Message-ID: <1788@hercules.TEK.COM>
Date: Thu, 26-Feb-87 11:25:32 EST
Article-I.D.: hercules.1788
Posted: Thu Feb 26 11:25:32 1987
Date-Received: Sun, 1-Mar-87 08:35:45 EST
References: <8702211303.AA01735@gjetost.wisc.edu> <3940003@hpcvlo.HP.COM>
Organization: Tektronix Inc., Beaverton, Or.
Lines: 80
Summary: uwm extension for root-context bindings