fix: can't resize tile scroller window when only two tiled client

This commit is contained in:
DreamMaoMao 2026-06-11 23:14:50 +08:00
parent b995090747
commit 8dca99999b
2 changed files with 8 additions and 4 deletions

View file

@ -751,6 +751,7 @@ void resize_tile_grid_fair(Client *grabc, bool isdrag, int32_t offsetx,
void resize_tile_scroller(Client *grabc, bool isdrag, int32_t offsetx, void resize_tile_scroller(Client *grabc, bool isdrag, int32_t offsetx,
int32_t offsety, uint32_t time, bool isvertical) { int32_t offsety, uint32_t time, bool isvertical) {
if (!grabc || grabc->isfullscreen || grabc->ismaximizescreen) if (!grabc || grabc->isfullscreen || grabc->ismaximizescreen)
return; return;
if (grabc->mon->isoverview) if (grabc->mon->isoverview)
@ -772,7 +773,7 @@ void resize_tile_scroller(Client *grabc, bool isdrag, int32_t offsetx,
Client *stack_head_client = headnode->client; Client *stack_head_client = headnode->client;
if (m->visible_tiling_clients == 1 && if (m->visible_scroll_tiling_clients == 1 &&
!config.scroller_ignore_proportion_single) !config.scroller_ignore_proportion_single)
return; return;

View file

@ -4747,7 +4747,8 @@ void motionnotify(uint32_t time, struct wlr_input_device *device, double dx,
if (!surface && !seat->drag && !cursor_hidden) if (!surface && !seat->drag && !cursor_hidden)
wlr_cursor_set_xcursor(cursor, cursor_mgr, "default"); wlr_cursor_set_xcursor(cursor, cursor_mgr, "default");
if (c && c->mon && !c->animation.running && (INSIDEMON(c) || !ISSCROLLTILED(c))) { if (c && c->mon && !c->animation.running &&
(INSIDEMON(c) || !ISSCROLLTILED(c))) {
scroller_focus_lock = 0; scroller_focus_lock = 0;
} }
@ -4759,13 +4760,15 @@ void motionnotify(uint32_t time, struct wlr_input_device *device, double dx,
} }
if (!scroller_focus_lock || !(c && c->mon && !INSIDEMON(c))) { if (!scroller_focus_lock || !(c && c->mon && !INSIDEMON(c))) {
if (c && c->mon && ISSCROLLTILED(c) && is_scroller_layout(c->mon) && !INSIDEMON(c)) { if (c && c->mon && ISSCROLLTILED(c) && is_scroller_layout(c->mon) &&
!INSIDEMON(c)) {
should_lock = true; should_lock = true;
} }
if (!((!config.edge_scroller_pointer_focus || if (!((!config.edge_scroller_pointer_focus ||
speed < config.edge_scroller_focus_allow_speed) && speed < config.edge_scroller_focus_allow_speed) &&
c && c->mon && ISSCROLLTILED(c) && 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); pointerfocus(c, surface, sx, sy, time);
} }