mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Fix crash when moving focus of a node containing multiple windows
This commit is contained in:
parent
f71ac37565
commit
b341fe60a7
1 changed files with 15 additions and 12 deletions
|
@ -938,10 +938,12 @@ void Hy3Layout::shiftWindow(int workspace, ShiftDirection direction, bool once,
|
|||
|
||||
void Hy3Layout::shiftFocus(int workspace, ShiftDirection direction, bool visible) {
|
||||
auto* current_window = g_pCompositor->m_pLastWindow;
|
||||
|
||||
if (current_window != nullptr) {
|
||||
auto* p_workspace = g_pCompositor->getWorkspaceByID(current_window->m_iWorkspaceID);
|
||||
if (p_workspace->m_bHasFullscreenWindow) return;
|
||||
|
||||
if (current_window != nullptr && current_window->m_bIsFloating) {
|
||||
if (current_window->m_bIsFloating) {
|
||||
auto* next_window = g_pCompositor->getWindowInDirection(
|
||||
current_window,
|
||||
direction == ShiftDirection::Left ? 'l'
|
||||
|
@ -953,6 +955,7 @@ void Hy3Layout::shiftFocus(int workspace, ShiftDirection direction, bool visible
|
|||
if (next_window != nullptr) g_pCompositor->focusWindow(next_window);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
auto* node = this->getWorkspaceFocusedNode(workspace);
|
||||
if (node == nullptr) return;
|
||||
|
|
Loading…
Add table
Reference in a new issue