set the cursor before using it
This commit is contained in:
parent
03136a081a
commit
627125a6c6
1 changed files with 25 additions and 25 deletions
|
@ -162,6 +162,31 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr)
|
||||||
(c->functions & OB_CLIENT_FUNC_RESIZE)))
|
(c->functions & OB_CLIENT_FUNC_RESIZE)))
|
||||||
return;
|
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))
|
if (!grab_pointer(TRUE, FALSE, cur))
|
||||||
return;
|
return;
|
||||||
if (!grab_keyboard(TRUE)) {
|
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;
|
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
|
#ifdef SYNC
|
||||||
if (config_resize_redraw && !moving && extensions_shape &&
|
if (config_resize_redraw && !moving && extensions_shape &&
|
||||||
moveresize_client->sync_request && moveresize_client->sync_counter)
|
moveresize_client->sync_request && moveresize_client->sync_counter)
|
||||||
|
|
Loading…
Reference in a new issue