Add action ToggleShowDesktop

This commit is contained in:
Johan Malm 2026-04-06 22:05:37 +01:00
parent c9b4da2ce2
commit 58b3562d6d
8 changed files with 123 additions and 1 deletions

View file

@ -27,6 +27,7 @@
#include "output.h"
#include "output-virtual.h"
#include "regions.h"
#include "show-desktop.h"
#include "ssd.h"
#include "theme.h"
#include "translate.h"
@ -132,6 +133,7 @@ struct action_arg_list {
X(TOGGLE_MAGNIFY, "ToggleMagnify") \
X(ZOOM_IN, "ZoomIn") \
X(ZOOM_OUT, "ZoomOut") \
X(TOGGLE_SHOW_DESKTOP, "ToggleShowDesktop") \
X(WARP_CURSOR, "WarpCursor") \
X(HIDE_CURSOR, "HideCursor")
@ -1560,6 +1562,9 @@ run_action(struct view *view, struct action *action,
case ACTION_TYPE_ZOOM_OUT:
magnifier_set_scale(MAGNIFY_DECREASE);
break;
case ACTION_TYPE_TOGGLE_SHOW_DESKTOP:
show_desktop_toggle();
break;
case ACTION_TYPE_WARP_CURSOR: {
const char *to = action_get_str(action, "to", "output");
const char *x = action_get_str(action, "x", "center");