From 813739af6961122f143e7eb1d778b80b2a0fe764 Mon Sep 17 00:00:00 2001 From: Maik Broemme Date: Sat, 15 Nov 2025 15:43:20 +0100 Subject: [PATCH] fix/focus: remove `` option: - follow-mouse on SSD titlebar/title/buttons will focus toplevel by default --- docs/labwc-config.5.scd | 6 ------ include/config/rcxml.h | 3 --- src/config/rcxml.c | 5 ----- src/input/cursor.c | 3 +-- 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/docs/labwc-config.5.scd b/docs/labwc-config.5.scd index bb817bea..9b0f8291 100644 --- a/docs/labwc-config.5.scd +++ b/docs/labwc-config.5.scd @@ -491,12 +491,6 @@ this is for compatibility with Openbox. ** [yes|no] Raise window to top when focused. Default is no. -** [yes|no] - When *followMouse* is enabled, also focus the toplevel when the - pointer enters the server-side decorated titlebar (including the - titlebar background, the window title text, and any titlebar buttons). - Default is no. - ## WINDOW SNAPPING Windows may be "snapped" to an edge or user-defined region of an output when diff --git a/include/config/rcxml.h b/include/config/rcxml.h index 7addd6f4..91a73d58 100644 --- a/include/config/rcxml.h +++ b/include/config/rcxml.h @@ -199,9 +199,6 @@ struct rcxml { float mag_scale; float mag_increment; bool mag_filter; - - /* Focus behavior */ - bool focus_titlebar_on_mouse_enter; }; extern struct rcxml rc; diff --git a/src/config/rcxml.c b/src/config/rcxml.c index 0897e2ea..264c65a8 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -1142,8 +1142,6 @@ entry(xmlNode *node, char *nodename, char *content) set_bool(content, &rc.focus_follow_mouse_requires_movement); } else if (!strcasecmp(nodename, "raiseOnFocus.focus")) { set_bool(content, &rc.raise_on_focus); - } else if (!strcasecmp(nodename, "focusOnTitlebarEnter.focus")) { - set_bool(content, &rc.focus_titlebar_on_mouse_enter); } else if (!strcasecmp(nodename, "doubleClickTime.mouse")) { long doubleclick_time_parsed = strtol(content, NULL, 10); if (doubleclick_time_parsed > 0) { @@ -1408,9 +1406,6 @@ rcxml_init(void) } has_run = true; - /* default: don't focus on titlebar enter */ - rc.focus_titlebar_on_mouse_enter = false; - rc.placement_policy = LAB_PLACE_CASCADE; rc.placement_cascade_offset_x = 0; rc.placement_cascade_offset_y = 0; diff --git a/src/input/cursor.c b/src/input/cursor.c index ea69f3e3..062fd4c4 100644 --- a/src/input/cursor.c +++ b/src/input/cursor.c @@ -563,8 +563,7 @@ cursor_update_common(struct server *server, struct cursor_context *ctx, * a drag operation. */ wlr_seat_pointer_notify_clear_focus(wlr_seat); - /* Optional: focus toplevel when entering SSD titlebar/title/buttons */ - if (rc.focus_follow_mouse && rc.focus_titlebar_on_mouse_enter && ctx->view) { + if (rc.focus_follow_mouse && ctx->view) { /* Titlebar region, window title, or any titlebar button */ if (ctx->type == LAB_NODE_TITLEBAR || ctx->type == LAB_NODE_TITLE || node_type_contains(LAB_NODE_BUTTON, ctx->type)) {