implement Raise and Focus actions

This commit is contained in:
bi4k8 2021-12-01 22:07:07 +00:00 committed by Johan Malm
parent 3a3b484898
commit fc0c06d4c4

View file

@ -67,6 +67,12 @@ action(struct server *server, const char *action, const char *command, uint32_t
if (view) { if (view) {
view_toggle_decorations(view); view_toggle_decorations(view);
} }
} else if (!strcasecmp(action, "Focus")) {
struct view *view = desktop_view_at_cursor(server);
if (view) {
desktop_focus_and_activate_view(&server->seat, view);
damage_all_outputs(server);
}
} else if (!strcasecmp(action, "Iconify")) { } else if (!strcasecmp(action, "Iconify")) {
struct view *view = desktop_focused_view(server); struct view *view = desktop_focused_view(server);
if (view) { if (view) {
@ -77,6 +83,12 @@ action(struct server *server, const char *action, const char *command, uint32_t
if (view) { if (view) {
interactive_begin(view, LAB_INPUT_STATE_MOVE, 0); interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
} }
} else if (!strcasecmp(action, "Raise")) {
struct view *view = desktop_focused_view(server);
if (view) {
desktop_raise_view(view);
damage_all_outputs(server);
}
} else if (!strcasecmp(action, "Resize")) { } else if (!strcasecmp(action, "Resize")) {
struct view *view = desktop_view_at_cursor(server); struct view *view = desktop_view_at_cursor(server);
if (view) { if (view) {