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

List:       kwin
Subject:    Re: [Kwin] xinerama fullscreen mode problem + patch
From:       Xavier IZARD <xizard () free ! fr>
Date:       2004-03-22 21:42:59
Message-ID: 405F6C2E.2050500 () free ! fr
[Download RAW message or body]

Lubos Lunak wrote:
> On Sunday 21 of March 2004 06:41, xi wrote:
> 
>>Hello,
>>
>>*** Context :
>>
>>While xinerama support in KDE is now really good, KDE3.2 has introduced
>>a bug with xinerama-fullscreen.
> 
> 
>  First of all, I'm hardly a xinerama expert, in fact I don't know it much and 
> I don't use it. I just happen to be the poor guy who gets all the bugreport 
> because of being the KWin maintainer.
> 
Don't desperate, xinerama support is now really good !
> 
>>Note that by xinerama-fullscreen I mean a full screen on several
>>screens, not a normal fullscreen on one screen. If I am unclear, please
>>see photos of xine in normal mode :
>>http://xizard.free.fr/photo_normal.jpg and in xinerama-fullscreen mode :
>>http://xizard.free.fr/photo_very_fullscren.jpg
>>


>>*** I propose this small patch which corrects the problem and doesn't
>>change anything for a "normal" window :
>>

>  You're basing this all on the assumption that the application really knows 
> what it is doing. If you turned on xinerama support, then that means that you 
> have several separate monitors, while with xinerama options turned off, 
> that's e.g. for a large screen assembled from several smaller ones (at least 
> I've been told this). And since you turned on xinerama support, kwin tries to 
> prevent maximized/fullscreened/etc. windows covering the whole area, because 
> if you run an application without xinerama support, it will certainly request 
> whole area in the (false) hope it requests the monitor size (in fact, as the 
> WM maintainer I can tell you that apps often don't really know what they're 
> doing, but I digress).
> 

Ok, I understand your point of view. So to sum-up, badly programmed 
applications are prioritary on well programmed applications because 
you're tired of receiving bug reports about this problem ;-)
It doesn't matter, this is not the main issue.

>  If you want to use the whole area of all monitors together, you should turn 
> off the xinerama options in the control module.

No, this is not an acceptable solution. As you wrote above, we turn on 
xinerama support when using several monitors. I have 3 monitors so 
xinerama support is turned on. (If I don't turn it on, this is completly 
unusable because as you say, maximize operation is done on the whole 
desktop, ...)

> 
>>-> The second part of the patch corrects a bug I think, but I may be wrong
>>: Problem is in the check for the size of the non-maximized window : there
>>is a call to "maximize( Client::MaximizeFull );" which cause the
>>"NET::Max" property to be set. So with a window larger than a screen
>>size, even if the window didn't asked for a maximization, it was maximized.
>>Second changed done : I think this is not a problem to get a window
>>larger than one screen in a xinerama configuration. So I have changed
>>the check to the whole desktop.
> 
> 
>  That's intentional. KWin doesn't allow windows to be larger than the 
> available workarea (because of all those bugreports about window titlebars 
> being hidden by panel put at the top edge etc.). The fact that this is 
> causing trouble to you again stems from your incorrect xinerama 
> configuration.
> 
Ok I understand this problem. But original kwin code doesn't reflects this :
In original code, you prevent any application to grow larger than _one 
sreen_ (the test is done with "area" which size is one screen in most 
situations because xinerama support is enabled).
Prevent application to grow larger than the _workarea_ is perfectly ok 
for me, and this is part of my previous patch (the test is done with 
FullArea). I send a new patch with only this change.


Please reconsider my request, this works since KDE 2 serie !
I really think this is a problem to prevent application to grow larger 
than one screen in xinerama mode because some application really require 
this and having several screens lost half of it's interest.

An application which sets the correct flags (PPosition and PSize) must 
be allowed to use the whole desktop size.

I don't think this is absurd to have xinerama support enabled and 
allowing some application to use several screens if they need it. If no, 
then why to use several screens on the same computer ?

Regards,
					Xavier

["kwin_patch_xinerama_fullscreen_2004_03_22.diff" (text/plain)]

--- kwin_original/manage.cpp	2004-02-28 09:44:47.000000000 +0000
+++ kwin/manage.cpp	2004-03-22 22:02:31.000000000 +0000
@@ -334,24 +334,25 @@
     else 
         {
         geom_restore = geometry(); // remember restore geometry
+        QRect geom_full = workspace()->clientArea( FullArea, geom.center(), desktop());
         if ( isMaximizable()
-             && ( width() >= area.width() || height() >= area.height() ) ) 
+             && ( width() >= geom_full.width() || height() >= geom_full.height() ) )
             {
-            // window is too large for the screen, maximize in the
+            // window is too large for the desktop, maximize in the
             // directions necessary
-            if ( width() >= area.width() && height() >= area.height() ) 
+            if ( width() >= geom_full.width() && height() >= geom_full.height() )
                 {
                 maximize( Client::MaximizeFull );
                 geom_restore = QRect(); // use placement when unmaximizing
                 }
-            else if ( width() >= area.width() ) 
+            else if ( width() >= geom_full.width() )
                 {
                 maximize( Client::MaximizeHorizontal );
                 geom_restore = QRect(); // use placement when unmaximizing
                 geom_restore.setY( y()); // but only for horizontal direction
                 geom_restore.setHeight( height());
                 }
-            else if ( height() >= area.height() ) 
+            else if ( height() >= geom_full.height() )
                 {
                 maximize( Client::MaximizeVertical );
                 geom_restore = QRect(); // use placement when unmaximizing


_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


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

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