diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-04 16:28:43 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-04 16:28:43 +0200 |
| commit | 59b96f782b828b3342f6adc3a190d6b0b99e5f8a (patch) | |
| tree | b0fc89c5f39d816c64367d4bd15051de1b50425d /src/managers/InputManager.cpp | |
| parent | c21881be252aaea61eb8d3f7192b4032f27f6f14 (diff) | |
Bring floated to top on click
Diffstat (limited to 'src/managers/InputManager.cpp')
| -rw-r--r-- | src/managers/InputManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp index e8cb19b9..32f4aca6 100644 --- a/src/managers/InputManager.cpp +++ b/src/managers/InputManager.cpp @@ -121,6 +121,10 @@ void CInputManager::onMouseButton(wlr_pointer_button_event* e) { case WLR_BUTTON_PRESSED: refocus(); + // if clicked on a floating window make it top + if (g_pCompositor->windowValidMapped(g_pCompositor->m_pLastWindow) && g_pCompositor->m_pLastWindow->m_bIsFloating) + g_pCompositor->moveWindowToTop(g_pCompositor->m_pLastWindow); + if ((e->button == BTN_LEFT || e->button == BTN_RIGHT) && wlr_keyboard_get_modifiers(PKEYBOARD) == (uint32_t)g_pConfigManager->getInt("general:main_mod_internal")) { currentlyDraggedWindow = g_pCompositor->windowFromCursor(); dragButton = e->button; |
