]> Dogcows Code - chaz/openbox/commitdiff
dont use the client if there is none
authorDana Jansens <danakj@orodu.net>
Thu, 17 Apr 2003 16:01:42 +0000 (16:01 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 17 Apr 2003 16:01:42 +0000 (16:01 +0000)
plugins/mouse/mouse.c

index fef8b07ac6b78caebcd90f96eeed4ca765a8a68d..bc799313a8390c880f52a9860c28e19d2d5e2357 100644 (file)
@@ -276,20 +276,26 @@ static void event(ObEvent *e, void *foo)
         if (button) {
             if (ABS(e->data.x.e->xmotion.x_root - px) >= threshold ||
                 ABS(e->data.x.e->xmotion.y_root - py) >= threshold) {
-                guint32 corner = 
-                    pick_corner(e->data.x.e->xmotion.x_root,
-                                e->data.x.e->xmotion.y_root,
-                                e->data.x.client->frame->area.x,
-                                e->data.x.client->frame->area.y,
-                                /* use the client size because the frame can be
-                                   differently sized (shaded windows) and we
-                                   want this based on the clients size */
-                                e->data.x.client->area.width +
-                                e->data.x.client->frame->size.left +
-                                e->data.x.client->frame->size.right,
-                                e->data.x.client->area.height +
-                                e->data.x.client->frame->size.top +
-                                e->data.x.client->frame->size.bottom);
+                guint32 corner;
+
+                if (!client)
+                    corner = prop_atoms.net_am_moveresize_size_bottomright;
+                else
+                    corner =
+                        pick_corner(e->data.x.e->xmotion.x_root,
+                                    e->data.x.e->xmotion.y_root,
+                                    e->data.x.client->frame->area.x,
+                                    e->data.x.client->frame->area.y,
+                                    /* use the client size because the frame
+                                       can be differently sized (shaded
+                                       windows) and we want this based on the
+                                       clients size */
+                                    e->data.x.client->area.width +
+                                    e->data.x.client->frame->size.left +
+                                    e->data.x.client->frame->size.right,
+                                    e->data.x.client->area.height +
+                                    e->data.x.client->frame->size.top +
+                                    e->data.x.client->frame->size.bottom);
                 context = frame_context(e->data.x.client,
                                         e->data.x.e->xmotion.window);
                 fire_motion(MouseAction_Motion, context,
This page took 0.02364 seconds and 4 git commands to generate.