[Xfce4-commits] r29657 - in xfwm4/trunk: . src
Olivier Fourdan
olivier at xfce.org
Fri Mar 13 11:28:33 CET 2009
Author: olivier
Date: 2009-03-13 10:28:32 +0000 (Fri, 13 Mar 2009)
New Revision: 29657
Modified:
xfwm4/trunk/ChangeLog
xfwm4/trunk/NEWS
xfwm4/trunk/src/focus.c
xfwm4/trunk/src/netwm.c
Log:
* src/focus.c, serc/netwm.c: Check for nil timestamp regardless of
focus stealing prevention setting, so that applications using
gtk_window_set_focus_on_map() don't get focused even when focus
stealing prevention is disabled (Bug #5044)
Modified: xfwm4/trunk/ChangeLog
===================================================================
--- xfwm4/trunk/ChangeLog 2009-03-13 10:07:48 UTC (rev 29656)
+++ xfwm4/trunk/ChangeLog 2009-03-13 10:28:32 UTC (rev 29657)
@@ -1,5 +1,12 @@
2009-03-13 olivier
+ * src/focus.c, serc/netwm.c: Check for nil timestamp regardless of
+ focus stealing prevention setting, so that applications using
+ gtk_window_set_focus_on_map() don't get focused even when focus
+ stealing prevention is disabled (Bug #5044)
+
+2009-03-13 olivier
+
* src/compositor.c: Reduce repaint timeout in the compositor
(Bug #5080)
Modified: xfwm4/trunk/NEWS
===================================================================
--- xfwm4/trunk/NEWS 2009-03-13 10:07:48 UTC (rev 29656)
+++ xfwm4/trunk/NEWS 2009-03-13 10:28:32 UTC (rev 29657)
@@ -2,6 +2,8 @@
=====
- Reduce repaint timeout in the compositor (Bug #5080)
+- Fix applications getting focused when focus on map is unset even
+ without focus stealing prevention enabled (Bug #5044)
4.6.0
=====
Modified: xfwm4/trunk/src/focus.c
===================================================================
--- xfwm4/trunk/src/focus.c 2009-03-13 10:07:48 UTC (rev 29656)
+++ xfwm4/trunk/src/focus.c 2009-03-13 10:28:32 UTC (rev 29657)
@@ -162,6 +162,12 @@
{
give_focus = FALSE;
}
+ else if (FLAG_TEST (c->flags, CLIENT_FLAG_HAS_STARTUP_TIME | CLIENT_FLAG_HAS_USER_TIME) && (c->user_time == (guint32) 0))
+ {
+ TRACE ("Given startup time is nil, not focusing \"%s\"", c->name);
+ give_focus = FALSE;
+ prevented = TRUE;
+ }
else if ((client_focus) && (prevent_focus_stealing))
{
if (client_focus->win_layer > c->win_layer)
@@ -177,12 +183,6 @@
give_focus = TRUE;
prevented = FALSE;
}
- else if (FLAG_TEST (c->flags, CLIENT_FLAG_HAS_STARTUP_TIME) && (c->user_time == CurrentTime))
- {
- TRACE ("Given startup time is nil, not focusing \"%s\"", c->name);
- give_focus = FALSE;
- prevented = TRUE;
- }
else if (FLAG_TEST (c->flags, CLIENT_FLAG_HAS_STARTUP_TIME | CLIENT_FLAG_HAS_USER_TIME))
{
TRACE ("Current time is %u, time for \"%s\" is %u",
Modified: xfwm4/trunk/src/netwm.c
===================================================================
--- xfwm4/trunk/src/netwm.c 2009-03-13 10:07:48 UTC (rev 29656)
+++ xfwm4/trunk/src/netwm.c 2009-03-13 10:28:32 UTC (rev 29657)
@@ -1465,9 +1465,12 @@
* NET_WM_USER_TIME_WINDOW
*/
- if (getNetWMUserTime (display_info, c->user_time_win, &c->user_time) && (c->user_time != 0))
+ if (getNetWMUserTime (display_info, c->user_time_win, &c->user_time))
{
- myDisplaySetLastUserTime (display_info, c->user_time);
+ if (c->user_time != 0)
+ {
+ myDisplaySetLastUserTime (display_info, c->user_time);
+ }
FLAG_SET (c->flags, CLIENT_FLAG_HAS_USER_TIME);
return TRUE;
More information about the Xfce4-commits
mailing list