From 3d61738d5d4bec859748552869a833382fe324f5 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 21 Mar 2022 19:28:43 +0100 Subject: minor QoL patches --- src/managers/InputManager.cpp | 4 ++++ src/managers/InputManager.hpp | 1 + src/managers/XWaylandManager.cpp | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/managers') 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); } -- cgit v1.2.3