focus stealing prevention in xfdesktop

Olivier Fourdan fourdan at xfce.org
Sat Feb 25 08:24:17 CET 2006


Brian J. Tarricone wrote:
>> You neet do to set the user_time prior to show the widget. But that 
>> requires a fix in the WM too (yeah, stupid me who means something and 
>> implements the contrary), so better update to the revision r20034 (which 
>> also includes a sample with xfwm4 plugins)
> 
> Hehe, no worries.  At least we figured it out.  Works like a charm from
> here, at least.

Woops. Actually, I was right with the implementation according to the 
fd.o standard description [1]:

"The special value of zero on a newly mapped window can be used to 
request that the window not be initially focused when it is mapped."

(Which BTW doesn't sound logical to me as the special value of 0 is 
usually current time, which would rather mean to focus the window, I 
would say).

Anyway, I'll have to revert my patch to be in line with that standard. 
I'll try to investigate something like:

gdk_x11_window_set_user_time(GTK_WIDGET (itf->tweaks_dialog)->window,
     gdk_x11_get_server_time (GTK_WIDGET (itf->tweaks_dialog)->window));

Sorry,
Olivier.

[1] http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html




More information about the Xfce4-dev mailing list