diff options
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 85fb3919..10694e1b 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -366,14 +366,7 @@ void CKeybindManager::fullscreenActive(std::string args) { if (!g_pCompositor->windowValidMapped(PWINDOW)) return; - g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW, args == "1" ? eFullscreenMode::FULLSCREEN_MAXIMIZED : eFullscreenMode::FULLSCREEN_FULL); - - g_pXWaylandManager->setWindowFullscreen(PWINDOW, PWINDOW->m_bIsFullscreen && (args == "0" || args == "")); - // make all windows on the same workspace under the fullscreen window - for (auto& w : g_pCompositor->m_lWindows) { - if (w.m_iWorkspaceID == PWINDOW->m_iWorkspaceID) - w.m_bCreatedOverFullscreen = false; - } + g_pCompositor->setWindowFullscreen(PWINDOW, !PWINDOW->m_bIsFullscreen, args == "1" ? FULLSCREEN_MAXIMIZED : FULLSCREEN_FULL); } void CKeybindManager::moveActiveToWorkspace(std::string args) { @@ -954,8 +947,8 @@ void CKeybindManager::moveActive(std::string args) { const int X = std::stoi(newX); const int Y = std::stoi(newY); - if (X < 10 || Y < 10) { - Debug::log(ERR, "moveActive: exact args cannot be < 10"); + if (X < 0 || Y < 0) { + Debug::log(ERR, "moveActive: exact args cannot be < 0"); return; } @@ -999,6 +992,9 @@ void CKeybindManager::focusWindowByClass(std::string clazz) { std::regex classCheck(clazz); for (auto& w : g_pCompositor->m_lWindows) { + if (!w.m_bIsMapped || w.m_bHidden) + continue; + const auto windowClass = g_pXWaylandManager->getAppIDClass(&w); if (!std::regex_search(windowClass, classCheck)) |
