mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 05:06:00 +01:00
Bring floated to top on click
This commit is contained in:
parent
c21881be25
commit
59b96f782b
1 changed files with 4 additions and 0 deletions
|
@ -121,6 +121,10 @@ void CInputManager::onMouseButton(wlr_pointer_button_event* e) {
|
||||||
case WLR_BUTTON_PRESSED:
|
case WLR_BUTTON_PRESSED:
|
||||||
refocus();
|
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")) {
|
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();
|
currentlyDraggedWindow = g_pCompositor->windowFromCursor();
|
||||||
dragButton = e->button;
|
dragButton = e->button;
|
||||||
|
|
Loading…
Reference in a new issue