mirror of
https://github.com/labwc/labwc.git
synced 2026-04-07 08:21:20 -04:00
fix/focus: remove <focusOnTitlebarEnter> option:
- follow-mouse on SSD titlebar/title/buttons will focus toplevel by default
This commit is contained in:
parent
0ee35b3dc0
commit
813739af69
4 changed files with 1 additions and 16 deletions
|
|
@ -491,12 +491,6 @@ this is for compatibility with Openbox.
|
|||
*<focus><raiseOnFocus>* [yes|no]
|
||||
Raise window to top when focused. Default is no.
|
||||
|
||||
*<focus><focusOnTitlebarEnter>* [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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue