x11window: explicitly resize when the Xwayland scale changes
With how Xwayland scaling works, KWin assumes the window already uses the new coordinate system - but that doesn't happen until Xwayland and the client know about the new size as well. BUG: 480642
This commit is contained in:
parent
93b9fdd391
commit
c2749e3acf
2 changed files with 9 additions and 0 deletions
|
@ -1181,6 +1181,7 @@ bool X11Window::manage(xcb_window_t w, bool isMapped)
|
|||
} else {
|
||||
connect(this, &Window::surfaceChanged, this, &X11Window::associate);
|
||||
}
|
||||
connect(kwinApp(), &Application::xwaylandScaleChanged, this, &X11Window::handleXwaylandScaleChanged);
|
||||
break;
|
||||
case Application::OperationModeX11:
|
||||
break;
|
||||
|
@ -3897,6 +3898,13 @@ void X11Window::sendSyntheticConfigureNotify()
|
|||
xcb_flush(kwinApp()->x11Connection());
|
||||
}
|
||||
|
||||
void X11Window::handleXwaylandScaleChanged()
|
||||
{
|
||||
// while KWin implicitly considers the window already resized when the scale changes,
|
||||
// this is needed to make Xwayland actually resize it as well
|
||||
resize(moveResizeGeometry().size());
|
||||
}
|
||||
|
||||
QPointF X11Window::gravityAdjustment(xcb_gravity_t gravity) const
|
||||
{
|
||||
qreal dx = 0;
|
||||
|
|
|
@ -430,6 +430,7 @@ private:
|
|||
QWindow *findInternalWindow() const;
|
||||
void checkOutput();
|
||||
void associate();
|
||||
void handleXwaylandScaleChanged();
|
||||
|
||||
Xcb::Window m_client;
|
||||
Xcb::Window m_wrapper;
|
||||
|
|
Loading…
Reference in a new issue