Set the constraint position to the window center (properly)

Missed one expression, it was set to the bottom middle. I missed it because i don't have an extra monitor extending from the bottom of that screen.
This commit is contained in:
Sebastian Ouellette 2022-06-19 16:54:59 -04:00 committed by GitHub
parent 95e083dbd3
commit dc84935059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
// XWayland, we just have to accept them. Might cause issues, but thats XWayland for ya. // XWayland, we just have to accept them. Might cause issues, but thats XWayland for ya.
const auto CONSTRAINTSIZE = CONSTRAINTWINDOW->m_bIsX11 ? Vector2D(CONSTRAINTWINDOW->m_uSurface.xwayland->width, CONSTRAINTWINDOW->m_uSurface.xwayland->height) : CONSTRAINTWINDOW->m_vRealSize.vec(); const auto CONSTRAINTSIZE = CONSTRAINTWINDOW->m_bIsX11 ? Vector2D(CONSTRAINTWINDOW->m_uSurface.xwayland->width, CONSTRAINTWINDOW->m_uSurface.xwayland->height) : CONSTRAINTWINDOW->m_vRealSize.vec();
const auto CONSTRAINTPOS = Vector2D((CONSTRAINTWINDOW->m_uSurface.xwayland->x + CONSTRAINTSIZE.x) / 2.0, (CONSTRAINTWINDOW->m_uSurface.xwayland->y + CONSTRAINTSIZE.y)); const auto CONSTRAINTPOS = Vector2D((CONSTRAINTWINDOW->m_uSurface.xwayland->x + CONSTRAINTSIZE.x) / 2.0, (CONSTRAINTWINDOW->m_uSurface.xwayland->y + CONSTRAINTSIZE.y) / 2.0);
// I'm a worm and I added some code to override some annoying stuff :) // I'm a worm and I added some code to override some annoying stuff :)