After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 165131 - _NET_WM_USER_TIME and initial windows
_NET_WM_USER_TIME and initial windows
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 149028
 
 
Reported: 2005-01-24 22:05 UTC by Elijah Newren
Modified: 2005-01-25 04:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Initialize display_x11->user_time if the app was launched with startup-notification (1.48 KB, patch)
2005-01-24 22:06 UTC, Elijah Newren
none Details | Review

Description Elijah Newren 2005-01-24 22:05:44 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)
Comment 1 Elijah Newren 2005-01-24 22:06:48 UTC
Created attachment 36485 [details] [review]
Initialize display_x11->user_time if the app was launched with startup-notification
Comment 2 Matthias Clasen 2005-01-25 04:16:46 UTC
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)