[Xfce4-commits] r27079 - xfwm4/trunk/src
Olivier Fourdan
olivier at xfce.org
Tue Jun 17 23:39:47 CEST 2008
Author: olivier
Date: 2008-06-17 21:39:47 +0000 (Tue, 17 Jun 2008)
New Revision: 27079
Modified:
xfwm4/trunk/src/events.c
Log:
Small code reorg
Modified: xfwm4/trunk/src/events.c
===================================================================
--- xfwm4/trunk/src/events.c 2008-06-16 21:46:35 UTC (rev 27078)
+++ xfwm4/trunk/src/events.c 2008-06-17 21:39:47 UTC (rev 27079)
@@ -1432,9 +1432,28 @@
if (c)
{
screen_info = c->screen_info;
- if (!(screen_info->params->click_to_focus) && clientAcceptFocus (c))
+
+ TRACE ("EnterNotify window is \"%s\"", c->name);
+ if (c == clientGetFocus ())
{
- TRACE ("EnterNotify window is \"%s\"", c->name);
+ for (b = 0; b < BUTTON_COUNT; b++)
+ {
+ if (MYWINDOW_XWINDOW(c->buttons[b]) == ev->window)
+ {
+ if (!xfwmPixmapNone(clientGetButtonPixmap(c, b, PRELIGHT)))
+ {
+ c->button_status[b] = BUTTON_STATE_PRELIGHT;
+ need_redraw = TRUE;
+ }
+ }
+ }
+ if (need_redraw)
+ {
+ frameQueueDraw (c, FALSE);
+ }
+ }
+ else if (!(screen_info->params->click_to_focus) && clientAcceptFocus (c))
+ {
if (!(c->type & (WINDOW_DOCK | WINDOW_DESKTOP)))
{
if(screen_info->params->focus_delay)
@@ -1452,24 +1471,7 @@
clientClearDelayedFocus ();
}
}
- if (c == clientGetFocus ())
- {
- for (b = 0; b < BUTTON_COUNT; b++)
- {
- if (MYWINDOW_XWINDOW(c->buttons[b]) == ev->window)
- {
- if (!xfwmPixmapNone(clientGetButtonPixmap(c, b, PRELIGHT)))
- {
- c->button_status[b] = BUTTON_STATE_PRELIGHT;
- need_redraw = TRUE;
- }
- }
- }
- if (need_redraw)
- {
- frameQueueDraw (c, FALSE);
- }
- }
+
/* No need to process the event any further */
return EVENT_FILTER_REMOVE;
}
More information about the Xfce4-commits
mailing list