button presses which run actions during interactive actions will cancel the action.

when you cancel switching desktops, don't go back, just stop.
This commit is contained in:
Dana Jansens 2007-05-09 04:08:57 +00:00
parent 4546925b58
commit a3f8c5c45a
2 changed files with 2 additions and 11 deletions

View file

@ -1521,11 +1521,6 @@ void action_send_to_desktop(union ActionData *data)
void action_desktop(union ActionData *data) void action_desktop(union ActionData *data)
{ {
static guint first = (unsigned) -1;
if (data->inter.any.interactive && first == (unsigned) -1)
first = screen_desktop;
if (!data->inter.any.interactive || if (!data->inter.any.interactive ||
(!data->inter.cancel && !data->inter.final)) (!data->inter.cancel && !data->inter.final))
{ {
@ -1536,14 +1531,10 @@ void action_desktop(union ActionData *data)
if (data->inter.any.interactive) if (data->inter.any.interactive)
screen_desktop_popup(data->desktop.desk, TRUE); screen_desktop_popup(data->desktop.desk, TRUE);
} }
} else if (data->inter.cancel) {
screen_set_desktop(first, TRUE);
} }
if (!data->inter.any.interactive || data->inter.final) { if (!data->inter.any.interactive || data->inter.final)
screen_desktop_popup(0, FALSE); screen_desktop_popup(0, FALSE);
first = (unsigned) -1;
}
} }
void action_desktop_dir(union ActionData *data) void action_desktop_dir(union ActionData *data)

View file

@ -249,7 +249,7 @@ gboolean keyboard_process_interactive_grab(const XEvent *e, ObClient **client)
handled = TRUE; handled = TRUE;
} }
} else if (e->type == ButtonPress) { } else if (e->type == ButtonPress) {
cancel = FALSE; cancel = TRUE;
done = TRUE; done = TRUE;
handled = FALSE; handled = FALSE;
} }