We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3056

Summary: X11 implementation of SDL_RaiseWindow possibly uses wrong timestamp when sending _NET_ACTIVE_WINDOW
Product: SDL Reporter: Dmitry 'RCL' Rekman <dmitry.rekman>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: dmitry.rekman, icculus
Version: 2.0.3Keywords: target-2.0.4
Hardware: x86_64   
OS: Linux   

Description Dmitry 'RCL' Rekman 2015-07-10 14:22:57 UTC
This has been noticed with UE4: https://answers.unrealengine.com/questions/255771/strange-window-behavior.html

When raising window, the following message is printed (in Gnome):

Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x3a00046 

This is because X11_XRaiseWindow is using CurrentTime as a timestamp when sending _NET_ACTIVE_WINDOW. According to the spec (http://standards.freedesktop.org/wm-spec/1.3/ar01s03.html):

"The timestamp is Client's last user activity timestamp (see _NET_WM_USER_TIME) at the time of the request"
Comment 1 Dmitry 'RCL' Rekman 2015-07-10 14:28:00 UTC
(was too quick to send the previous comment):  ... according to the spec, this should match _NET_WM_USER_TIME (which SDL never sets either).
Comment 2 Ryan C. Gordon 2016-01-04 21:26:20 UTC
This is now fixed in https://hg.libsdl.org/SDL/rev/5229da175b57, thanks!

--ryan.