mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
Don't open menu or start window switching while other server interaction
This should make the transition of the server state more predictable and prevent potential bugs.
This commit is contained in:
parent
5d3ce3e190
commit
66a3beb98b
2 changed files with 8 additions and 0 deletions
|
|
@ -800,6 +800,10 @@ shift_is_pressed(struct server *server)
|
|||
static void
|
||||
start_window_cycling(struct server *server, enum lab_cycle_dir direction)
|
||||
{
|
||||
if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Remember direction so it can be followed by subsequent key presses */
|
||||
server->osd_state.initial_direction = direction;
|
||||
server->osd_state.initial_keybind_contained_shift =
|
||||
|
|
|
|||
|
|
@ -1322,6 +1322,10 @@ menu_close(struct menu *menu)
|
|||
void
|
||||
menu_open_root(struct menu *menu, int x, int y)
|
||||
{
|
||||
if (menu->server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(menu);
|
||||
if (menu->server->menu_current) {
|
||||
menu_close(menu->server->menu_current);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue