]> git.mdlowis.com Git - proto/labwc.git/commitdiff
implement Raise and Focus actions
authorbi4k8 <bi4k8@github>
Wed, 1 Dec 2021 22:07:07 +0000 (22:07 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Fri, 3 Dec 2021 06:46:43 +0000 (06:46 +0000)
src/action.c

index b28b8093f850d205c94aa0feb047e59f0f8aaf8a..74af256805df7b54c7ff4bdf4b9e9ec6af54fbd9 100644 (file)
@@ -67,6 +67,12 @@ action(struct server *server, const char *action, const char *command, uint32_t
                if (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")) {
                struct view *view = desktop_focused_view(server);
                if (view) {
@@ -77,6 +83,12 @@ action(struct server *server, const char *action, const char *command, uint32_t
                if (view) {
                        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")) {
                struct view *view = desktop_view_at_cursor(server);
                if (view) {