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>
Mon, 20 Mar 2023 06:28:01 +0000 (07:28 +0100)
This makes it a lot easier to move fullscreen windows between monitors with
the Resize action.

openbox/actions/resize.c

index fc85c0b72bca100b0b14975128346a2d3961beca..fc5c142c2c81624f05c0ab8ea881c6d5c4f180a0 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);
     }