_NET_ACTIVE_WINDOW and desktops



On Friday 10 of October 2003 23:22, Havoc Pennington wrote:
> Hi,
[snip]
>
> Re: _NET_ACTIVE_WINDOW, the reason metacity moves to current workspace
> is the case where you have a prefs dialog open on another workspace, and
> choose Preferences again, it would be strange to switch workspaces; so
> instead the prefs dialog moves to the one you're on. This was the idea
> of the gtk_window_present() function which is one of the reasons
> _NET_ACTIVE_WINDOW was added I think.
>
> I believe the GNOME window list applet simply switches to the new
> workspace before sending the _NET_ACTIVE_WINDOW.

 Kicker taskbar uses _NET_ACTIVE_WINDOW when the user clicks on a taskbar 
entry. And it doesn't do anything more. And in fact it works with all the 
other WMs I tried[*]. With Metacity, if I have xterm on desktop 2, and I'm on 
desktop 1, clicking on its taskbar entry moves xterm to desktop 1. Quite odd.

 Changing the desktop before doing _NET_ACTIVE_WINDOW is IMHO not right. First 
of all, I want just to activate the window, that's about it - even the 
message is just "activate the window". And second, I don't think changing the 
desktop first would always work. E.g. if I'm on desktop 1, I have KWrite on 
desktop 2, and it has modal dialog open on desktop 3 ... hmm ... I'm actually 
not sure what would be the result of doing it the Metacity way. Taskbar would 
switch to desktop 2, try to activate the window, would realize it has to 
activate the dialog instead, and switch to desktop3? That's at least 
flickering, if nothing else.

 IMHO it should be rather gtk_window_present() who cares about desktops, 
moving the window to the current desktop if it's not there. It's already not 
a simple operation anyway.

[*] Grmbl, we really need a list of WMs that support the spec.

-- 
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]