aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/events/Monitors.cpp
diff options
context:
space:
mode:
authormemchr <[email protected]>2023-09-11 09:09:34 +0000
committerGitHub <[email protected]>2023-09-11 10:09:34 +0100
commite96e0dc02d9368580100bbabd8f098746a42af6b (patch)
tree72853f4b696bc5c90b26d9cfb713772c04b9b8a8 /src/events/Monitors.cpp
parent3859607b6cf26ead21f4a23ee11458b7b67fe542 (diff)
downloadHyprland-e96e0dc02d9368580100bbabd8f098746a42af6b.tar.gz
Hyprland-e96e0dc02d9368580100bbabd8f098746a42af6b.zip
refactor: utilize 'middle()' method for window/montior center (#3253)
Diffstat (limited to 'src/events/Monitors.cpp')
-rw-r--r--src/events/Monitors.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp
index 8e45364a..88ba612d 100644
--- a/src/events/Monitors.cpp
+++ b/src/events/Monitors.cpp
@@ -98,7 +98,7 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
g_pHyprRenderer->m_pMostHzMonitor = PNEWMONITOR;
- const auto POS = PNEWMONITOR->vecPosition + PNEWMONITOR->vecSize / 2.f;
+ const auto POS = PNEWMONITOR->middle();
if (g_pCompositor->m_sSeat.mouse)
wlr_cursor_warp(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, POS.x, POS.y);
}
@@ -112,7 +112,7 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
if (firstLaunch) {
firstLaunch = false;
- const auto POS = PNEWMONITOR->vecPosition + PNEWMONITOR->vecSize / 2.f;
+ const auto POS = PNEWMONITOR->middle();
if (g_pCompositor->m_sSeat.mouse)
wlr_cursor_warp(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, POS.x, POS.y);
} else {