GNOME Bugzilla – Bug 165131
_NET_WM_USER_TIME and initial windows
Last modified: 2005-01-25 04:16:46 UTC
There's a bug in focus-stealing-prevention dealing with _NET_WM_USER_TIME and initial windows. To reproduce: 1) Launch Evolution 2) Click in some other window 3) Wait for the main Evolution window comes up 4) Wait for the dialog window asking for your password that Evolution immediately opens after opening the main window The main window is correctly placed behind the one that you clicked in (and are thus working on). However, the dialog steals focus from that window against the user's wishes. This is because there is no timestamp for the window manager to compare for this dialog window. (The WM can use the _NET_STARTUP_ID property (or the TIMESTAMP property if dealing with older startup notification launcher) to find the timestamp the main window was launched with, which is why it works) I will attach a patch that fixes this issue by getting the timestamp of the event that caused the application to be launched from the DESKTOP_STARTUP_ID environment variable and using that to initialize display_x11->user_time. It's against the current version of the spec, but it appears that my proposed changes to the spec are going to be accepted. (See http://mail.gnome.org/archives/wm-spec-list/2005-January/msg00001.html)
Created attachment 36485 [details] [review] Initialize display_x11->user_time if the app was launched with startup-notification
2005-01-24 Matthias Clasen <mclasen@redhat.com> * gdk/x11/gdkdisplay-x11.c (_gdk_windowing_set_default_display): Initialize user_time from DESKTOP_STARTUP_ID. (#165131, Elijah Newren)