From 3f0d6b97c1ae308cdc12fe6f7fc184d2d69c97bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 8 Nov 2006 14:09:06 +0000 Subject: [PATCH] One change that was supposed to go with r603295. svn path=/trunk/KDE/kdebase/workspace/; revision=603296 --- manage.cpp | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/manage.cpp b/manage.cpp index c35b09334a..0b094d6d74 100644 --- a/manage.cpp +++ b/manage.cpp @@ -38,25 +38,17 @@ bool Client::manage( Window w, bool isMapped ) { StackingUpdatesBlocker stacking_blocker( workspace()); - grabXServer(); - XWindowAttributes attr; if( !XGetWindowAttributes(display(), w, &attr)) - { - ungrabXServer(); return false; - } + + grabXServer(); // from this place on, manage() mustn't return false postpone_geometry_updates = 1; pending_geometry_update = true; // force update when finishing with geometry changes embedClient( w, attr ); - - vis = attr.visual; - bit_depth = attr.depth; - - setupCompositing(); // SELI order all these things in some sane manner @@ -85,7 +77,6 @@ bool Client::manage( Window w, bool isMapped ) NET::WM2UserTime | NET::WM2StartupId | NET::WM2ExtendedStrut | - NET::WM2Opacity | 0; info = new WinInfo( this, display(), client, rootWindow(), properties, 2 ); @@ -114,9 +105,6 @@ bool Client::manage( Window w, bool isMapped ) setupWindowRules( false ); setCaption( cap_normal, true ); - if( Extensions::shapeAvailable()) - XShapeSelectInput( display(), window(), ShapeNotifyMask ); - detectShape( window()); detectNoBorder(); fetchIconicName(); getWMHints(); // needs to be done before readTransient() because of reading the group @@ -325,8 +313,9 @@ bool Client::manage( Window w, bool isMapped ) if(( !isSpecialWindow() || isToolbar()) && isMovable()) keepInArea( area, partial_keep_in_area ); - if( shape()) - updateShape(); + XShapeSelectInput( display(), window(), ShapeNotifyMask ); + is_shape = Shape::hasShape( window()); + updateShape(); //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 @@ -521,7 +510,7 @@ bool Client::manage( Window w, bool isMapped ) // sendSyntheticConfigureNotify(); done when setting mapping state delete session; - + ungrabXServer(); client_rules.discardTemporary(); @@ -539,7 +528,7 @@ bool Client::manage( Window w, bool isMapped ) void Client::embedClient( Window w, const XWindowAttributes &attr ) { assert( client == None ); - assert( frameId() == None ); + assert( frame == None ); assert( wrapper == None ); client = w; // we don't want the window to be destroyed when we are destroyed @@ -555,10 +544,9 @@ void Client::embedClient( Window w, const XWindowAttributes &attr ) swa.background_pixmap = None; swa.border_pixel = 0; - Window frame = XCreateWindow( display(), rootWindow(), 0, 0, 1, 1, 0, + frame = XCreateWindow( display(), rootWindow(), 0, 0, 1, 1, 0, attr.depth, InputOutput, attr.visual, CWColormap | CWBackPixmap | CWBorderPixel, &swa ); - setHandle( frame ); wrapper = XCreateWindow( display(), frame, 0, 0, 1, 1, 0, attr.depth, InputOutput, attr.visual, CWColormap | CWBackPixmap | CWBorderPixel, &swa ); @@ -577,8 +565,7 @@ void Client::embedClient( Window w, const XWindowAttributes &attr ) FocusChangeMask | ExposureMask | PropertyChangeMask | - StructureNotifyMask | SubstructureRedirectMask | - VisibilityChangeMask ); + StructureNotifyMask | SubstructureRedirectMask ); XSelectInput( display(), wrapper, ClientWinMask | SubstructureNotifyMask ); XSelectInput( display(), client, FocusChangeMask |