mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-09 10:38:23 +02:00
managers: fix movefocus wrapping with reserved areas/gaps
The movefocus dispatcher used the raw monitor logical box to calculate the "inverse edge" for wrapping. After the reserved area refactor, windows are strictly confined to the work area. When a bar or gaps are present, the search box spawned at the monitor edge would land in a "dead zone" (reserved space), failing to hit the window on the opposite side. This switches the dispatcher to use the layout's workAreaOnWorkspace, ensuring the wrapping search box aligns with the actual window boundaries.
This commit is contained in:
parent
b8fc0def97
commit
abfe28f014
1 changed files with 6 additions and 1 deletions
|
|
@ -1538,7 +1538,12 @@ SDispatchResult CKeybindManager::moveFocusTo(std::string args) {
|
|||
} else if (STICKS(PLASTWINDOW->m_position.y, PMONITOR->m_position.y) && STICKS(PLASTWINDOW->m_size.y, PMONITOR->m_size.y))
|
||||
return {.success = false, .error = "move does not make sense, would return back"};
|
||||
|
||||
CBox box = PMONITOR->logicalBox();
|
||||
const auto PWORKSPACE = PLASTWINDOW->m_pWorkspace.lock();
|
||||
|
||||
CBox box = g_pLayoutManager->getCurrentLayout()->workAreaOnWorkspace(PWORKSPACE);
|
||||
|
||||
if (box.width <= 0 || box.height <= 0)
|
||||
box = PMONITOR->logicalBox();
|
||||
switch (arg) {
|
||||
case 'l':
|
||||
box.x += box.w;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue