Author: olivier
Date: 2007-01-11 20:13:45 +0000 (Thu, 11 Jan 2007)
New Revision: 24360

Modified:
   xfwm4/trunk/src/events.c
Log:
Raise/focus when using alt+left-click for resize for consistency with move

Modified: xfwm4/trunk/src/events.c
===================================================================
--- xfwm4/trunk/src/events.c    2007-01-11 19:50:31 UTC (rev 24359)
+++ xfwm4/trunk/src/events.c    2007-01-11 20:13:45 UTC (rev 24360)
@@ -587,10 +587,15 @@
 static void
 edgeButton (Client * c, int part, XButtonEvent * ev)
 {
+    ScreenInfo *screen_info;
+    int state;
+
+    screen_info = c->screen_info;
+    state = ev->state & MODIFIER_MASK;
+
     if (ev->button == Button2)
     {
         XfwmButtonClickType tclick;
-        ScreenInfo *screen_info = c->screen_info;
 
         tclick = typeOfClick (screen_info, c->window, (XEvent *) ev, FALSE);
         if (tclick == XFWM_BUTTON_CLICK)
@@ -602,20 +607,18 @@
             moveRequest (c, (XEvent *) ev);
         }
     }
-    else
+    else if ((ev->button == Button1) || (ev->button == Button3))
     {
-        if (ev->button == Button1)
+        if ((ev->button == Button1) ||
+            ((screen_info->params->easy_click) && (state == 
screen_info->params->easy_click)))
         {
             if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
             {
-                clientSetFocus (c->screen_info, c, ev->time, NO_FOCUS_FLAG);
+                clientSetFocus (screen_info, c, ev->time, NO_FOCUS_FLAG);
             }
             clientRaise (c, None);
         }
-        if ((ev->button == Button1) || (ev->button == Button3))
-        {
-            resizeRequest (c, part, (XEvent *) ev);
-        }
+        resizeRequest (c, part, (XEvent *) ev);
     }
 }
 

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to