]> Dogcows Code - chaz/openbox/commitdiff
set the cursor before using it
authorDana Jansens <danakj@orodu.net>
Sun, 13 May 2007 23:19:56 +0000 (23:19 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 13 May 2007 23:19:56 +0000 (23:19 +0000)
openbox/moveresize.c

index 3d9914c5ffae4b48710fc8ddb20ceaebcb59a09c..37c190d507cb23e56af98c1a7dc8147b3ba64baa 100644 (file)
@@ -162,6 +162,31 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr)
           (c->functions & OB_CLIENT_FUNC_RESIZE)))
         return;
 
+    if (corner == prop_atoms.net_wm_moveresize_size_topleft)
+        cur = OB_CURSOR_NORTHWEST;
+    else if (corner == prop_atoms.net_wm_moveresize_size_top)
+        cur = OB_CURSOR_NORTH;
+    else if (corner == prop_atoms.net_wm_moveresize_size_topright)
+        cur = OB_CURSOR_NORTHEAST;
+    else if (corner == prop_atoms.net_wm_moveresize_size_right)
+        cur = OB_CURSOR_EAST;
+    else if (corner == prop_atoms.net_wm_moveresize_size_bottomright)
+        cur = OB_CURSOR_SOUTHEAST;
+    else if (corner == prop_atoms.net_wm_moveresize_size_bottom)
+        cur = OB_CURSOR_SOUTH;
+    else if (corner == prop_atoms.net_wm_moveresize_size_bottomleft)
+        cur = OB_CURSOR_SOUTHWEST;
+    else if (corner == prop_atoms.net_wm_moveresize_size_left)
+        cur = OB_CURSOR_WEST;
+    else if (corner == prop_atoms.net_wm_moveresize_size_keyboard)
+        cur = OB_CURSOR_SOUTHEAST;
+    else if (corner == prop_atoms.net_wm_moveresize_move)
+        cur = OB_CURSOR_MOVE;
+    else if (corner == prop_atoms.net_wm_moveresize_move_keyboard)
+        cur = OB_CURSOR_MOVE;
+    else
+        g_assert_not_reached();
+
     if (!grab_pointer(TRUE, FALSE, cur))
         return;
     if (!grab_keyboard(TRUE)) {
@@ -204,31 +229,6 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr)
 
     moveresize_in_progress = TRUE;
 
-    if (corner == prop_atoms.net_wm_moveresize_size_topleft)
-        cur = OB_CURSOR_NORTHWEST;
-    else if (corner == prop_atoms.net_wm_moveresize_size_top)
-        cur = OB_CURSOR_NORTH;
-    else if (corner == prop_atoms.net_wm_moveresize_size_topright)
-        cur = OB_CURSOR_NORTHEAST;
-    else if (corner == prop_atoms.net_wm_moveresize_size_right)
-        cur = OB_CURSOR_EAST;
-    else if (corner == prop_atoms.net_wm_moveresize_size_bottomright)
-        cur = OB_CURSOR_SOUTHEAST;
-    else if (corner == prop_atoms.net_wm_moveresize_size_bottom)
-        cur = OB_CURSOR_SOUTH;
-    else if (corner == prop_atoms.net_wm_moveresize_size_bottomleft)
-        cur = OB_CURSOR_SOUTHWEST;
-    else if (corner == prop_atoms.net_wm_moveresize_size_left)
-        cur = OB_CURSOR_WEST;
-    else if (corner == prop_atoms.net_wm_moveresize_size_keyboard)
-        cur = OB_CURSOR_SOUTHEAST;
-    else if (corner == prop_atoms.net_wm_moveresize_move)
-        cur = OB_CURSOR_MOVE;
-    else if (corner == prop_atoms.net_wm_moveresize_move_keyboard)
-        cur = OB_CURSOR_MOVE;
-    else
-        g_assert_not_reached();
-
 #ifdef SYNC
     if (config_resize_redraw && !moving && extensions_shape &&
         moveresize_client->sync_request && moveresize_client->sync_counter)
This page took 0.028984 seconds and 4 git commands to generate.