When the user cancels a window move, restore workspace & maximisation, jump to that workspace and make sure that the restored window has the input focus. Signed-Off-By: Darren Salt Index: src/client.c =================================================================== --- src/client.c (revision 22240) +++ src/client.c (working copy) @@ -99,6 +99,7 @@ gboolean is_transient; gboolean move_resized; int cancel_x, cancel_y; /* for cancellation (either position or size) */ + int cancel_workspace; int mx, my; int ox, oy; int oldw, oldh; @@ -3321,6 +3322,14 @@ wc.y = c->y; clientConfigure (c, &wc, CWX | CWY, NO_CFG_FLAG); } + if (screen_info->current_ws != passdata->cancel_workspace) + workspaceSwitch (screen_info, passdata->cancel_workspace, c, FALSE); + if (toggled_maximize) + { + toggled_maximize = FALSE; + clientToggleMaximized (c, WIN_STATE_MAXIMIZED, FALSE); + passdata->move_resized = TRUE; + } } else if (passdata->use_keys) { @@ -3600,6 +3609,7 @@ passdata.c = c; passdata.cancel_x = passdata.ox = c->x; passdata.cancel_y = passdata.oy = c->y; + passdata.cancel_workspace = c->win_workspace; passdata.use_keys = FALSE; passdata.grab = FALSE; passdata.is_transient = clientIsValidTransientOrModal (c);