Open Bug 449723 Opened 11 years ago Updated 2 months ago
Invalid use of _NET
_ACTIVE _WINDOW when opening pop-up windows from content
If you run the mochitests on Linux in an X server whose active window manager is metacity, you will get 14 repetitions of this pair of warnings: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x4000c2 (MochiTest ) Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed. (I discovered this while experimenting with Xvfb - normally window manager warnings go to /dev/null...) This appears not to just be a cosmetic problem; the EWMH spec <http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html> licenses the window manager to ignore _NET_ACTIVE_WINDOW if it sees fit, and the relevant Metacity code <http://svn.gnome.org/viewvc/metacity/trunk/src/core/window.c?revision=3785&view=markup> suggests that the developers would *like* to ignore it if the timestamp is zero. The catch is I can't figure out where in our codebase these improper messages are coming from. As far as I can tell, Gtk sends _NET_ACTIVE_WINDOW messages in response to gdk_window_focus() and its callers gtk_window_present[_with_time](). However: we never use gtk_window_present_with_time; gtk_window_present never calls gdk_window_focus with second argument 0; and the only direct call of gdk_window_focus that I can find is in widget/src/gtk2/nsWindow.cpp::SetUserTimeAndStartupIDForActivatedWindow, where it is guarded by a conditional that should ensure we never call it with second argument 0.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 392721
I do not believe this is a duplicate of bug 392721. This bug is about _NET_ACTIVE_WINDOW messages generated when the mochitests create pop-up windows. That bug is about _NET_ACTIVE_WINDOW messages generated when another process requests a new browser window. As far as I can tell, those are entirely different code paths.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Summary: metacity complains: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 → Invalid use of _NET_ACTIVE_WINDOW when opening pop-up windows from content
|user_time| for gdk_x11_display_get_user_time is initialized to zero if DESKTOP_STARTUP_ID is not set (or wasn't reset after EM restart). If there has been no user input it may still be zero. Really apps shouldn't be requesting focus without user interaction, though mochitest may wish to do so.
You need to log in before you can comment on or make changes to this bug.