Read desktop layout also during startup.
svn path=/trunk/KDE/kdebase/workspace/; revision=669892
This commit is contained in:
parent
9880b21aa3
commit
a47797e80a
3 changed files with 9 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue