bindings: add minimize/maximize/fullscreen actions

These actions are by default not bound to anything.
This commit is contained in:
Daniel Eklöf 2020-03-12 09:34:09 +01:00
parent 1f904fc257
commit 65ff582358
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 39 additions and 0 deletions

18
input.c
View file

@ -78,6 +78,24 @@ input_execute_binding(struct terminal *term, enum binding_action action,
term_spawn_new(term);
break;
case BIND_ACTION_MINIMIZE:
xdg_toplevel_set_minimized(term->window->xdg_toplevel);
break;
case BIND_ACTION_MAXIMIZE:
if (term->window->is_maximized)
xdg_toplevel_unset_maximized(term->window->xdg_toplevel);
else
xdg_toplevel_set_maximized(term->window->xdg_toplevel);
break;
case BIND_ACTION_FULLSCREEN:
if (term->window->is_fullscreen)
xdg_toplevel_unset_fullscreen(term->window->xdg_toplevel);
else
xdg_toplevel_set_fullscreen(term->window->xdg_toplevel, NULL);
break;
case BIND_ACTION_COUNT:
assert(false);
break;