diff options
author | vaxerski <[email protected]> | 2022-05-27 21:10:51 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-05-27 21:10:51 +0200 |
commit | 9b6960eb554f320492fd1414ecb9e52a3ad3b7d4 (patch) | |
tree | c5616fe9437fbd0aa3642a42350a62b4346ac93e | |
parent | 4cda50399c746e713bbc8ee5fe75e2db8ed94333 (diff) | |
download | Hyprland-0.1.0beta.tar.gz Hyprland-0.1.0beta.zip |
fix calculating stupid gdk surface offsetsv0.1.0beta
-rw-r--r-- | src/managers/XWaylandManager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index b9566ded..411c4802 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -121,8 +121,13 @@ void CHyprXWaylandManager::sendCloseWindow(CWindow* pWindow) { void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, const Vector2D& size) { if (pWindow->m_bIsX11) wlr_xwayland_surface_configure(pWindow->m_uSurface.xwayland, pWindow->m_vRealPosition.vec().x, pWindow->m_vRealPosition.vec().y, size.x, size.y); - else // vvvvv I don't know if this is fucking correct, but the fucking idea of putting shadows into a window's surface is borderline criminal. - wlr_xdg_toplevel_set_size(pWindow->m_uSurface.xdg->toplevel, size.x - pWindow->m_uSurface.xdg->current.geometry.x * 2, size.y - pWindow->m_uSurface.xdg->current.geometry.y * 2); + else { + // I don't know if this is fucking correct, but the fucking idea of putting shadows into a window's surface is borderline criminal. + const auto XDELTA = pWindow->m_uSurface.xdg->surface->current.width - pWindow->m_uSurface.xdg->current.geometry.width; + const auto YDELTA = pWindow->m_uSurface.xdg->surface->current.height - pWindow->m_uSurface.xdg->current.geometry.height; + + wlr_xdg_toplevel_set_size(pWindow->m_uSurface.xdg->toplevel, size.x - XDELTA, size.y - YDELTA * 2); + } } void CHyprXWaylandManager::setWindowStyleTiled(CWindow* pWindow, uint32_t edgez) { |