Status of multi-monitor support
Guillaume Pothier
gpothier at gmail.com
Thu Oct 16 00:19:18 CEST 2008
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