diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-21 19:28:43 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-21 19:28:43 +0100 |
| commit | 3d61738d5d4bec859748552869a833382fe324f5 (patch) | |
| tree | 9b75ef94e7dc43899b3c399096931e06db1d4f4b /src | |
| parent | 295a0c4a6904b639ae406df2f106eb35d71899ae (diff) | |
minor QoL patches
Diffstat (limited to 'src')
| -rw-r--r-- | src/events/Windows.cpp | 5 | ||||
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 3 | ||||
| -rw-r--r-- | src/managers/InputManager.cpp | 4 | ||||
| -rw-r--r-- | src/managers/InputManager.hpp | 1 | ||||
| -rw-r--r-- | src/managers/XWaylandManager.cpp | 1 |
5 files changed, 12 insertions, 2 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 3777e28d..286be875 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -61,13 +61,16 @@ void Events::listener_unmapWindow(wl_listener* listener, void* data) { g_pCompositor->removeWindowFromVectorSafe(PWINDOW); + // refocus on a new window + g_pInputManager->refocus(); + Debug::log(LOG, "Window %x unmapped", PWINDOW); } void Events::listener_commitWindow(wl_listener* listener, void* data) { CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_commitWindow); - PWINDOW; + Debug::log(LOG, "Window %x committed", PWINDOW); } void Events::listener_destroyWindow(wl_listener* listener, void* data) { diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 5d598c24..7b02502b 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -185,6 +185,9 @@ void CHyprDwindleLayout::onWindowCreated(CWindow* pWindow) { PNODE->pParent = NEWPARENT; NEWPARENT->recalcSizePosRecursive(); + + applyNodeDataToWindow(PNODE); + applyNodeDataToWindow(OPENINGON); } void CHyprDwindleLayout::onWindowRemoved(CWindow* pWindow) { diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp index af1a3856..d39767e0 100644 --- a/src/managers/InputManager.cpp +++ b/src/managers/InputManager.cpp @@ -193,4 +193,8 @@ void CInputManager::onKeyboardKey(wlr_event_keyboard_key* e, SKeyboard* pKeyboar void CInputManager::onKeyboardMod(void* data, SKeyboard* pKeyboard) { wlr_seat_set_keyboard(g_pCompositor->m_sWLRSeat, pKeyboard->keyboard); wlr_seat_keyboard_notify_modifiers(g_pCompositor->m_sWLRSeat, &pKeyboard->keyboard->keyboard->modifiers); +} + +void CInputManager::refocus() { + mouseMoveUnified(0); }
\ No newline at end of file diff --git a/src/managers/InputManager.hpp b/src/managers/InputManager.hpp index ce1afcea..2a83fb6b 100644 --- a/src/managers/InputManager.hpp +++ b/src/managers/InputManager.hpp @@ -20,6 +20,7 @@ public: void destroyMouse(wlr_input_device*); Vector2D getMouseCoordsInternal(); + void refocus(); // for dragging floating windows diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 46e7a84b..ac183023 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -69,7 +69,6 @@ void CHyprXWaylandManager::sendCloseWindow(CWindow* pWindow) { void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, const Vector2D& size) { if (pWindow->m_bIsX11) wlr_xwayland_surface_configure(pWindow->m_uSurface.xwayland, pWindow->m_vRealPosition.x, pWindow->m_vRealPosition.y, size.x, size.y); - else wlr_xdg_toplevel_set_size(pWindow->m_uSurface.xdg->toplevel, size.x, size.y); } |
