diff options
| author | Junxuan Liao <70618504+MikeWalrus@users.noreply.github.com> | 2024-03-06 01:56:06 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-05 17:56:06 +0000 |
| commit | f8a081b56d09ec325ac485a0f055e541146486d3 (patch) | |
| tree | 18ac03f3d82a3bc356db0ab1e422c97e0ff6689a /src/layout/IHyprLayout.cpp | |
| parent | bdfa8ab856b889f92240684680cb3fdbdc41fb3d (diff) | |
layout: warp the cursor when focusing windows (#4982)
Similar to the `focuswindow` dispatcher, when focusing a window with
wlr-foreign-toplevel-management, the cursor should be warped. Otherwise, the
focus is lost immediately after the cursor moves.
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
| -rw-r--r-- | src/layout/IHyprLayout.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index d48f15fa..2a84b024 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -593,6 +593,7 @@ void IHyprLayout::bringWindowToTop(CWindow* pWindow) { void IHyprLayout::requestFocusForWindow(CWindow* pWindow) { bringWindowToTop(pWindow); g_pCompositor->focusWindow(pWindow); + g_pCompositor->warpCursorTo(pWindow->middle()); } Vector2D IHyprLayout::predictSizeForNewWindow() { |
