Move anywhere if you can't resize the window
authorMikael Magnusson <mikachu@gmail.com>
Tue, 29 Jan 2019 21:41:57 +0000 (22:41 +0100)
committerMikael Magnusson <mikachu@gmail.com>
Tue, 29 Jan 2019 21:41:57 +0000 (22:41 +0100)
This makes it a lot easier to move fullscreen windows between monitors with
the Resize action.

openbox/actions/resize.c

index 3c128d2c1dd56da632061a6e62e4048fa04163b9..5b6ef267c466a540d06be129d6be7526ddb4f75b 100644 (file)
@@ -75,7 +75,7 @@ static gboolean run_func(ObActionsData *data, gpointer options)
             corner = OBT_PROP_ATOM(NET_WM_MOVERESIZE_SIZE_KEYBOARD);
         else if (o->corner_specified)
             corner = o->corner; /* it was specified in the binding */
-        else
+        else if (c->functions & OB_CLIENT_FUNC_RESIZE)
             corner = pick_corner(data->x, data->y,
                                  c->frame->area.x, c->frame->area.y,
                                  /* use the client size because the frame
@@ -86,6 +86,10 @@ static gboolean run_func(ObActionsData *data, gpointer options)
                                  c->frame->size.right,
                                  c->area.height + c->frame->size.top +
                                  c->frame->size.bottom, c->shaded);
+        else if (c->functions & OB_CLIENT_FUNC_MOVE)
+            corner = OBT_PROP_ATOM(NET_WM_MOVERESIZE_MOVE);
+        else
+            return FALSE;
 
         moveresize_start(c, data->x, data->y, data->button, corner);
     }