From eb71b47db430bd04b859e49e0415192ae7114a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 2 Aug 2015 14:30:30 +0200 Subject: [PATCH] only discard pixmaps when the XCB Window resized Causes invalid textures on the nvidia blob when referencing textures for crossfading eg. during maximization BUG: 324823 REVIEW: 124591 FIXED-IN: 5.4 --- geometry.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index f63e85165b..a47c5676d7 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1930,6 +1930,7 @@ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force) pending_geometry_update = PendingGeometryNormal; return; } + QSize oldClientSize = m_frame.geometry().size(); bool resized = (geom_before_block.size() != geom.size() || pending_geometry_update == PendingGeometryForced); if (resized) { resizeDecoration(); @@ -1970,7 +1971,8 @@ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force) // - maximize mode is changed to MaximizeRestore, when size unchanged // which can happen when untabbing maximized windows if (resized) { - discardWindowPixmap(); + if (oldClientSize != QSize(w,h)) + discardWindowPixmap(); emit geometryShapeChanged(this, geom_before_block); } const QRect deco_rect = visibleRect(); @@ -2020,6 +2022,7 @@ void Client::plainResize(int w, int h, ForceGeometry_t force) pending_geometry_update = PendingGeometryNormal; return; } + QSize oldClientSize = m_frame.geometry().size(); resizeDecoration(); m_frame.resize(w, h); // resizeDecoration( s ); @@ -2034,7 +2037,8 @@ void Client::plainResize(int w, int h, ForceGeometry_t force) updateWindowRules(Rules::Position|Rules::Size); screens()->setCurrent(this); workspace()->updateStackingOrder(); - discardWindowPixmap(); + if (oldClientSize != QSize(w,h)) + discardWindowPixmap(); emit geometryShapeChanged(this, geom_before_block); const QRect deco_rect = visibleRect(); addLayerRepaint(deco_rect_before_block);