Skip to content
Snippets Groups Projects
Commit fd79ee2e authored by Olivier Fourdan's avatar Olivier Fourdan :tools:
Browse files

focus: Ignore zero timestamp from s/n


Applications may set their _NET_WM_USER_TIME to 0 to indicate that the
window should not initially focused when it is mapped, but there is no
indication that startup-notification given timstamp should follow the
same rule.

Ignore zero timestamp from startup-notification, it will help with apps
not being focused when started from the panel or the desktop.

Signed-off-by: default avatarOlivier Fourdan <fourdan@xfce.org>
parent 8ac7aaf0
No related branches found
No related tags found
No related merge requests found
......@@ -159,8 +159,13 @@ clientFocusNew(Client * c)
{
give_focus = FALSE;
}
else if (FLAG_TEST (c->flags, CLIENT_FLAG_HAS_STARTUP_TIME | CLIENT_FLAG_HAS_USER_TIME) && (c->user_time == (guint32) 0))
else if (FLAG_TEST (c->flags, CLIENT_FLAG_HAS_USER_TIME) && (c->user_time == (guint32) 0))
{
/*
* _NET_WM_USER_TIME definition from http://standards.freedesktop.org/wm-spec
* [...] "The special value of zero on a newly mapped window can be used to
* request that the window not be initially focused when it is mapped."
*/
TRACE ("Given startup time is nil, not focusing \"%s\"", c->name);
give_focus = FALSE;
prevented = FALSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment