Status of multi-monitor support

Guillaume Pothier gpothier at gmail.com
Thu Oct 16 01:13:54 CEST 2008


Now I have an intermittent problem with the panel...
Panel is at the bottom of screen #1, which by default is 1680x1050. If
I change the resolution to 1280x1024, the panel is resized ok. But
when I switch back to 1680x1050, only the leftmost 1280 pixels are
displayed, for the rest I can see the wallpaper through. Now what is
strange is that it seems that the PanelView has the correct size
(based on the fact that KSnapshot grabs the full 1680 pixels when I
tell it to take a snapshot of the window under the cursor). The scene
rect is also set correctly, and the containment also. So if the view's
size, the containment's size and the scene rect are correct, is there
anything else that could cause the panel to render incompletely?
g

On Wed, Oct 15, 2008 at 7:19 PM, Guillaume Pothier <gpothier at gmail.com> wrote:
> On Wed, Oct 15, 2008 at 3:11 PM,  <aseigo at bddf.ca> wrote:
>> Looks like arace condition ... Kwin updates first so plasma is not adjusted yet and so the "is it the size of a screen" test fails.
>>
>> I guess the question is if kwin should be trying to manage the root window at all. Either it shouldn't touch anything or we will need a new window hint for rootwindows which notes what screen (if any) they are associated with.
>>
>> I wonder if kwin would ignore a root window that sets the wm override hint? If so then we could leave kwin as it is anf just have plasma manage its own root windows.
>
> By wm override hint you mean the NET::Override window type?
> The documentation currently says: "@deprecated has unclear meaning and
> is KDE-only", so I guess it would be ok to assign it a real meaning
> (ie. kwin should not touch it)? If I read the code in geometry.cpp
> correctly, the Override window would be treated as any other regular
> window, but it's just a matter of adding the proper test.
>
> Anyway, I commented out the rest of the isDesktop case (except the
> return statement) in the method mentioned earlier, and made plasma
> handle the size and position of its desktop views, and now the views
> are positioned and sized correctly!
>
> So there are two possibilities: either set DesktopViews to
> NET::Override and skip override windows in kwin, or leave DesktopViews
> as is and skip desktop windows in kwin. Which one is best?
>
> Another thing: the patch to geometry.cpp below fixes frequent kwin
> crashes, but I don't know if it is the best solution:
> @@ -230,13 +230,29 @@
>         desktop = currentDesktop();
>     if( screen == -1 )
>         screen = activeScreen();
> -    QDesktopWidget *desktopwidget = KApplication::desktop();
> -    QRect sarea = !screenarea.isEmpty() // may be empty during KWin
> initialization
> -        ? screenarea[ desktop ][ screen ]
> -        : desktopwidget->screenGeometry( screen );
> -    QRect warea = workarea[ desktop ].isNull()
> -        ? QApplication::desktop()->geometry()
> -        : workarea[ desktop ];
> +
> +    QRect sarea;
> +    if (desktop < screenarea.size() && screen < screenarea[ desktop
> ].size())
> +        {
> +        sarea = screenarea[ desktop ][ screen ];
> +        }
> +    else
> +        {
> +        kDebug() << "No such desktop/screen" << desktop << screen;
> +        sarea = kephal::ScreenUtils::screenGeometry( screen );
> +        }
> +
> +    QRect warea;
> +    if (desktop < workarea.size())
> +        {
> +        warea = workarea[ desktop ];
> +        }
> +    else
> +        {
> +        kDebug() << "No such desktop" << desktop;
> +        warea = kephal::ScreenUtils::desktopGeometry();
> +        }
> +
>     switch (opt)
>         {
>         case MaximizeArea:
>
>
>
>
>>
>> ------Original Message------
>> From: Guillaume Pothier
>> Sender:
>> To: plasma-devel at kde.org
>> ReplyTo: plasma-devel at kde.org
>> Sent: Oct 15, 2008 11:57
>> Subject: Re: Status of multi-monitor support
>>
>> On Wed, Oct 15, 2008 at 2:18 PM, Aike J Sommer <dev at aikesommer.name> wrote:
>>>> > I think the problem is kwin forcing plasma onto that size... I commited a
>>>> > patch a while back to allow one root-window per screen, but this seems to
>>>> > not work on resizing!
>>>>
>>>> ugh ... what is kwin doing resizing anything in the first place?
>>>
>>>     if( isDesktop())
>>>         {
>>> ->      if (geometry() == workspace()->clientArea( ScreenArea, this ))
>>>            {
>>>            return;
>>>            }
>>> <-
>>>         QRect area = workspace()->clientArea( FullArea, this );
>>>         if( geometry() != area )
>>>             setGeometry( area );
>>>
>>>
>>> Is the part of geometry.cpp and there is similar in manage.cpp. The lines
>>> between -> and <- is what i added, but depending on wether kwin or plasma
>>> will get the resize first this will fail!
>>> Why kwin needs to resize desktop-type windows, i dont know!
>>>
>>
>> As an experiment, I applied this patch to kdebase/workspace/kwin/geometry.cpp:
>> @@ -993,12 +989,12 @@
>>     {
>>     if( isDesktop())
>>         {
>> -        if (geometry() == workspace()->clientArea( ScreenArea, this
>> ))
>> -            {
>> -            return;
>> -            }
>> +//         if (geometry() == workspace()->clientArea( ScreenArea,
>> this ))
>> +//             {
>> +//             return;
>> +//             }
>>
>> -        QRect area = workspace()->clientArea( FullArea, this );
>> +        QRect area = workspace()->clientArea( ScreenArea, this );
>>         if( geometry() != area )
>>             setGeometry( area );
>>         return;
>>
>>
>> It resolved the DesktopView resizing to 3600x1200! Now, I need some
>> info on whether it is a correct fix or not, and if more is needed.
>>
>> Cheers,
>> g
>> _______________________________________________
>> Plasma-devel mailing list
>> Plasma-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/plasma-devel
>>
>>
>> Sent from my BlackBerry(R) wireless device
>> _______________________________________________
>> Plasma-devel mailing list
>> Plasma-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/plasma-devel
>>
>


More information about the Plasma-devel mailing list