Comment 19 for bug 735205

Revision history for this message
Jani Monoses (jani) wrote :

It is this bug in metacity the workaround of which causes our issue.
https://bugzilla.gnome.org/show_bug.cgi?id=166395

This particular code in metacity is even referenced in unity-2d sources at the top of
launcher/UnityApplications/launcherapplication.cpp
"

Window managers tend to respect orders from pagers to the letter by for
   example bypassing focus stealing prevention. Compiz does exactly that in
   src/event.c:handleEvent(…) in the ClientMessage case (line 1702). Metacity
   has a similar policy in src/core/window.c:window_activate(…) (line 2951).
"

There are too small timestamps on NET_ACTIVE_WINDOW messages (of around March 31992 ) which trigger this response from metacity. Commening that piece in metacity out no longer sets the urgency hint.

The metacity debug logs show a lot of warnings - first chromium having such a small timestamp (which I am not sure why it affects windows that we switch to from chromium) then buggy pager sending timestamp 0 (Unity=2D sets the constant CurrentTime in quite a few places, which is 0), and also 0 timestamp send for switch workspace(both places when
wnck_workspace_activate() is called, a timestamp of 0 is used.
 I am not sure which of these causes the issue, it may be a combination.

Example snippet from metacity log:

Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x249a5f9 (jani@parap)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.