feat: add global option edge_scroller_pointer_focus

This commit is contained in:
DreamMaoMao 2025-09-04 09:55:53 +08:00
parent ffba02fd59
commit c7b0e2e6c8
4 changed files with 15 additions and 1 deletions

View file

@ -3710,7 +3710,13 @@ void motionnotify(unsigned int time, struct wlr_input_device *device, double dx,
c->geom.y < c->mon->m.y)) {
should_lock = true;
}
pointerfocus(c, surface, sx, sy, time);
if (!(!edge_scroller_pointer_focus && c && c->mon &&
is_scroller_layout(c->mon) &&
(c->geom.x < c->mon->m.x || c->geom.y < c->mon->m.y ||
c->geom.x + c->geom.width > c->mon->m.x + c->mon->m.width ||
c->geom.y + c->geom.height > c->mon->m.y + c->mon->m.height)))
pointerfocus(c, surface, sx, sy, time);
if (should_lock && c && c->mon && ISTILED(c) && c == c->mon->sel) {
scroller_focus_lock = 1;