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 131785 - CurrentTime (0) in meta_window_focus
CurrentTime (0) in meta_window_focus
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2004-01-17 17:56 UTC by Gregory Merchan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
test program (1.89 KB, text/plain)
2004-01-17 17:57 UTC, Gregory Merchan
Details

Description Gregory Merchan 2004-01-17 17:56:50 UTC
Metacity is still using CurrentTime, or 0, in some instances.
The initial mapping focus is given with time = 0.
Focus assigned by clicking a window list button is also given with time = 0,
though that may be a libwnck error.

I'm seeing this in CVS HEAD from Dec. 21, 2003. The changelog doesn't
indicate any relevant changes since then.

The attached program may be used for testing. It just maps a window and
reports the time from WM_TAKE_FOCUS messages with g_message.
Comment 1 Gregory Merchan 2004-01-17 17:57:58 UTC
Created attachment 23477 [details]
test program
Comment 2 Gregory Merchan 2004-02-20 05:57:05 UTC
You can get the initial mapping timestamp from the PropertyNotify
when WM_STATE is first set. _NET_WM_USER_TIME doesn't work for this
because it may be 0 or not set. The fix is not as simple as I thought
it would be, so I may soon attach a big patch.

The other part of this is a libwnck bug, which I'll report soon if
it hasn't been reported already.
Comment 3 Elijah Newren 2004-10-08 17:55:28 UTC
The patch in bug 152000 should remove several instances where meta_window_focus
was getting a timestamp of CurrentTime being passed.  There are probably some
that remain, though.
Comment 4 Elijah Newren 2004-12-20 19:39:47 UTC
Actually, I think this bug has been resolved.  In particular, for first window
mapping there's a meta_display_get_current_time_roundtrip() call in
meta_window_show() that came from bug 152000.

libwnck now includes timestamps in _NET_ACTIVE_WINDOW messages (came near the
end of bug 118372; see also bug 135024).

So, I'm going to mark as FIXED.

(Also, although no longer relevant, note that the test program doesn't compile:
"undefined reference to `_gdk_x11_display_is_root_window'". 
_gdk_x11_display_is_root_window is a symbol in gdkprivate-x11.h, and that header
file isn't installed for apps to include)