From a6b4fe10072d63955332463030699f8d3260f893 Mon Sep 17 00:00:00 2001 From: Gabriel Ford Date: Sat, 27 Apr 2024 17:56:37 -0400 Subject: [PATCH] Warp cursor to newly created window if enabled. --- src/events/Windows.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 44230e2a..2b2d4695 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -667,6 +667,9 @@ void Events::listener_mapWindow(void* owner, void* data) { if (PMONITOR && PWINDOW->m_iX11Type == 2) PWINDOW->m_fX11SurfaceScaledBy = PMONITOR->scale; + + // Move cursor to middle of new window if enabled. + g_pCompositor->warpCursorTo(PWINDOW->middle()); } void Events::listener_unmapWindow(void* owner, void* data) {