Fixed oversized apps' incorrect layout
This commit is contained in:
parent
499d2e41bf
commit
770bada5d5
8 changed files with 90 additions and 22 deletions
|
|
@ -443,7 +443,11 @@ wlr_surface* CCompositor::vectorWindowToSurface(const Vector2D& pos, CWindow* pW
|
|||
|
||||
double subx, suby;
|
||||
|
||||
const auto PFOUND = wlr_xdg_surface_surface_at(PSURFACE, pos.x - pWindow->m_vRealPosition.vec().x, pos.y - pWindow->m_vRealPosition.vec().y, &subx, &suby);
|
||||
// calc for oversized windows... fucking bullshit, again.
|
||||
wlr_box geom;
|
||||
wlr_xdg_surface_get_geometry(pWindow->m_uSurface.xdg, &geom);
|
||||
|
||||
const auto PFOUND = wlr_xdg_surface_surface_at(PSURFACE, pos.x - pWindow->m_vRealPosition.vec().x + geom.x, pos.y - pWindow->m_vRealPosition.vec().y + geom.y, &subx, &suby);
|
||||
|
||||
if (PFOUND) {
|
||||
sl.x = subx;
|
||||
|
|
@ -454,6 +458,9 @@ wlr_surface* CCompositor::vectorWindowToSurface(const Vector2D& pos, CWindow* pW
|
|||
sl.x = pos.x - pWindow->m_vRealPosition.vec().x;
|
||||
sl.y = pos.y - pWindow->m_vRealPosition.vec().y;
|
||||
|
||||
sl.x += geom.x;
|
||||
sl.y += geom.y;
|
||||
|
||||
return PSURFACE->surface;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue