X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=plugins%2Fmouse%2Fmouse.c;h=caf4e5540adcf92117f89093b1b5074256a80301;hb=4b421dc811d01d7eb0b40edae5513ebdef9da440;hp=fef8b07ac6b78caebcd90f96eeed4ca765a8a68d;hpb=7886b797a36f5a035a75a19424e0b3cf7825baf8;p=chaz%2Fopenbox diff --git a/plugins/mouse/mouse.c b/plugins/mouse/mouse.c index fef8b07a..caf4e554 100644 --- a/plugins/mouse/mouse.c +++ b/plugins/mouse/mouse.c @@ -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 (!e->data.x.client) + corner = prop_atoms.net_wm_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,