Fix compilation with older XShape (#132310).
svn path=/trunk/KDE/kdebase/workspace/; revision=573246
This commit is contained in:
parent
48fd383949
commit
093617aafb
3 changed files with 9 additions and 5 deletions
|
@ -438,7 +438,7 @@ void Client::updateShape()
|
|||
XShapeCombineMask( display(), frameId(), ShapeBounding, 0, 0,
|
||||
None, ShapeSet);
|
||||
}
|
||||
if( Shape::major() > 1 || Shape::minor() >= 1 ) // has input shape support
|
||||
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)
|
||||
|
|
|
@ -76,7 +76,7 @@ void Shape::init()
|
|||
int major, minor;
|
||||
if( !XShapeQueryVersion( display(), &major, &minor ))
|
||||
return;
|
||||
kwin_shape_version = major * 16 + minor;
|
||||
kwin_shape_version = major * 0x10 + minor;
|
||||
}
|
||||
|
||||
void Motif::readFlags( WId w, bool& noborder, bool& resize, bool& move,
|
||||
|
|
10
utils.h
10
utils.h
|
@ -113,16 +113,20 @@ class Shape
|
|||
{
|
||||
public:
|
||||
static bool available() { return kwin_shape_version > 0; }
|
||||
static int major() { return kwin_shape_version / 16; }
|
||||
static int minor() { return kwin_shape_version % 16; }
|
||||
static int version() { return kwin_shape_version; } // as 16*major+minor, i.e. two hex digits
|
||||
static bool hasShape( WId w);
|
||||
static int shapeEvent();
|
||||
static void init();
|
||||
private:
|
||||
static int kwin_shape_version; // as 16*major+minor
|
||||
static int kwin_shape_version;
|
||||
static int kwin_shape_event;
|
||||
};
|
||||
|
||||
// compile with XShape older than 1.0
|
||||
#ifndef ShapeInput
|
||||
const int ShapeInput = 2;
|
||||
#endif
|
||||
|
||||
class Motif
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue