Merging from old trunk:
r573246 | lunakl | 2006-08-15 14:48:37 +0200 (Tue, 15 Aug 2006) | 3 lines Fix compilation with older XShape (#132310). svn path=/trunk/KDE/kdebase/workspace/; revision=659279
This commit is contained in:
parent
638de5e338
commit
04d5294afa
3 changed files with 9 additions and 5 deletions
|
@ -475,7 +475,7 @@ void Client::updateShape()
|
|||
XShapeCombineMask( display(), frameId(), ShapeBounding, 0, 0,
|
||||
None, ShapeSet);
|
||||
}
|
||||
if( Extensions::shapeMajor() > 1 || Extensions::shapeMinor() >= 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)
|
||||
|
|
|
@ -63,7 +63,7 @@ void Extensions::init()
|
|||
{
|
||||
int major, minor;
|
||||
if( XShapeQueryVersion( display(), &major, &minor ))
|
||||
shape_version = major * 16 + minor;
|
||||
shape_version = major * 0x10 + minor;
|
||||
}
|
||||
#ifdef HAVE_XRANDR
|
||||
has_randr = XRRQueryExtension( display(), &randr_event_base, &dummy );
|
||||
|
|
10
utils.h
10
utils.h
|
@ -149,8 +149,7 @@ class Extensions
|
|||
public:
|
||||
static void init();
|
||||
static bool shapeAvailable() { return shape_version > 0; }
|
||||
static int shapeMajor() { return shape_version / 16; }
|
||||
static int shapeMinor() { return shape_version % 16; }
|
||||
static int shapeVersion() { return shape_version; } // as 16*major+minor, i.e. two hex digits
|
||||
static int shapeNotifyEvent();
|
||||
static bool randrAvailable() { return has_randr; }
|
||||
static int randrNotifyEvent();
|
||||
|
@ -161,7 +160,7 @@ class Extensions
|
|||
static bool fixesAvailable() { return has_fixes; }
|
||||
static bool hasShape( Window w );
|
||||
private:
|
||||
static int shape_version; // as 16*major+minor
|
||||
static int shape_version;
|
||||
static int shape_event_base;
|
||||
static bool has_randr;
|
||||
static int randr_event_base;
|
||||
|
@ -172,6 +171,11 @@ class Extensions
|
|||
static bool has_fixes;
|
||||
};
|
||||
|
||||
// compile with XShape older than 1.0
|
||||
#ifndef ShapeInput
|
||||
const int ShapeInput = 2;
|
||||
#endif
|
||||
|
||||
class Motif
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue