Bug #579

avatar

Window manager warning: last_user_time (1300750940) is greater than comparison timestamp (4956744)

Added by Mirco Bauer 5025 days ago. Updated 5015 days ago.

Status:Closed Start:03/21/2011
Priority:Normal Due date:
Assigned to:avatarMirco Bauer % Done:

100%

Category:Frontend GNOME
Target version:0.8.9
Complexity:

Found in Version:

Votes: 0

Description

In .xsession-errors I found this:
Window manager warning: last_focus_time (1300750862) is greater than comparison timestamp (4830419).  This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW.  Trying to work around...
Window manager warning: last_user_time (1300750862) is greater than comparison timestamp (4830419).  This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW.  Trying to work around...
Window manager warning: 0x180013e (#smuxi @ O) appears to be one of the offending windows with a timestamp of 1300750862.  Working around...
Window manager warning: last_focus_time (1300750940) is greater than comparison timestamp (4956744).  This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW.  Trying to work around...
Window manager warning: last_user_time (1300750940) is greater than comparison timestamp (4956744).  This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW.  Trying to work around...
Window manager warning: 0x3a000f0 (Smuxi) appears to be one of the offending windows with a timestamp of 1300750940.  Working around...

Sound like Smuxi is sending wrong (way too high) timestamps

Associated revisions

Revision cc438f622984246191e5aabc6c5633d97f99b629
Added by Mirco Bauer 5015 days ago

[Frontend-GNOME] Fixed last_focus_time window manager warnings (closes: #579)

<rant>
The API interaction of GTK+, X11 and freedesktop's notifications are driving
me nuts. The window manager will only move the focus of a window to another if
the timestamp of the event is new enough. And here begins the road of insanity.

The notification DBus API is not exposing the timestamp of the clicked action
button, neither is it possible to obtain the current timestamp of GTK as it only
exposes the timestamp of the currently processed event via
gtk_get_current_event_time() [0] and guess what, as this is a D-Bus callback
gtk_get_current_event() is NULL and thus gtk_get_current_event_time() returns 0.
Of course the window focus will not change with a 0 timestamp. And no, you
can't just pass a unix timestamp here or something sane because then the
window manager will go crazy like this:

Window manager warning: last_focus_time (1300750862) is greater than comparison timestamp (4830419). This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW. Trying to work around...
Window manager warning: last_user_time (1300750862) is greater than comparison timestamp (4830419). This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW. Trying to work around...

After that it will stop to change the focus of any window for a while.... yay

The only way to "fix" this issue would be to fetch the current timestamp of X11
which is not possible with GTK+ because it only get's exposed by GDK's X11
specific API [1] which is not exposed at all in GTK#.

So we will have to live with this annoyance for now and not pass a
timestamp and use gtk_window_present() [2] instead.

Alternative would be to P/Invoke libgdk-x11-2.0.so directly which I am really
not in the mood for.
</rant>

[0] http://library.gnome.org/devel/gtk/stable/GtkWindow.html#gtk-window-present-with-time
[1] http://library.gnome.org/devel/gdk/stable/gdk-X-Window-System-Interaction.html#gdk-x11-get-server-time
[2] http://library.gnome.org/devel/gtk/stable/GtkWindow.html#gtk-window-present

History

Updated by Mirco Bauer 5015 days ago

avatar
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF