mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-18 10:42:09 +01:00
prevent early segfaults on default mouse pos
This commit is contained in:
parent
328e034472
commit
ce632b7a05
1 changed files with 4 additions and 2 deletions
|
@ -95,7 +95,9 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
|
|||
|
||||
if (firstLaunch) {
|
||||
firstLaunch = false;
|
||||
g_pCompositor->warpCursorTo(PNEWMONITOR->vecPosition + PNEWMONITOR->vecSize / 2.f, true);
|
||||
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
Reference in a new issue