summaryrefslogtreecommitdiff
path: root/src/core/prefs.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2025-08-15 07:20:47 -0400
committerLuke from DC <[email protected]>2025-09-09 19:51:09 +0000
commitb5292ba66132104256590631b2d2b7a1c92ad934 (patch)
tree3d83ea535c11942428a57af64263af5f71837205 /src/core/prefs.c
parent4a2eebdd0f20a9ea4f60d63fe03837f9a39350ba (diff)
downloadmarco-b5292ba66132104256590631b2d2b7a1c92ad934.tar.bz2
marco-b5292ba66132104256590631b2d2b7a1c92ad934.tar.xz
window: Add configurable mouse actions for titlebar
Adds support for configurable mouse actions on window titlebars, including middle-click and scroll wheel events. New actions added: - close: Close the window - raise: Raise window to top - toggle_stick: Toggle sticky state (all workspaces) - toggle_above: Toggle always-on-top state Fixes #425 Fixes #787 Note: requries matching mate-control-center changes to work properly
Diffstat (limited to 'src/core/prefs.c')
-rw-r--r--src/core/prefs.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 032bba8f..844b1a06 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -109,6 +109,8 @@ static MetaWrapStyle wrap_style = META_WRAP_NONE;
static MetaActionTitlebar action_double_click_titlebar = META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE;
static MetaActionTitlebar action_middle_click_titlebar = META_ACTION_TITLEBAR_LOWER;
static MetaActionTitlebar action_right_click_titlebar = META_ACTION_TITLEBAR_MENU;
+static MetaActionTitlebar action_scroll_up_titlebar = META_ACTION_TITLEBAR_NONE;
+static MetaActionTitlebar action_scroll_down_titlebar = META_ACTION_TITLEBAR_NONE;
static gboolean application_based = FALSE;
static gboolean disable_workarounds = FALSE;
static gboolean auto_raise = FALSE;
@@ -336,6 +338,16 @@ static MetaEnumPreference preferences_enum[] =
META_PREF_ACTION_RIGHT_CLICK_TITLEBAR,
(gint *) &action_right_click_titlebar,
},
+ { "action-scroll-up-titlebar",
+ KEY_GENERAL_SCHEMA,
+ META_PREF_ACTION_SCROLL_UP_TITLEBAR,
+ (gint *) &action_scroll_up_titlebar,
+ },
+ { "action-scroll-down-titlebar",
+ KEY_GENERAL_SCHEMA,
+ META_PREF_ACTION_SCROLL_DOWN_TITLEBAR,
+ (gint *) &action_scroll_down_titlebar,
+ },
{ "placement-mode",
KEY_GENERAL_SCHEMA,
META_PREF_PLACEMENT_MODE,
@@ -1645,6 +1657,12 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_ACTION_RIGHT_CLICK_TITLEBAR:
return "ACTION_RIGHT_CLICK_TITLEBAR";
+ case META_PREF_ACTION_SCROLL_UP_TITLEBAR:
+ return "ACTION_SCROLL_UP_TITLEBAR";
+
+ case META_PREF_ACTION_SCROLL_DOWN_TITLEBAR:
+ return "ACTION_SCROLL_DOWN_TITLEBAR";
+
case META_PREF_AUTO_RAISE:
return "AUTO_RAISE";
@@ -2299,6 +2317,18 @@ meta_prefs_get_action_right_click_titlebar (void)
return action_right_click_titlebar;
}
+MetaActionTitlebar
+meta_prefs_get_action_scroll_up_titlebar (void)
+{
+ return action_scroll_up_titlebar;
+}
+
+MetaActionTitlebar
+meta_prefs_get_action_scroll_down_titlebar (void)
+{
+ return action_scroll_down_titlebar;
+}
+
gboolean
meta_prefs_get_auto_raise (void)
{