prevent early segfaults on default mouse pos
Some checks failed
Build Hyprland / Build Hyprland (Arch) (push) Has been cancelled
Build Hyprland / Build Hyprland with Meson (Arch) (push) Has been cancelled
Build Hyprland / Build Hyprland in pure Wayland (Arch) (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix) (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix)-1 (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix)-2 (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix)-3 (push) Has been cancelled
Nix: update lockfile / update (push) Has been cancelled
Some checks failed
Build Hyprland / Build Hyprland (Arch) (push) Has been cancelled
Build Hyprland / Build Hyprland with Meson (Arch) (push) Has been cancelled
Build Hyprland / Build Hyprland in pure Wayland (Arch) (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix) (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix)-1 (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix)-2 (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix)-3 (push) Has been cancelled
Nix: update lockfile / update (push) Has been cancelled
This commit is contained in:
parent
328e034472
commit
ce632b7a05
1 changed files with 4 additions and 2 deletions
|
|
@ -94,8 +94,10 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
|
|||
g_pCompositor->scheduleFrameForMonitor(PNEWMONITOR);
|
||||
|
||||
if (firstLaunch) {
|
||||
firstLaunch = false;
|
||||
g_pCompositor->warpCursorTo(PNEWMONITOR->vecPosition + PNEWMONITOR->vecSize / 2.f, true);
|
||||
firstLaunch = false;
|
||||
const auto POS = PNEWMONITOR->vecPosition + PNEWMONITOR->vecSize / 2.f;
|
||||
if (g_pCompositor->m_sSeat.mouse)
|
||||
wlr_cursor_warp(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, POS.x, POS.y);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue