diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-22 22:22:59 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-22 22:22:59 +0100 |
| commit | f82fdb012e20c7c24c1f72fc140a9ebe7e58e25c (patch) | |
| tree | 3764a3bdeb6d0fdb697708a9304bbac65325ac33 /src | |
| parent | 53388ad8a45a87512044c14b332421aae6120262 (diff) | |
fix dwindle + minor logs and comments
Diffstat (limited to 'src')
| -rw-r--r-- | src/events/Windows.cpp | 4 | ||||
| -rw-r--r-- | src/managers/InputManager.cpp | 2 | ||||
| -rw-r--r-- | src/managers/KeybindManager.cpp | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index af0867a1..f41300fa 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -56,7 +56,6 @@ void Events::listener_unmapWindow(wl_listener* listener, void* data) { g_pCompositor->m_pLastFocus = nullptr; PWINDOW->m_bMappedX11 = false; - PWINDOW->m_bIsMapped = false; // remove the fullscreen window status from workspace if we closed it const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID); @@ -66,6 +65,9 @@ void Events::listener_unmapWindow(wl_listener* listener, void* data) { g_pLayoutManager->getCurrentLayout()->onWindowRemoved(PWINDOW); + // do this after onWindowRemoved because otherwise it'll think the window is invalid + PWINDOW->m_bIsMapped = false; + // refocus on a new window // TODO: investigate. // If a parent window has focus, any popups (XWayland) will be broken (they will disappear instantly) diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp index 03f47bcd..5e64dea4 100644 --- a/src/managers/InputManager.cpp +++ b/src/managers/InputManager.cpp @@ -186,6 +186,8 @@ void CInputManager::onKeyboardKey(wlr_event_keyboard_key* e, SKeyboard* pKeyboar bool found = false; if (e->state == WL_KEYBOARD_KEY_STATE_PRESSED) { + Debug::log(LOG, "Pressed key %i, with the MODMASK being %i", e->keycode, MODS); + for (int i = 0; i < syms; ++i) found = g_pKeybindManager->handleKeybinds(MODS, keysyms[i]) || found; } else if (e->state == WL_KEYBOARD_KEY_STATE_RELEASED) { diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index a26a943b..49afd31d 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -35,7 +35,9 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const xkb_keysym_t // oMg such performance hit!!11! // this little maneouver is gonna cost us 4µs const auto KBKEY = xkb_keysym_from_name(k.key.c_str(), XKB_KEYSYM_CASE_INSENSITIVE); - + // TODO: fix this with shift, shift makes all the keys uppercase + // if (shift) KBKEY -= someindex + if (key != KBKEY) continue; |
