xwayland: normalize OR geometry to logical coords with force_zero_scaling (#13359)

Fixes X11 popups, tooltips, and menus showing black boxes on scaled monitors with xwayland:force_zero_scaling = 1 #13334
This commit is contained in:
Skidam 2026-02-25 13:29:12 +01:00 committed by GitHub
parent c60b3cb2ed
commit 457617b5a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 19 deletions

View file

@ -102,13 +102,7 @@ void CDefaultFloatingAlgorithm::newTarget(SP<ITarget> target) {
// TODO: not very OOP, is it?
if (const auto WTARGET = dynamicPointerCast<CWindowTarget>(target); WTARGET) {
static auto PXWLFORCESCALEZERO = CConfigValue<Hyprlang::INT>("xwayland:force_zero_scaling");
const auto PWINDOW = WTARGET->window();
const auto PMONITOR = WTARGET->space()->workspace()->m_monitor.lock();
if (*PXWLFORCESCALEZERO && PWINDOW->m_isX11)
*PWINDOW->m_realSize = PWINDOW->m_realSize->goal() / PMONITOR->m_scale;
const auto PWINDOW = WTARGET->window();
if (PWINDOW->m_X11DoesntWantBorders || (PWINDOW->m_isX11 && PWINDOW->isX11OverrideRedirect())) {
PWINDOW->m_realPosition->warp();