Re: proposal for a smarter behavior for raising windows on mouse click
- From: Lubos Lunak <l lunak suse cz>
- To: wm-spec-list gnome org
- Subject: Re: proposal for a smarter behavior for raising windows on mouse click
- Date: Mon, 2 Feb 2004 20:42:32 +0100
On Thursday 29 of January 2004 13:59, Lubos Lunak wrote:
> On Tuesday 27 of January 2004 23:33, John Harper wrote:
[snip]
>
> 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
>
> Can anybody see a problem with this? I'll see if I get today to writing a
> patch for Qt and KWin to try this for real.
Ok, I have it kind of working, and it seems to work quite fine. There are
still two issues:
- To timeout or not to timeout - if I don't add a timeout to the raising, then
anything that resembles DND (i.e. mouse pressed and moved) prevents raise
until the mouse is released. If I add a timeout, I may get raise
unintentionally if I'm a bit slow.
- Focus - I got actually as far as extending the message to have two flags,
one for raising, the other for taking focus, and I set them both depending on
the click action settings (in practice this should matter only for click to
focus of course). I find it better when the background window not only
doesn't get raised, but it also doesn't get activated.
Comments? Has anybody tried it too? If there are no comments, I'll write and
post here a patch (which will basically say what's above).
--
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: l lunak suse cz , l lunak kde org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]