]> Dogcows Code - chaz/openbox/blobdiff - plugins/mouse/mouse.c
invisible resizing areas/grips in the top corners of the window
[chaz/openbox] / plugins / mouse / mouse.c
index 6ac7bab0a69e703e1eaf87794f765dbd3aa75c41..913a2e4a2d1887fc9d1c22397bca400974791d6d 100644 (file)
@@ -259,6 +259,7 @@ static void event(ObEvent *e, void *foo)
 {
     static Time ltime;
     static guint button = 0, state = 0, lbutton = 0;
+    static Window lwindow = None;
     static int px, py;
     gboolean click = FALSE;
     gboolean dclick = FALSE;
@@ -311,13 +312,18 @@ static void event(ObEvent *e, void *foo)
                 click = TRUE;
                 /* double clicks happen if there were 2 in a row! */
                 if (lbutton == button &&
+                    lwindow == e->data.x.e->xbutton.window &&
                     e->data.x.e->xbutton.time - dclicktime <= ltime) {
                     dclick = TRUE;
                     lbutton = 0;
-                } else
+                } else {
                     lbutton = button;
-            } else
+                    lwindow = e->data.x.e->xbutton.window;
+                }
+            } else {
                 lbutton = 0;
+                lwindow = None;
+            }
 
             button = 0;
             state = 0;
@@ -378,9 +384,7 @@ static void event(ObEvent *e, void *foo)
                                     e->data.x.client->frame->size.top +
                                     e->data.x.client->frame->size.bottom);
                 fire_motion(MouseAction_Motion, context,
-                            e->data.x.client, state, button,
-                            e->data.x.e->xmotion.x_root, 
-                            e->data.x.e->xmotion.y_root, corner);
+                            e->data.x.client, state, button, px, py, corner);
                 button = 0;
                 state = 0;
             }
This page took 0.023287 seconds and 4 git commands to generate.