diff --git a/effects/logout/logout.cpp b/effects/logout/logout.cpp index ff2602e3fb..998355ff3f 100644 --- a/effects/logout/logout.cpp +++ b/effects/logout/logout.cpp @@ -144,6 +144,7 @@ void LogoutEffect::prePaintScreen(ScreenPrePaintData& data, int time) data.mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; } + data.paint |= effects->clientArea(FullArea, 0, 0); effects->prePaintScreen(data, time); } diff --git a/eglonxbackend.cpp b/eglonxbackend.cpp index f1d73e4ab9..d7b5481682 100644 --- a/eglonxbackend.cpp +++ b/eglonxbackend.cpp @@ -285,15 +285,8 @@ void EglOnXBackend::present() if (lastDamage().isEmpty()) return; - if (supportsBufferAge()) { - eglSwapBuffers(dpy, surface); - eglQuerySurface(dpy, surface, EGL_BUFFER_AGE_EXT, &m_bufferAge); - setLastDamage(QRegion()); - return; - } - const QRegion displayRegion(0, 0, displayWidth(), displayHeight()); - const bool fullRepaint = (lastDamage() == displayRegion); + const bool fullRepaint = supportsBufferAge() || (lastDamage() == displayRegion); if (fullRepaint || !surfaceHasSubPost) { if (gs_tripleBufferNeedsDetection) { @@ -321,6 +314,9 @@ void EglOnXBackend::present() setBlocksForRetrace(result == 'd'); } } + if (supportsBufferAge()) { + eglQuerySurface(dpy, surface, EGL_BUFFER_AGE_EXT, &m_bufferAge); + } } else { // a part of the screen changed, and we can use eglPostSubBufferNV to copy the updated area foreach (const QRect & r, lastDamage().rects()) { @@ -329,8 +325,10 @@ void EglOnXBackend::present() } setLastDamage(QRegion()); - eglWaitGL(); - xcb_flush(connection()); + if (!supportsBufferAge()) { + eglWaitGL(); + xcb_flush(connection()); + } } void EglOnXBackend::screenGeometryChanged(const QSize &size) diff --git a/geometry.cpp b/geometry.cpp index 7a135bc6c4..6ae9666873 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -3120,6 +3120,8 @@ void Client::setQuickTileMode(QuickTileMode mode, bool keyboard) if (!isResizable() && maximizeMode() != MaximizeFull) return; + GeometryUpdatesBlocker blocker(this); + if (mode == QuickTileMaximize) { TabSynchronizer syncer(this, TabGroup::QuickTile|TabGroup::Geometry|TabGroup::Maximized); quick_tile_mode = QuickTileNone; diff --git a/glxbackend.cpp b/glxbackend.cpp index 326dfcf0fb..6944dfdf84 100644 --- a/glxbackend.cpp +++ b/glxbackend.cpp @@ -443,15 +443,8 @@ void GlxBackend::present() if (lastDamage().isEmpty()) return; - if (supportsBufferAge()) { - glXSwapBuffers(display(), glxWindow); - glXQueryDrawable(display(), glxWindow, GLX_BACK_BUFFER_AGE_EXT, (GLuint *) &m_bufferAge); - setLastDamage(QRegion()); - return; - } - const QRegion displayRegion(0, 0, displayWidth(), displayHeight()); - const bool fullRepaint = (lastDamage() == displayRegion); + const bool fullRepaint = supportsBufferAge() || (lastDamage() == displayRegion); if (fullRepaint) { if (haveSwapInterval) { @@ -483,6 +476,9 @@ void GlxBackend::present() waitSync(); glXSwapBuffers(display(), glxWindow); } + if (supportsBufferAge()) { + glXQueryDrawable(display(), glxWindow, GLX_BACK_BUFFER_AGE_EXT, (GLuint *) &m_bufferAge); + } } else if (glXCopySubBuffer) { foreach (const QRect & r, lastDamage().rects()) { // convert to OpenGL coordinates @@ -495,9 +491,11 @@ void GlxBackend::present() glDrawBuffer(GL_BACK); } - glXWaitGL(); setLastDamage(QRegion()); - XFlush(display()); + if (!supportsBufferAge()) { + glXWaitGL(); + XFlush(display()); + } } void GlxBackend::screenGeometryChanged(const QSize &size) diff --git a/manage.cpp b/manage.cpp index b4ebcb8edf..afeccd7a3e 100644 --- a/manage.cpp +++ b/manage.cpp @@ -29,6 +29,7 @@ along with this program. If not, see . #include "activities.h" #endif #include "cursor.h" +#include "decorations.h" #include #include "rules.h" #include "group.h" @@ -319,7 +320,7 @@ bool Client::manage(xcb_window_t w, bool isMapped) // Create client group if the window will have a decoration bool dontKeepInArea = false; setTabGroup(NULL); - if (!noBorder()) { + if (!noBorder() && DecorationPlugin::self()->supportsTabbing()) { const bool autogrouping = rules()->checkAutogrouping(options->isAutogroupSimilarWindows()); const bool autogroupInFg = rules()->checkAutogroupInForeground(options->isAutogroupInForeground()); // Automatically add to previous groups on session restore diff --git a/sm.cpp b/sm.cpp index e02d37d109..5c73d47fc6 100644 --- a/sm.cpp +++ b/sm.cpp @@ -129,7 +129,6 @@ void Workspace::storeClient(KConfigGroup &cg, int num, Client *c) cg.writeEntry(QStringLiteral("sessionId") + n, c->sessionId().constData()); cg.writeEntry(QStringLiteral("windowRole") + n, c->windowRole().constData()); cg.writeEntry(QStringLiteral("wmCommand") + n, c->wmCommand().constData()); - cg.writeEntry(QStringLiteral("wmClientMachine") + n, c->wmClientMachine(true).constData()); cg.writeEntry(QStringLiteral("resourceName") + n, c->resourceName().constData()); cg.writeEntry(QStringLiteral("resourceClass") + n, c->resourceClass().constData()); cg.writeEntry(QStringLiteral("geometry") + n, QRect(c->calculateGravitation(true), c->clientSize())); // FRAME @@ -216,7 +215,6 @@ void Workspace::addSessionInfo(KConfigGroup &cg) info->sessionId = cg.readEntry(QStringLiteral("sessionId") + n, QString()).toLatin1(); info->windowRole = cg.readEntry(QStringLiteral("windowRole") + n, QString()).toLatin1(); info->wmCommand = cg.readEntry(QStringLiteral("wmCommand") + n, QString()).toLatin1(); - info->wmClientMachine = cg.readEntry(QStringLiteral("wmClientMachine") + n, QString()).toLatin1(); info->resourceName = cg.readEntry(QStringLiteral("resourceName") + n, QString()).toLatin1(); info->resourceClass = cg.readEntry(QStringLiteral("resourceClass") + n, QString()).toLower().toLatin1(); info->geometry = cg.readEntry(QStringLiteral("geometry") + n, QRect()); @@ -266,7 +264,6 @@ SessionInfo* Workspace::takeSessionInfo(Client* c) QByteArray sessionId = c->sessionId(); QByteArray windowRole = c->windowRole(); QByteArray wmCommand = c->wmCommand(); - QByteArray wmClientMachine = c->wmClientMachine(true); QByteArray resourceName = c->resourceName(); QByteArray resourceClass = c->resourceClass(); @@ -299,7 +296,6 @@ SessionInfo* Workspace::takeSessionInfo(Client* c) break; if (info->resourceName == resourceName && info->resourceClass == resourceClass - && info->wmClientMachine == wmClientMachine && sessionInfoWindowTypeMatch(c, info)) { if (wmCommand.isEmpty() || info->wmCommand == wmCommand) { realInfo = info; diff --git a/utils.cpp b/utils.cpp index 7661f6ca57..d5f31fa25a 100644 --- a/utils.cpp +++ b/utils.cpp @@ -127,14 +127,17 @@ QByteArray getStringProperty(xcb_window_t w, xcb_atom_t prop, char separator) return QByteArray(); } char *data = static_cast(xcb_get_property_value(property.data())); + int length = property->value_len; if (data && separator) { for (uint32_t i = 0; i < property->value_len; ++i) { if (!data[i] && i + 1 < property->value_len) { data[i] = separator; + } else { + length = i; } } } - return QByteArray(data, property->value_len); + return QByteArray(data, length); } #ifndef KCMRULES