]> Dogcows Code - chaz/openbox/blobdiff - openbox/moveresize.c
add the left/right/top/bottom direction arrows and use them for resizing those ways
[chaz/openbox] / openbox / moveresize.c
index 7af3fa3e76b5bc5eba34972813fabadd542abdae..2c9f0cdfb7b2820ca5642de41b46255a95193503 100644 (file)
@@ -95,19 +95,19 @@ void moveresize_start(Client *c, int x, int y, guint b, guint32 cnr)
     if (corner == prop_atoms.net_wm_moveresize_size_topleft)
         cur = ob_cursors.tl;
     else if (corner == prop_atoms.net_wm_moveresize_size_top)
-        cur = ob_cursors.tl;
+        cur = ob_cursors.t;
     else if (corner == prop_atoms.net_wm_moveresize_size_topright)
         cur = ob_cursors.tr;
     else if (corner == prop_atoms.net_wm_moveresize_size_right)
-        cur = ob_cursors.tr;
+        cur = ob_cursors.r;
     else if (corner == prop_atoms.net_wm_moveresize_size_bottomright)
         cur = ob_cursors.br;
     else if (corner == prop_atoms.net_wm_moveresize_size_bottom)
-        cur = ob_cursors.br;
+        cur = ob_cursors.b;
     else if (corner == prop_atoms.net_wm_moveresize_size_bottomleft)
         cur = ob_cursors.bl;
     else if (corner == prop_atoms.net_wm_moveresize_size_left)
-        cur = ob_cursors.bl;
+        cur = ob_cursors.l;
     else if (corner == prop_atoms.net_wm_moveresize_size_keyboard)
         cur = ob_cursors.br;
     else if (corner == prop_atoms.net_wm_moveresize_move)
@@ -117,8 +117,8 @@ void moveresize_start(Client *c, int x, int y, guint b, guint32 cnr)
     else
         g_assert_not_reached();
 
-    grab_keyboard(TRUE);
     grab_pointer(TRUE, cur);
+    grab_keyboard(TRUE);
 }
 
 static void end_moveresize(gboolean cancel)
@@ -183,7 +183,7 @@ void moveresize_event(XEvent *e)
             button = e->xbutton.button; /* this will end it now */
         }
     } else if (e->type == ButtonRelease) {
-        if (e->xbutton.button == button) {
+        if (!button || e->xbutton.button == button) {
             end_moveresize(FALSE);
         }
     } else if (e->type == MotionNotify) {
This page took 0.023346 seconds and 4 git commands to generate.