diff --git a/client.cpp b/client.cpp index 7f04ad530c..3aea6d41b4 100644 --- a/client.cpp +++ b/client.cpp @@ -401,10 +401,6 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags info = new WinInfo( this, qt_xdisplay(), win, qt_xrootwin(), properties ); - XWindowAttributes attr; - if (XGetWindowAttributes(qt_xdisplay(), win, &attr)){ - original_geometry.setRect(attr.x, attr.y, attr.width, attr.height ); - } mapped = 0; wwrap = new WindowWrapper( w, this ); wwrap->installEventFilter( this ); @@ -474,6 +470,11 @@ bool Client::manage( bool isMapped, bool doNotShow ) if (layout()) layout()->setResizeMode( QLayout::Minimum ); + + XWindowAttributes attr; + if (XGetWindowAttributes(qt_xdisplay(), win, &attr)) + original_geometry.setRect(attr.x, attr.y, attr.width, attr.height ); + QRect geom( original_geometry ); bool placementDone = FALSE; diff --git a/workspace.cpp b/workspace.cpp index 1d6be0e988..5d2b9957db 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -2669,7 +2669,8 @@ void Workspace::updateClientArea() r.pos.y = area.y(); r.size.width = area.width(); r.size.height = area.height(); - for( int i = 0; i < numberOfDesktops(); i++) { + for( int i = 1; i <= numberOfDesktops(); i++) { + qDebug("setWorkArea %d to %d %d %d %d", i, area.x(), area.y(), area.width(), area.height() ); rootInfo->setWorkArea( i, r ); } }