Re: XAppleWMFrameDraw(), CoreGraphics, TWM
Re: XAppleWMFrameDraw(), CoreGraphics, TWM
- Subject: Re: XAppleWMFrameDraw(), CoreGraphics, TWM
- From: Eeri Kask <email@hidden>
- Date: Sun, 21 Aug 2011 22:52:52 +0200
On 08/15/2011 02:35 AM, Jeremy Huddleston wrote:
>>> Yeah, that's what it looks like... these events usually correspond to events from outside X11 itself (usually from OS X) and correspond to the "front" window or the application as a whole.
>>
>> OK, but then e.g. to 'close' the currently focused window is a risky
>> activity, if it is *not* clear that the event comes from the user's
>> keypress CMD+W while in that particular window; but may have some
>> other, probably unknown sources.
>
> That *IS* the source of the event.
>
>> Does only pressing CMD+W trigger a 'close' under MacOSX, so the
>> 'close' event can be considered equivalent to that keypress event?
>
> For your purposes in understanding how to handle that, yes. But it's also possible that some assistive device may soon exist which measures brainwaves (see the TED talk if you haven't, it's pretty cool) to allow users to "think" about closing a window, and that would have the same effect. Don't get tied to "cmd-w" ... this is just the server telling you that "somehow" you've been told to close the active window.
>
>>>> In respect to AppleWM it seems though in some cases, e.g. for
>>>> matters like 'AppleWMHideAll' and 'AppleWMShowAll' it would probably
>>>> make sense to fill this field with the value of the root-window-ID,
>>>> or something?
>>>
>>> Maybe it would've, but there are a ton (all) of servers out there that don't do this now, so that's not a great solution if you want to work on existing systems, and the fix is easy to do in your wm.
Having thought about it a little it seems the most useful use of
these controllernotify events by a X11-WM is not to use them, at
least as long as this 'window' field issue is not fixed in the
AppleWM-extension.
In particular, the above event comes from (or through) the
X11-server (it doesn't matter if it originates from OSX or not),
contains a 'window' field, asks some window e.g. to be 'closed', and
then the 'None' window is specified. Once again: what should a WM
do? Lets recapitulate, while running as part of the X11-server the
AppleWM extension has direct access to the "ground truth" about
which client is assigned keyboard input (either because 'focused' or
contains the pointer if running in PointerRoot) at *any* moment of
time --- but does not use that first hand access to specify a target
window, and instead expects the WM to guess which client to 'close'
... especially in a situation of unknown timings/concurrencies of
unrelated input devices operation (e.g. mouse, keyboard), event
delivery by the X11-server, and event arrival at the WM. The
problem is, one generally cannot/shouldn't rely upon the mouse still
being in that window which initiated the 'close' procedure... and
the time this event is finally processed by the WM). Is this design
really intentional? :-)
Then, to return to twm, if the above events are in practice meant to
respond to user-initiated functions on X11-clients, then most of
this stuff is 'repeated functionality' anyways as it is easy to
instruct twm e.g. to close a window by cmd-w by the means of .twmrc
(if the user so wishes).
Finally, a different story seems to be 'Hide' and 'Show' as they
seem to be part of something like ... user interface guidelines of
the 'Aqua-Desktop-Enviroment'. In this case it makes sense the
X11-server (or AppleWM-extension) to ensure all windows are taken
off screen and put back, not? Because it seems logical that it
makes sense to respect these guidelines even if there is no WM
running at all, doesn't it?
Greetings,
Eeri Kask
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden
References: | |
| >XAppleWMFrameDraw(), CoreGraphics, TWM (From: Eeri Kask <email@hidden>) |
| >Re: XAppleWMFrameDraw(), CoreGraphics, TWM (From: Jeremy Huddleston <email@hidden>) |
| >Re: XAppleWMFrameDraw(), CoreGraphics, TWM (From: Eeri Kask <email@hidden>) |
| >Re: XAppleWMFrameDraw(), CoreGraphics, TWM (From: Jeremy Huddleston <email@hidden>) |
| >Re: XAppleWMFrameDraw(), CoreGraphics, TWM (From: Eeri Kask <email@hidden>) |
| >Re: XAppleWMFrameDraw(), CoreGraphics, TWM (From: Jeremy Huddleston <email@hidden>) |