[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: [PATCH] Multiscreen fix!
From:       Alessandro Diaferia <alediaferia () gmail ! com>
Date:       2009-02-01 14:47:28
Message-ID: 65627f3a0902010647n628138c4yd927859ad2b8d7dd () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


2009/2/1 Guillaume Pothier <gpothier@gmail.com>

> 2009/2/1 Alessandro Diaferia <alediaferia@gmail.com>:
> >   I deeply checked and Kephal actually returns correct screen info (2
> > screens,
> >   the first (0, 0, 1280, 1024), the second(1280, 0, 1680, 1050)).
> Moreover
> > adjustSize() uses Plasma::View::screen()
> >   in order to resize the view, and before delaying adjustSize, that
> screen
> > was just wrong.
>
> Ok, so if Kephal reports the correct sizes then you most likely have
> xrandr1.2, and so you are right, it's another problem. So I agree with
> your patch now :-)


Yeah, i have xrandr-1.2.3 :D

>
> Cheers,
> g
>

Regards

>
>
> >
> >>
> >> I actually had a patch to fix this but I was waiting for somebody to
> >> test it before committing. Can you check this bug:
> >> http://bugs.kde.org/show_bug.cgi?id=181325 and test the patch,
> >> reverting your own patch, and see if it works for you?
> >
> >  It does not do me the trick.. I still have second screen displacement..
> I
> > feel the issues are not correlated, anyway i'd wait for
> >  someone else, more expert than me, to talk :)
> >
> >>
> >> Cheers,
> >> g
> >
> > Cheers :)
> >
> >>
> >> 2009/1/30 Alessandro Diaferia <alediaferia@gmail.com>:
> >> > 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
> >> >
> >> > _______________________________________________
> >> > Plasma-devel mailing list
> >> > Plasma-devel@kde.org
> >> > https://mail.kde.org/mailman/listinfo/plasma-devel
> >> >
> >> >
> >> _______________________________________________
> >> Plasma-devel mailing list
> >> Plasma-devel@kde.org
> >> https://mail.kde.org/mailman/listinfo/plasma-devel
> >
> >
> >
> > --
> > Alessandro Diaferia
> >
> > _______________________________________________
> > Plasma-devel mailing list
> > Plasma-devel@kde.org
> > https://mail.kde.org/mailman/listinfo/plasma-devel
> >
> >
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>



-- 
Alessandro Diaferia

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">2009/2/1 Guillaume Pothier <span dir="ltr">&lt;<a \
href="mailto:gpothier@gmail.com">gpothier@gmail.com</a>&gt;</span><br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> 2009/2/1 Alessandro Diaferia &lt;<a \
href="mailto:alediaferia@gmail.com">alediaferia@gmail.com</a>&gt;:<br> <div \
class="Ih2E3d">&gt; &nbsp; I deeply checked and Kephal actually returns correct \
screen info (2<br> &gt; screens,<br>
&gt; &nbsp; the first (0, 0, 1280, 1024), the second(1280, 0, 1680, 1050)). \
Moreover<br> &gt; adjustSize() uses Plasma::View::screen()<br>
&gt; &nbsp; in order to resize the view, and before delaying adjustSize, that \
screen<br> &gt; was just wrong.<br>
<br>
</div>Ok, so if Kephal reports the correct sizes then you most likely have<br>
xrandr1.2, and so you are right, it&#39;s another problem. So I agree with<br>
your patch now :-)</blockquote><div><br>Yeah, i have xrandr-1.2.3 :D \
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> Cheers,<br>
<div><div></div><div class="Wj3C7c">g</div></div></blockquote><div><br>Regards \
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div> <div class="Wj3C7c"><br>
<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; I actually had a patch to fix this but I was waiting for somebody to<br>
&gt;&gt; test it before committing. Can you check this bug:<br>
&gt;&gt; <a href="http://bugs.kde.org/show_bug.cgi?id=181325" \
target="_blank">http://bugs.kde.org/show_bug.cgi?id=181325</a> and test the \
patch,<br> &gt;&gt; reverting your own patch, and see if it works for you?<br>
&gt;<br>
&gt; &nbsp;It does not do me the trick.. I still have second screen displacement.. \
I<br> &gt; feel the issues are not correlated, anyway i&#39;d wait for<br>
&gt; &nbsp;someone else, more expert than me, to talk :)<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Cheers,<br>
&gt;&gt; g<br>
&gt;<br>
&gt; Cheers :)<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2009/1/30 Alessandro Diaferia &lt;<a \
href="mailto:alediaferia@gmail.com">alediaferia@gmail.com</a>&gt;:<br> &gt;&gt; &gt; \
As you can see from the sources Plasma::View uses QTimer::singleShot(0,<br> &gt;&gt; \
&gt; this, SLOT(privateInit())) in the ctor but DesktopView calls<br> &gt;&gt; &gt; \
adjustSize() in<br> &gt;&gt; &gt; the ctor with no delay..<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; This causes the fact that adjustSize() uses invalid information \
about<br> &gt;&gt; &gt; the<br>
&gt;&gt; &gt; current screen to setup its size and makes my second screen \
disappear<br> &gt;&gt; &gt; (or<br>
&gt;&gt; &gt; actually, with a wrong size/position).<br>
&gt;&gt; &gt; I managed to fix this giving a delay also to adjustSize() so that \
when<br> &gt;&gt; &gt; it is<br>
&gt;&gt; &gt; called the correct information are already set (and screen() returns \
the<br> &gt;&gt; &gt; correct number in this case).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Hope this is ok to commit, since i&#39;d like to have my screen \
back<br> &gt;&gt; &gt; officially<br>
&gt;&gt; &gt; :P<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Since i&#39;m having troubles with the reviewboard here comes the \
patch:<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; Index: shells/desktop/desktopview.cpp<br>
&gt;&gt; &gt; ===================================================================<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --- shells/desktop/desktopview.cpp &nbsp; &nbsp;(revision 918687)<br>
&gt;&gt; &gt; +++ shells/desktop/desktopview.cpp &nbsp; &nbsp;(working copy)<br>
&gt;&gt; &gt; @@ -104,7 +104,7 @@ DesktopView::DesktopView(Plasma::Contain<br>
&gt;&gt; &gt; &nbsp; &nbsp; &nbsp;QBrush b(tile);<br>
&gt;&gt; &gt; &nbsp; &nbsp; &nbsp;setBackgroundBrush(tile);<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; - &nbsp; &nbsp;adjustSize();<br>
&gt;&gt; &gt; + &nbsp; &nbsp;QTimer::singleShot(0, this, SLOT(adjustSize()));<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &nbsp; &nbsp; &nbsp;Kephal::Screens *screens = \
Kephal::Screens::self();<br> &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;connect(screens, \
SIGNAL(screenResized(Kephal::Screen *, QSize,<br> &gt;&gt; &gt; QSize)),<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Hugs!!<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; Alessandro Diaferia<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Plasma-devel mailing list<br>
&gt;&gt; &gt; <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
&gt;&gt; &gt; <a href="https://mail.kde.org/mailman/listinfo/plasma-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> &gt;&gt; \
&gt;<br> &gt;&gt; &gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Plasma-devel mailing list<br>
&gt;&gt; <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
&gt;&gt; <a href="https://mail.kde.org/mailman/listinfo/plasma-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> &gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Alessandro Diaferia<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Plasma-devel mailing list<br>
&gt; <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
&gt; <a href="https://mail.kde.org/mailman/listinfo/plasma-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> &gt;<br>
&gt;<br>
_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> \
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Alessandro Diaferia<br>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic