diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2021-07-29 14:05:17 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2021-07-29 14:05:17 +0200 |
| commit | 00f51e00b43ec59787f632409667f76157727cd1 (patch) | |
| tree | a8ab573447fefdd344ca27f8a612639d356726a9 | |
| parent | bae826ef0e4b43b6e5f7b85ed910b71fa0b7544a (diff) | |
| download | river-00f51e00b43ec59787f632409667f76157727cd1.tar.gz river-00f51e00b43ec59787f632409667f76157727cd1.tar.xz | |
cursor: remove strict focus-follows-cursor mode
This is pretty much unusable after recent improvements to the cursor
code, and was totally broken causing a stack overflow as soon as the
cursor was moved over any surface until the previous commit.
Furthermore, none of the core contributors or people active on IRC seem
to use it.
| -rw-r--r-- | doc/riverctl.1.scd | 6 | ||||
| -rw-r--r-- | river/Config.zig | 2 | ||||
| -rw-r--r-- | river/Cursor.zig | 3 |
3 files changed, 3 insertions, 8 deletions
diff --git a/doc/riverctl.1.scd b/doc/riverctl.1.scd index ece7eee..a589c45 100644 --- a/doc/riverctl.1.scd +++ b/doc/riverctl.1.scd @@ -242,16 +242,14 @@ A complete list may be found in _/usr/include/linux/input-event-codes.h_ *border-width* _pixels_ Set the border width to _pixels_. -*focus-follows-cursor* *disabled*|*normal*|*strict* - There are three available modes: +*focus-follows-cursor* *disabled*|*normal* + There are two available modes: - _disabled_: Moving the cursor does not affect focus. This is the default. - _normal_: Moving the cursor over a view will focus that view. Moving the cursor within a view will not re-focus that view if focus has moved elsewhere. - - _strict_: Moving the cursor over a view or within a view will - focus that view. If the view to be focused is on an output that does not have focus, focus is switched to that output. diff --git a/river/Config.zig b/river/Config.zig index 0ee14b4..39150f7 100644 --- a/river/Config.zig +++ b/river/Config.zig @@ -29,8 +29,6 @@ pub const FocusFollowsCursorMode = enum { disabled, /// Only change focus on entering a surface normal, - /// On cursor movement the focus will be updated to the surface below the cursor - strict, }; pub const WarpCursorMode = enum { diff --git a/river/Cursor.zig b/river/Cursor.zig index 0fca04a..efdefee 100644 --- a/river/Cursor.zig +++ b/river/Cursor.zig @@ -822,8 +822,7 @@ fn passthrough(self: *Self, time: u32) void { self.seat.wlr_seat.pointerNotifyEnter(result.surface, result.sx, result.sy); self.seat.wlr_seat.pointerNotifyMotion(time, result.sx, result.sy); - const follow_mode = server.config.focus_follows_cursor; - if (follow_mode == .strict or (follow_mode == .normal and focus_change)) { + if (server.config.focus_follows_cursor == .normal and focus_change) { switch (result.parent) { .view => |view| { if (self.seat.focused != .view or self.seat.focused.view != view) { |
