diff --git a/events.cpp b/events.cpp index f76d513f60..b5544b39fa 100644 --- a/events.cpp +++ b/events.cpp @@ -222,8 +222,7 @@ bool Workspace::workspaceEvent( XEvent * e ) if( dirty[ NETRootInfo::PROTOCOLS ] & NET::DesktopNames ) saveDesktopSettings(); if( dirty[ NETRootInfo::PROTOCOLS2 ] & NET::WM2DesktopLayout ) - setDesktopLayout( rootInfo->desktopLayoutOrientation(), rootInfo->desktopLayoutColumnsRows().width(), - rootInfo->desktopLayoutColumnsRows().height(), rootInfo->desktopLayoutCorner()); + updateDesktopLayout(); } // events that should be handled before Clients can get them diff --git a/workspace.cpp b/workspace.cpp index 6639db573b..34133644c1 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -316,6 +316,7 @@ void Workspace::init() protocols, 5, info.screen() ); loadDesktopSettings(); + updateDesktopLayout(); // extra NETRootInfo instance in Client mode is needed to get the values of the properties NETRootInfo client_info( display(), NET::ActiveWindow | NET::CurrentDesktop ); int initial_desktop; @@ -1682,12 +1683,13 @@ void Workspace::sendClientToScreen( Client* c, int screen ) active_screen = screen; } -void Workspace::setDesktopLayout(NET::Orientation o, int x, int y,NET::DesktopLayoutCorner c) +void Workspace::updateDesktopLayout() { - Q_UNUSED( c ); // I don't find this worth bothering, feel free to - layoutOrientation = ( o == NET::OrientationHorizontal ? Qt::Horizontal : Qt::Vertical ); - layoutX = x; - layoutY = y; + // rootInfo->desktopLayoutCorner(); // I don't find this worth bothering, feel free to + layoutOrientation = ( rootInfo->desktopLayoutOrientation() == NET::OrientationHorizontal + ? Qt::Horizontal : Qt::Vertical ); + layoutX = rootInfo->desktopLayoutColumnsRows().width(); + layoutY = rootInfo->desktopLayoutColumnsRows().height(); } void Workspace::calcDesktopLayout(int* xp, int* yp, Qt::Orientation* orientation) const diff --git a/workspace.h b/workspace.h index 7fb2921379..36b878dae3 100644 --- a/workspace.h +++ b/workspace.h @@ -261,7 +261,7 @@ class Workspace : public QObject, public KDecorationDefines void setCurrentScreen( int new_screen ); QString desktopName( int desk ) const; - void setDesktopLayout(NET::Orientation o, int x, int y, NET::DesktopLayoutCorner c); + void updateDesktopLayout(); void setShowingDesktop( bool showing ); void resetShowingDesktop( bool keep_hidden ); bool showingDesktop() const;