diff --git a/client.cpp b/client.cpp index 1bca987d0a..9e09725473 100644 --- a/client.cpp +++ b/client.cpp @@ -1851,7 +1851,7 @@ void Client::mouseMoveEvent( QMouseEvent * e) if (options->showGeometryTip()) { if (!geometryTip) - geometryTip = new GeometryTip( this, &xSizeHint ); + geometryTip = new GeometryTip( this, &xSizeHint, isResize() ); geometryTip->setGeometry( geom ); if (!geometryTip->isVisible()) { @@ -1884,7 +1884,7 @@ void Client::mouseMoveEvent( QMouseEvent * e) { // Position and Size display if (!geometryTip) - geometryTip = new GeometryTip( this, &xSizeHint ); + geometryTip = new GeometryTip( this, &xSizeHint, isResize() ); geometryTip->setGeometry( geom ); if (!geometryTip->isVisible()) { diff --git a/geometrytip.cpp b/geometrytip.cpp index 5bf111eb41..26a1c06448 100644 --- a/geometrytip.cpp +++ b/geometrytip.cpp @@ -5,12 +5,15 @@ */ #include "geometrytip.h" +#include "options.h" #include using namespace KWinInternal; +extern Options* options; -GeometryTip::GeometryTip( const Client* client, const XSizeHints* xSizeHints ): + +GeometryTip::GeometryTip( const Client* client, const XSizeHints* xSizeHints, bool resizing ): QLabel(NULL, "kwingeometry", WStyle_Customize | WStyle_StaysOnTop | WStyle_NoBorder | WX11BypassWM ) { @@ -19,9 +22,15 @@ GeometryTip::GeometryTip( const Client* client, const XSizeHints* xSizeHints ): // For this to work properly have 'Option "backingstore"' set in the Screen // section of your XF86Config. (some drivers may not support saveunder, // oh well, we tried.) - XSetWindowAttributes wsa; - wsa.save_under = True; - XChangeWindowAttributes( qt_xdisplay(), winId(), CWSaveUnder, &wsa ); + + // Only do this in transparent mode, as it slows down opaque mode... + if ( (resizing && options->resizeMode == Options::Transparent) || + (!resizing && options->moveMode == Options::Transparent) ) + { + XSetWindowAttributes wsa; + wsa.save_under = True; + XChangeWindowAttributes( qt_xdisplay(), winId(), CWSaveUnder, &wsa ); + } c = client; setMargin(1); diff --git a/geometrytip.h b/geometrytip.h index b0ff460ad7..bb6418bf5a 100644 --- a/geometrytip.h +++ b/geometrytip.h @@ -16,7 +16,7 @@ class GeometryTip: public QLabel { Q_OBJECT public: - GeometryTip( const Client* client, const XSizeHints* xSizeHints ); + GeometryTip( const Client* client, const XSizeHints* xSizeHints, bool resizing ); ~GeometryTip(); void setGeometry( const QRect& geom );