Track xwayland buffer scale in X11Window
It can happen that when the xwayland scale factor changes, the logical geometry will remain the same, but the x windows still need to reconfigured to update the native geometry. In order to address that, this change makes X11Window track the buffer scale so if the logical geometry is the same, the x windows will be still reconfigured with the new xwayland scale.
This commit is contained in:
parent
3f7b26cd9a
commit
18535ea959
2 changed files with 4 additions and 1 deletions
|
@ -4359,8 +4359,9 @@ void X11Window::moveResizeInternal(const QRectF &rect, MoveResizeMode mode)
|
|||
clientGeometry = frameRectToClientRect(frameGeometry);
|
||||
}
|
||||
const QRectF bufferGeometry = frameRectToBufferRect(frameGeometry);
|
||||
const qreal bufferScale = kwinApp()->xwaylandScale();
|
||||
|
||||
if (m_bufferGeometry == bufferGeometry && m_clientGeometry == clientGeometry && m_frameGeometry == frameGeometry) {
|
||||
if (m_bufferGeometry == bufferGeometry && m_clientGeometry == clientGeometry && m_frameGeometry == frameGeometry && m_bufferScale == bufferScale) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4374,6 +4375,7 @@ void X11Window::moveResizeInternal(const QRectF &rect, MoveResizeMode mode)
|
|||
m_frameGeometry = frameGeometry;
|
||||
m_clientGeometry = clientGeometry;
|
||||
m_bufferGeometry = bufferGeometry;
|
||||
m_bufferScale = bufferScale;
|
||||
m_output = workspace()->outputAt(frameGeometry.center());
|
||||
|
||||
if (!areGeometryUpdatesBlocked()) {
|
||||
|
|
|
@ -442,6 +442,7 @@ private:
|
|||
Xcb::Window m_client;
|
||||
Xcb::Window m_wrapper;
|
||||
Xcb::Window m_frame;
|
||||
qreal m_bufferScale = 1;
|
||||
xcb_window_t m_wmClientLeader = XCB_WINDOW_NONE;
|
||||
int m_activityUpdatesBlocked;
|
||||
bool m_blockedActivityUpdatesRequireTransients;
|
||||
|
|
Loading…
Reference in a new issue