Merging from old trunk:
r594160 | lunakl | 2006-10-10 12:28:32 +0200 (Tue, 10 Oct 2006) | 6 lines Build the input shape on a helper window instead of directly, this avoids having a hole in the shape temporarily. This seems to break non-click-to-focus mouse policies on some systems (works fine here though). svn path=/trunk/KDE/kdebase/workspace/; revision=659292
This commit is contained in:
parent
310de2bde5
commit
50a788d633
1 changed files with 19 additions and 6 deletions
25
client.cpp
25
client.cpp
|
@ -475,17 +475,30 @@ void Client::updateShape()
|
|||
// 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( display(), frameId(), ShapeInput, 0, 0,
|
||||
{ // There appears to be no way to find out if a window has input
|
||||
// shape set or not, so always propagate the input shape
|
||||
// (it's the same like the bounding shape by default).
|
||||
// Also, build the shape using a helper window, not directly
|
||||
// in the frame window, because the sequence set-shape-to-frame,
|
||||
// remove-shape-of-client, add-input-shape-of-client has the problem
|
||||
// that after the second step there's a hole in the input shape
|
||||
// until the real shape of the client is added and that can make
|
||||
// the window lose focus (which is a problem with mouse focus policies)
|
||||
static Window helper_window = None;
|
||||
if( helper_window == None )
|
||||
helper_window = XCreateSimpleWindow( display(), rootWindow(),
|
||||
0, 0, 1, 1, 0, 0, 0 );
|
||||
XResizeWindow( display(), helper_window, width(), height());
|
||||
XShapeCombineShape( display(), helper_window, ShapeInput, 0, 0,
|
||||
frameId(), ShapeBounding, ShapeSet );
|
||||
XShapeCombineShape( display(), frameId(), ShapeInput,
|
||||
XShapeCombineShape( display(), helper_window, ShapeInput,
|
||||
clientPos().x(), clientPos().y(),
|
||||
window(), ShapeBounding, ShapeSubtract );
|
||||
XShapeCombineShape( display(), frameId(), ShapeInput,
|
||||
XShapeCombineShape( display(), helper_window, ShapeInput,
|
||||
clientPos().x(), clientPos().y(),
|
||||
window(), ShapeInput, ShapeUnion );
|
||||
XShapeCombineShape( display(), frameId(), ShapeInput, 0, 0,
|
||||
helper_window, ShapeInput, ShapeSet );
|
||||
}
|
||||
if( compositing())
|
||||
addDamageFull();
|
||||
|
|
Loading…
Reference in a new issue