diff --git a/events.cpp b/events.cpp index cb30d74020..0b919646fa 100644 --- a/events.cpp +++ b/events.cpp @@ -1308,13 +1308,13 @@ void Unmanaged::configureNotifyEvent(xcb_configure_notify_event_t *e) if (effects) static_cast(effects)->checkInputWindowStacking(); // keep them on top QRect newgeom(e->x, e->y, e->width, e->height); - if (newgeom != geom) { + if (newgeom != m_frameGeometry) { addWorkspaceRepaint(visibleRect()); // damage old area - QRect old = geom; - geom = newgeom; + QRect old = m_frameGeometry; + m_frameGeometry = newgeom; emit geometryChanged(); // update shadow region addRepaintFull(); - if (old.size() != geom.size()) + if (old.size() != m_frameGeometry.size()) discardWindowPixmap(); emit geometryShapeChanged(this, old); } diff --git a/geometry.cpp b/geometry.cpp index 4a4f189271..cfd7e8bc6e 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1968,7 +1968,7 @@ void X11Client::setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t for if (!areGeometryUpdatesBlocked() && frameGeometry != rules()->checkGeometry(frameGeometry)) { qCDebug(KWIN_CORE) << "forced geometry fail:" << frameGeometry << ":" << rules()->checkGeometry(frameGeometry); } - geom = frameGeometry; + m_frameGeometry = frameGeometry; if (force == NormalGeometrySet && m_bufferGeometry == bufferGeometry && pendingGeometryUpdate() == PendingGeometryNone) { return; } @@ -2027,7 +2027,7 @@ void X11Client::plainResize(int w, int h, ForceGeometry_t force) if (!areGeometryUpdatesBlocked() && frameSize != rules()->checkSize(frameSize)) { qCDebug(KWIN_CORE) << "forced size fail:" << frameSize << ":" << rules()->checkSize(frameSize); } - geom.setSize(frameSize); + m_frameGeometry.setSize(frameSize); // resuming geometry updates is handled only in setGeometry() Q_ASSERT(pendingGeometryUpdate() == PendingGeometryNone || areGeometryUpdatesBlocked()); if (force == NormalGeometrySet && m_bufferGeometry.size() == bufferSize) { @@ -2100,9 +2100,9 @@ void AbstractClient::move(int x, int y, ForceGeometry_t force) if (!areGeometryUpdatesBlocked() && p != rules()->checkPosition(p)) { qCDebug(KWIN_CORE) << "forced position fail:" << p << ":" << rules()->checkPosition(p); } - if (force == NormalGeometrySet && geom.topLeft() == p) + if (force == NormalGeometrySet && m_frameGeometry.topLeft() == p) return; - geom.moveTopLeft(p); + m_frameGeometry.moveTopLeft(p); if (areGeometryUpdatesBlocked()) { if (pendingGeometryUpdate() == PendingGeometryForced) {} // maximum, nothing needed diff --git a/internal_client.cpp b/internal_client.cpp index f99a2f55c2..5cc035ec11 100644 --- a/internal_client.cpp +++ b/internal_client.cpp @@ -336,7 +336,7 @@ void InternalClient::setFrameGeometry(int x, int y, int w, int h, ForceGeometry_ const QRect rect(x, y, w, h); if (areGeometryUpdatesBlocked()) { - geom = rect; + m_frameGeometry = rect; if (pendingGeometryUpdate() == PendingGeometryForced) { // Maximum, nothing needed. } else if (force == ForceGeometrySet) { @@ -349,10 +349,10 @@ void InternalClient::setFrameGeometry(int x, int y, int w, int h, ForceGeometry_ if (pendingGeometryUpdate() != PendingGeometryNone) { // Reset geometry to the one before blocking, so that we can compare properly. - geom = frameGeometryBeforeUpdateBlocking(); + m_frameGeometry = frameGeometryBeforeUpdateBlocking(); } - if (geom == rect) { + if (m_frameGeometry == rect) { return; } @@ -622,11 +622,11 @@ void InternalClient::requestGeometry(const QRect &rect) void InternalClient::commitGeometry(const QRect &rect) { - if (geom == rect && pendingGeometryUpdate() == PendingGeometryNone) { + if (m_frameGeometry == rect && pendingGeometryUpdate() == PendingGeometryNone) { return; } - geom = rect; + m_frameGeometry = rect; m_clientSize = mapToClient(frameGeometry()).size(); diff --git a/toplevel.cpp b/toplevel.cpp index 32fed3ce22..6fef286f06 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -94,7 +94,7 @@ void Toplevel::detectShape(xcb_window_t id) void Toplevel::copyToDeleted(Toplevel* c) { m_internalId = c->internalId(); - geom = c->geom; + m_frameGeometry = c->m_frameGeometry; m_visual = c->m_visual; bit_depth = c->bit_depth; info = c->info; diff --git a/toplevel.h b/toplevel.h index a99556108d..3dea3204b5 100644 --- a/toplevel.h +++ b/toplevel.h @@ -696,7 +696,7 @@ protected: friend QDebug& operator<<(QDebug& stream, const Toplevel*); void deleteEffectWindow(); void setDepth(int depth); - QRect geom; + QRect m_frameGeometry; xcb_visualid_t m_visual; int bit_depth; NETWinInfo* info; @@ -748,37 +748,37 @@ inline void Toplevel::setWindowHandles(xcb_window_t w) inline QRect Toplevel::frameGeometry() const { - return geom; + return m_frameGeometry; } inline QSize Toplevel::size() const { - return geom.size(); + return m_frameGeometry.size(); } inline QPoint Toplevel::pos() const { - return geom.topLeft(); + return m_frameGeometry.topLeft(); } inline int Toplevel::x() const { - return geom.x(); + return m_frameGeometry.x(); } inline int Toplevel::y() const { - return geom.y(); + return m_frameGeometry.y(); } inline int Toplevel::width() const { - return geom.width(); + return m_frameGeometry.width(); } inline int Toplevel::height() const { - return geom.height(); + return m_frameGeometry.height(); } inline QRect Toplevel::rect() const diff --git a/unmanaged.cpp b/unmanaged.cpp index 098d2e5edb..bc89874947 100644 --- a/unmanaged.cpp +++ b/unmanaged.cpp @@ -69,7 +69,7 @@ bool Unmanaged::track(xcb_window_t w) } setWindowHandles(w); // the window is also the frame Xcb::selectInput(w, attr->your_event_mask | XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_PROPERTY_CHANGE); - geom = geo.rect(); + m_frameGeometry = geo.rect(); checkScreen(); m_visual = attr->visual; bit_depth = geo->depth; @@ -130,7 +130,7 @@ bool Unmanaged::hasScheduledRelease() const QRect Unmanaged::bufferGeometry() const { - return geom; + return m_frameGeometry; } int Unmanaged::desktop() const diff --git a/x11client.cpp b/x11client.cpp index 6011f45ba8..30e62711fe 100644 --- a/x11client.cpp +++ b/x11client.cpp @@ -159,7 +159,7 @@ X11Client::X11Client() //Client to workspace connections require that each //client constructed be connected to the workspace wrapper - geom = QRect(0, 0, 100, 100); // So that decorations don't start with size being (0,0) + m_frameGeometry = QRect(0, 0, 100, 100); // So that decorations don't start with size being (0,0) connect(clientMachine(), &ClientMachine::localhostChanged, this, &X11Client::updateCaption); connect(options, &Options::condensedTitleChanged, this, &X11Client::updateCaption); @@ -2874,7 +2874,7 @@ void X11Client::move(int x, int y, ForceGeometry_t force) if (!areGeometryUpdatesBlocked() && framePosition != rules()->checkPosition(framePosition)) { qCDebug(KWIN_CORE) << "forced position fail:" << framePosition << ":" << rules()->checkPosition(framePosition); } - geom.moveTopLeft(framePosition); + m_frameGeometry.moveTopLeft(framePosition); if (force == NormalGeometrySet && m_bufferGeometry.topLeft() == bufferPosition) { return; } diff --git a/xdgshellclient.cpp b/xdgshellclient.cpp index 6734b0902b..1b523c3ecf 100644 --- a/xdgshellclient.cpp +++ b/xdgshellclient.cpp @@ -95,7 +95,7 @@ void XdgShellClient::init() updateIcon(); // TODO: Initialize with null rect. - geom = QRect(0, 0, -1, -1); + m_frameGeometry = QRect(0, 0, -1, -1); m_windowGeometry = QRect(0, 0, -1, -1); if (waylandServer()->inputMethodConnection() == surface()->client()) { @@ -477,7 +477,7 @@ void XdgShellClient::setFrameGeometry(int x, int y, int w, int h, ForceGeometry_ if (areGeometryUpdatesBlocked()) { // when the GeometryUpdateBlocker exits the current geom is passed to setGeometry // thus we need to set it here. - geom = newGeometry; + m_frameGeometry = newGeometry; if (pendingGeometryUpdate() == PendingGeometryForced) { // maximum, nothing needed } else if (force == ForceGeometrySet) { @@ -490,7 +490,7 @@ void XdgShellClient::setFrameGeometry(int x, int y, int w, int h, ForceGeometry_ if (pendingGeometryUpdate() != PendingGeometryNone) { // reset geometry to the one before blocking, so that we can compare properly - geom = frameGeometryBeforeUpdateBlocking(); + m_frameGeometry = frameGeometryBeforeUpdateBlocking(); } const QSize requestedClientSize = newGeometry.size() - QSize(borderLeft() + borderRight(), borderTop() + borderBottom()); @@ -525,8 +525,8 @@ void XdgShellClient::doSetGeometry(const QRect &rect) bool frameGeometryIsChanged = false; bool bufferGeometryIsChanged = false; - if (geom != rect) { - geom = rect; + if (m_frameGeometry != rect) { + m_frameGeometry = rect; frameGeometryIsChanged = true; } @@ -540,9 +540,9 @@ void XdgShellClient::doSetGeometry(const QRect &rect) return; } - if (m_unmapped && m_geomMaximizeRestore.isEmpty() && !geom.isEmpty()) { + if (m_unmapped && m_geomMaximizeRestore.isEmpty() && !m_frameGeometry.isEmpty()) { // use first valid geometry as restore geometry - m_geomMaximizeRestore = geom; + m_geomMaximizeRestore = m_frameGeometry; } if (frameGeometryIsChanged) {