Re: XAppleWMFrameDraw(), CoreGraphics, TWM
Re: XAppleWMFrameDraw(), CoreGraphics, TWM
- Subject: Re: XAppleWMFrameDraw(), CoreGraphics, TWM
- From: Jeremy Huddleston <email@hidden>
- Date: Sun, 21 Aug 2011 19:56:41 -0700
On Aug 21, 2011, at 13:52, Eeri Kask wrote:
> 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.
There is no issue here. It's impossible for the server to know what value to provide because the server doesn't know what window that corresponds to. It is the WM's responsibility yo know that.
> 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.
No, you're missing the point. The server is not asking a known window to be closed. It's asking for the "front" window to be closed, and the WM is responsible for knowing this.
> Once again: what should a WM
> do?
close the active window (which it should know about).
> 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
Ok, try changing it from None to darwinKeyboard->deviceGrab.activeGrab.window->drawable.id (I think that is correct). If that works for you, send me a patch, and I'll include it. Unfortunately that still means that your changes will only work on servers that have that change. You'll still need to react intelligently to window == None.
> --- 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? :-)
I didn't write the spec, I just inherited it. It may have been intentional due to the state of X11 at the time (almost 10 years ago), and I don't really feel like digging through the archives that far ;)
> 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).
Right, but there's no way to configure twm to react to events from OSX directly. That is what these mechanisms are for. They let you react to sources that may not even exist yet or global OSX preferences (perhaps they have a fancy keyboard with a "close window" button or map "close window" to button 20 on their megamouse. It's designed to pass along a notification that originates from outside of X11, not to pass along a cmd-w keypress.
> 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?
Yeah, but WMs other than quartz-wm aren't well supported configurations.
_______________________________________________
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>) |
| >Re: XAppleWMFrameDraw(), CoreGraphics, TWM (From: Eeri Kask <email@hidden>) |