Invalid use of _NET_ACTIVE_WINDOW when opening pop-up windows from content

RESOLVED INACTIVE

Status

()

Core
Widget: Gtk
P5
minor
RESOLVED INACTIVE
10 years ago
17 hours ago

People

(Reporter: zwol, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: tpi:+)

(Reporter)

Description

10 years ago
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.
Depends on: 392721

Updated

10 years ago
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 392721
(Reporter)

Comment 2

10 years ago
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 → ---
(Reporter)

Updated

10 years ago
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
(Reporter)

Updated

10 years ago
Blocks: 460616
(Reporter)

Updated

10 years ago
No longer depends on: 392721
|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.

Updated

a year ago
Priority: -- → P5
Whiteboard: tpi:+

Comment 4

17 hours ago
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: REOPENED → RESOLVED
Last Resolved: 10 years ago17 hours ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.