dont use the client if there is none

This commit is contained in:
Dana Jansens 2003-04-17 16:01:42 +00:00
parent 793099ce57
commit a85158b14f

View file

@ -276,20 +276,26 @@ static void event(ObEvent *e, void *foo)
if (button) { if (button) {
if (ABS(e->data.x.e->xmotion.x_root - px) >= threshold || if (ABS(e->data.x.e->xmotion.x_root - px) >= threshold ||
ABS(e->data.x.e->xmotion.y_root - py) >= threshold) { ABS(e->data.x.e->xmotion.y_root - py) >= threshold) {
guint32 corner = guint32 corner;
pick_corner(e->data.x.e->xmotion.x_root,
e->data.x.e->xmotion.y_root, if (!client)
e->data.x.client->frame->area.x, corner = prop_atoms.net_am_moveresize_size_bottomright;
e->data.x.client->frame->area.y, else
/* use the client size because the frame can be corner =
differently sized (shaded windows) and we pick_corner(e->data.x.e->xmotion.x_root,
want this based on the clients size */ e->data.x.e->xmotion.y_root,
e->data.x.client->area.width + e->data.x.client->frame->area.x,
e->data.x.client->frame->size.left + e->data.x.client->frame->area.y,
e->data.x.client->frame->size.right, /* use the client size because the frame
e->data.x.client->area.height + can be differently sized (shaded
e->data.x.client->frame->size.top + windows) and we want this based on the
e->data.x.client->frame->size.bottom); 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, context = frame_context(e->data.x.client,
e->data.x.e->xmotion.window); e->data.x.e->xmotion.window);
fire_motion(MouseAction_Motion, context, fire_motion(MouseAction_Motion, context,