summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorxDarksome <dev@darkso.me>2022-06-26 19:20:20 +0300
committerGitHub <noreply@github.com>2022-06-26 19:20:20 +0300
commit504f76112aec3625f2d67f9289a48a01bc90cb50 (patch)
treef3a4c5176a2d8f1954a7632b542f829e994c8529 /src/managers/KeybindManager.cpp
parentbe460ea9547691eb136bf8b600b67b778af47e3f (diff)
parentf1a5cb4979f312f56967888c2b1b6d2aa535bb9e (diff)
Merge branch 'hyprwm:main' into main
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp16
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))