Re: proposal for a smarter behavior for raising windows on mouse click
- From: John Harper <jsh unfactored org>
- To: Lubos Lunak <l lunak suse cz>
- Cc: wm-spec-list gnome org
- Subject: Re: proposal for a smarter behavior for raising windows on mouse click
- Date: Thu, 29 Jan 2004 11:21:18 -0800
On Jan 29, 2004, at 4:59 AM, Lubos Lunak wrote:
I think the main thing was that the code worked by receiving the
raise-window message, then waiting a period of time for a
button-release event, but there were cases when the button-release
event never arrived.
How could this be?
I don't remember, it was a while ago. I think it may have been
Bonobo-related
In case this was just your mistake, I think it could be quite simple:
- apps specify (let's say) _NET_WM_HANDLE_RAISE in their WM_PROTOCOLS
- when the WM intercepts a click inside a window, it first replays
(XAllowEvents) the click (if it passes such clicks to apps), and then
sends
_NET_WM_HANDLE_RAISE to the app, with the ButtonPress timestamp (if
the WM
raises on clicks, that is)
- the app first receives the replayed ButtonPress, and then it gets
_NET_WM_HANDLE_RAISE, it resets some variables related to this
(whether dnd
was started, etc.)
- if DND is started, etc. it sets the matching variable
- when the app gets ButtonRelease, and there was DND or whatever, it
does
nothing, otherwise it raises the window with the timestamp from
_NET_WM_HANDLE_RAISE
that is how the nautilus/sawfish code worked, plus a timer (e.g. if a
drag isn't started within N ms, raise the window). Ideally the raise
should only ever be delayed if there's actually something under the
pointer that could be dragged.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]