[PATCH] Multiscreen fix!
Alessandro Diaferia
alediaferia at gmail.com
Fri Jan 30 15:13:29 CET 2009
As you can see from the sources Plasma::View uses
QTimer::singleShot(0, this, SLOT(privateInit())) in the ctor but
DesktopView calls adjustSize() in the ctor with no delay..
This causes the fact that adjustSize() uses invalid information about
the current screen to setup its size and makes my second screen
disappear (or actually, with a wrong size/position).
I managed to fix this giving a delay also to adjustSize() so that when
it is called the correct information are already set (and screen()
returns the correct number in this case).
Hope this is ok to commit, since i'd like to have my screen back officially :P
Since i'm having troubles with the reviewboard here comes the patch:
Index: shells/desktop/desktopview.cpp
===================================================================
--- shells/desktop/desktopview.cpp (revision 918687)
+++ shells/desktop/desktopview.cpp (working copy)
@@ -104,7 +104,7 @@ DesktopView::DesktopView(Plasma::Contain
QBrush b(tile);
setBackgroundBrush(tile);
- adjustSize();
+ QTimer::singleShot(0, this, SLOT(adjustSize()));
Kephal::Screens *screens = Kephal::Screens::self();
connect(screens, SIGNAL(screenResized(Kephal::Screen *, QSize, QSize)),
Hugs!!
--
Alessandro Diaferia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20090130/0b83827d/attachment.htm
More information about the Plasma-devel
mailing list