mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:45:59 +01:00
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.
This commit is contained in:
parent
bdfa8ab856
commit
f8a081b56d
1 changed files with 1 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue