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:
parent
c60b3cb2ed
commit
457617b5a3
3 changed files with 23 additions and 19 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue