]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
gracefully handle grabs failing when doing interactive actions
[chaz/openbox] / openbox / action.c
index bac087876e9571748b8be8572b04946cdb0d063b..5f8b306fb1591b8448de8190795bb04e8949eb18 100644 (file)
@@ -946,7 +946,8 @@ void action_run_list(GSList *acts, ObClient *c, ObFrameContext context,
                 a->data.inter.cancel = cancel;
                 a->data.inter.final = done;
                 if (!(cancel || done))
-                    keyboard_interactive_grab(state, a->data.any.c, a);
+                    if (!keyboard_interactive_grab(state, a->data.any.c, a))
+                        continue;
 
                 /* interactive actions are not queued */
                 a->func(&a->data);
@@ -1308,8 +1309,8 @@ void action_toggle_decorations(union ActionData *data)
 
 static guint32 pick_corner(int x, int y, int cx, int cy, int cw, int ch)
 {
-    if (x - cx > cw / 3 * 2) {
-        if (y - cy > ch / 3 * 2)
+    if ((cw / 3 < 1) || (x - cx > cw / 3 * 2)) {
+        if ((ch / 3 < 1) || (y - cy > ch / 3 * 2))
             return prop_atoms.net_wm_moveresize_size_bottomright;
         else if (y - cy < ch / 3)
             return prop_atoms.net_wm_moveresize_size_topright;
This page took 0.021245 seconds and 4 git commands to generate.