tag #391357 +patch thanks On Friday 06 October 2006 18:20, Arthur Marsh wrote: > Package: kwin > Version: 4:3.5.5-1 > Followup-For: Bug #391357 > > > I can confirm that I use "focus follows mouse" here, and my > problem behavious with kwin 4:3.5.5-1 was consistent with > what the other poster reported.
I have tried looking at the differnces between kwin3.5.4 and kde3.5.5. It is the fix for kde-bug/feature http://bugs.kde.org/122425 that is the 'bad guy' in this context. Trying to revert most of it, I have now produced a working kwin. Patch attached. If anyone wants a working package, they can try http://mirror.pusling.com/kwin_3.5.5-1_i386.deb $ md5sum kwin_3.5.5-1_i386.deb 75ec07a6126721e7c97cd764d7056fad kwin_3.5.5-1_i386.deb (if people wants to try on another arch, just drop this into debian/patches and build) /Sune -- Man, do you know how may I get access over a monitor of the shell? First from the file inside ICQ XP you must ping the desktop.
diff -u kdebase-3.5.4.unpatched/kwin/client.cpp kdebase-3.5.4.unpatched/kwin/client.cpp --- kdebase-3.5.4.unpatched/kwin/client.cpp 2006-05-22 20:13:01.000000000 +0200 +++ kdebase-3.5.4.unpatched/kwin/client.cpp 2006-05-22 20:13:01.000000000 +0200 @@ -272,7 +271,6 @@ destroyDecoration(); if( !noBorder()) { - setMask( QRegion()); // reset shape mask decoration = workspace()->createDecoration( bridge ); // TODO check decoration's minimum size? decoration->init(); @@ -506,7 +504,6 @@ xrects, rects.count(), ShapeSet, mode ); delete[] xrects; } - updateShape(); } QRegion Client::mask() const diff -Naur kdebase-3.5.5/kwin/client.cpp kdebase-3.5.4.unpatched/kwin/client.cpp --- kdebase-3.5.5/kwin/client.cpp 2006-10-01 19:32:07.000000000 +0200 +++ kdebase-3.5.4.unpatched/kwin/client.cpp 2006-05-22 20:13:01.000000000 +0200 @@ -460,35 +458,24 @@ void Client::updateShape() { + setShapable(TRUE); + if ( shape() ) + { + XShapeCombineShape(qt_xdisplay(), frameId(), ShapeBounding, + clientPos().x(), clientPos().y(), + window(), ShapeBounding, ShapeSet); + } + else + { + XShapeCombineMask( qt_xdisplay(), frameId(), ShapeBounding, 0, 0, + None, ShapeSet); + } // workaround for #19644 - shaped windows shouldn't have decoration if( shape() && !noBorder()) { noborder = true; updateDecoration( true ); } - if ( shape() ) - { - XShapeCombineShape(qt_xdisplay(), frameId(), ShapeBounding, - clientPos().x(), clientPos().y(), - window(), ShapeBounding, ShapeSet); - setShapable(TRUE); - } - // !shape() mask setting is done in setMask() when the decoration - // calls it or when the decoration is created/destroyed - - if( Shape::version() >= 0x11 ) // 1.1, has input shape support - { // there appears to be no way to find out if a window has input - // shape set or not, so always set propagate the input shape - // (it's the same like the bounding shape by default) - XShapeCombineShape( qt_xdisplay(), frameId(), ShapeInput, 0, 0, - frameId(), ShapeBounding, ShapeSet ); - XShapeCombineShape( qt_xdisplay(), frameId(), ShapeInput, - clientPos().x(), clientPos().y(), - window(), ShapeBounding, ShapeSubtract ); - XShapeCombineShape( qt_xdisplay(), frameId(), ShapeInput, - clientPos().x(), clientPos().y(), - window(), ShapeInput, ShapeUnion ); - } } void Client::setMask( const QRegion& reg, int mode ) diff -Naur kdebase-3.5.5/kwin/geometry.cpp kdebase-3.5.4.unpatched/kwin/geometry.cpp --- kdebase-3.5.5/kwin/geometry.cpp 2006-10-01 19:32:07.000000000 +0200 +++ kdebase-3.5.4.unpatched/kwin/geometry.cpp 2006-07-22 10:15:54.000000000 +0200 @@ -1709,7 +1709,8 @@ cs.width(), cs.height()); XMoveResizeWindow( qt_xdisplay(), window(), 0, 0, cs.width(), cs.height()); } - updateShape(); + if( shape()) + updateShape(); // SELI TODO won't this be too expensive? updateWorkareaDiffs(); sendSyntheticConfigureNotify(); @@ -1763,7 +1764,8 @@ cs.width(), cs.height()); XMoveResizeWindow( qt_xdisplay(), window(), 0, 0, cs.width(), cs.height()); } - updateShape(); + if( shape()) + updateShape(); updateWorkareaDiffs(); sendSyntheticConfigureNotify(); updateWindowRules(); diff -Naur kdebase-3.5.5/kwin/manage.cpp kdebase-3.5.4.unpatched/kwin/manage.cpp --- kdebase-3.5.5/kwin/manage.cpp 2006-10-01 19:32:07.000000000 +0200 +++ kdebase-3.5.4.unpatched/kwin/manage.cpp 2006-07-22 10:15:54.000000000 +0200 @@ -316,8 +316,12 @@ keepInArea( area, partial_keep_in_area ); XShapeSelectInput( qt_xdisplay(), window(), ShapeNotifyMask ); - is_shape = Shape::hasShape( window()); - updateShape(); + if ( (is_shape = Shape::hasShape( window())) ) + { + updateShape(); + } +// else +// setShapable(FALSE); //CT extra check for stupid jdk 1.3.1. But should make sense in general // if client has initial state set to Iconic and is transient with a parent diff -Naur kdebase-3.5.5/kwin/utils.cpp kdebase-3.5.4.unpatched/kwin/utils.cpp --- kdebase-3.5.5/kwin/utils.cpp 2006-10-01 19:32:07.000000000 +0200 +++ kdebase-3.5.4.unpatched/kwin/utils.cpp 2006-05-22 20:13:01.000000000 +0200 @@ -44,7 +44,7 @@ // used to store the return values of // XShapeQueryExtension. // Necessary since shaped window are an extension to X -int Shape::kwin_shape_version = 0; +int Shape::kwin_has_shape = 0; int Shape::kwin_shape_event = 0; // does the window w need a shape combine mask around it? @@ -53,7 +53,7 @@ int xws, yws, xbs, ybs; unsigned int wws, hws, wbs, hbs; int boundingShaped = 0, clipShaped = 0; - if (!available()) + if (!kwin_has_shape) return FALSE; XShapeQueryExtents(qt_xdisplay(), w, &boundingShaped, &xws, &yws, &wws, &hws, @@ -68,14 +68,9 @@ void Shape::init() { - kwin_shape_version = 0; int dummy; - if( !XShapeQueryExtension(qt_xdisplay(), &kwin_shape_event, &dummy)) - return; - int major, minor; - if( !XShapeQueryVersion( qt_xdisplay(), &major, &minor )) - return; - kwin_shape_version = major * 0x10 + minor; + kwin_has_shape = + XShapeQueryExtension(qt_xdisplay(), &kwin_shape_event, &dummy); } void Motif::readFlags( WId w, bool& noborder, bool& resize, bool& move, diff -Naur kdebase-3.5.5/kwin/utils.h kdebase-3.5.4.unpatched/kwin/utils.h --- kdebase-3.5.5/kwin/utils.h 2006-10-01 19:32:07.000000000 +0200 +++ kdebase-3.5.4.unpatched/kwin/utils.h 2006-05-22 20:13:01.000000000 +0200 @@ -111,21 +111,15 @@ class Shape { public: - static bool available() { return kwin_shape_version > 0; } - static int version() { return kwin_shape_version; } // as 16*major+minor, i.e. two hex digits + static bool available() { return kwin_has_shape; } static bool hasShape( WId w); static int shapeEvent(); static void init(); private: - static int kwin_shape_version; + static int kwin_has_shape; static int kwin_shape_event; }; -// compile with XShape older than 1.0 -#ifndef ShapeInput -const int ShapeInput = 2; -#endif - class Motif { public:
pgpm4B8736y06.pgp
Description: PGP signature