Commit d3948555 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Rename Toplevel::geom to Toplevel::m_frameGeometry

Summary: The new name better reflects what Toplevel::geom is.

Test Plan: Compiles, tests still pass.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25738
parent d6469fb5
......@@ -1308,13 +1308,13 @@ void Unmanaged::configureNotifyEvent(xcb_configure_notify_event_t *e)
if (effects)
static_cast<EffectsHandlerImpl*>(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);
}
......
......@@ -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
......
......@@ -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();
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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;
}
......
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment