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.
This commit is contained in:
Isaac Freund 2021-07-29 14:05:17 +02:00
parent bae826ef0e
commit 00f51e00b4
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11
3 changed files with 3 additions and 8 deletions

View file

@ -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.

View file

@ -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 {

View file

@ -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) {