From 3842b1641fb6c8197fbc79eb0e62a66b4f1cb4c1 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 25 Jun 2022 11:20:03 +0200 Subject: allow move to 0 0 --- src/managers/KeybindManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 85fb3919..931b7225 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -954,8 +954,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; } -- cgit v1.2.3 From 45898a57c846527f942ee346682911056eec7336 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 25 Jun 2022 21:18:33 +0200 Subject: guard windows' validity in focuswindowbyclass --- src/managers/KeybindManager.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 931b7225..5ddd45a9 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -999,6 +999,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)) -- cgit v1.2.3 From 78bf88ba607d0efff0e270bc16562e2081a34037 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 26 Jun 2022 12:12:29 +0200 Subject: Added fullscreen rule --- src/managers/KeybindManager.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 5ddd45a9..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) { -- cgit v1.2.3