fix: floating window can't get pointer focus when cross monitor

This commit is contained in:
DreamMaoMao 2026-06-11 11:08:44 +08:00
parent 1391de36be
commit 87e6d24423

View file

@ -4759,13 +4759,13 @@ void motionnotify(uint32_t time, struct wlr_input_device *device, double dx,
}
if (!scroller_focus_lock || !(c && c->mon && !INSIDEMON(c))) {
if (c && c->mon && is_scroller_layout(c->mon) && !INSIDEMON(c)) {
if (c && c->mon && ISSCROLLTILED(c) && is_scroller_layout(c->mon) && !INSIDEMON(c)) {
should_lock = true;
}
if (!((!config.edge_scroller_pointer_focus ||
speed < config.edge_scroller_focus_allow_speed) &&
c && c->mon && is_scroller_layout(c->mon) && !INSIDEMON(c))) {
c && c->mon && ISSCROLLTILED(c) && is_scroller_layout(c->mon) && !INSIDEMON(c))) {
pointerfocus(c, surface, sx, sy, time);
}