Bug 249948 - When using kde 4.8.3 in multihead setup with compiz, windows does not maximize correctly
Summary: When using kde 4.8.3 in multihead setup with compiz, windows does not maximiz...
Status: RESOLVED NOT A BUG
Alias: None
Product: plasma4
Classification: Plasma
Component: multihead (show other bugs)
Version: 4.8.3
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-02 22:57 UTC by Dura
Modified: 2013-06-06 14:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
xorg.conf multihead setup (4.14 KB, text/plain)
2010-09-02 22:57 UTC, Dura
Details
The problem (182.82 KB, image/png)
2010-09-02 23:00 UTC, Dura
Details
Patch that corrects the problem for me (829 bytes, patch)
2012-05-23 14:02 UTC, Dura
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dura 2010-09-02 22:57:43 UTC
Created attachment 51251 [details]
xorg.conf multihead setup

Version:           unspecified (using KDE 4.5.0) 
OS:                Linux

When using compiz instead of kwin, maximized windows does not take the full height of the screen (see attached image). It works correctly with kwin, or with compiz and second screen disabled. If I kill plasma-desktop process and start plasma-desktop from kde 4.4.5 by switching binaries, size of maximized windows is correct when the taskbar reappears.

Reproducible: Always

Steps to Reproduce:
I don't know if this is reproducible in all multihead setup or with just my particular setup.
1. Use or adapt the xorg.conf attached to create a multihead setup
2. Start X server with KDE 4.5.x
3. Switch from kwin to compiz
4. maximize a window


Actual Results:  
The maximized window does not take all available space between taskbar and top of the screen.

Expected Results:  
The maximized window must take all available space between taskbar and top of the screen.
Comment 1 Dura 2010-09-02 23:00:24 UTC
Created attachment 51252 [details]
The problem
Comment 2 Dura 2010-09-06 02:46:00 UTC
After recompiling qt and kde4 in debug mode and digging into QDesktopWidget and KDE4 relatives, I finally find where the problem is.

In method ScreenUtils::desktopGeometry() of kdebase-workspace-4.5.1/libs/kephal/kephal/screens.cpp (line 124), there is definitely a problem here, on my system it returns 0,0,1920,1080 wich is incorrect (should be 0,0,1280,1024).
Replacing code by "return QApplication::desktop()->geometry();" like in kde 4.4.5 solve the bug described in this report.

Moreover, this problem is not compiz specific, all window managers other than kwin4 are probably affected.
The bug reappears if I start kwin from kde3 instead of kwin from kde4.
Kwin4 circumvents the problem I don't know how.
Comment 3 Myriam Schweingruber 2012-05-17 14:03:10 UTC
Closing for lack of feedback. Please feel free to reopen this report if you can still reproduce this with KDE 4.8.3 or later.
Comment 4 Dura 2012-05-23 14:02:56 UTC
Created attachment 71321 [details]
Patch that corrects the problem for me
Comment 5 Dura 2012-05-23 14:13:22 UTC
Since KDE 4.5.x I have always compiled kdebase-workspace with the attached patch.
I can confirm that without the patch (which apply cleanly on kde-workspace-4.8.3), the problem still occur.
Comment 6 Martin Flöser 2013-06-06 12:27:43 UTC
sorry please report problem to Compiz if it works fine with KWin.
Comment 7 Dura 2013-06-06 13:02:49 UTC
Please Martin, read ALL my comments: I've said that it does not work with compiz and kwin from kde3 and probably all wm others than kwin from kde4. If It is not a kde bug, how do you explain that it was working with kde 4.4.5 and never since kde 4.5.0 with the same version of compiz (and kwin from kde 3.5.10)? Reverting a small change between kde 4.4.5 and kde 4.5.0 correct the problem and it is not a KDE reggression?
Using kwin4 instead of compiz is definitely not an option, kwin4 does not work in multihead environment, at least with my setup. https://bugs.kde.org/show_bug.cgi?id=256242 is exactly what I get if using kwin instead of compiz.
I'm reverting the state to UNCONFIRMED and will post my xorg.conf in few hours (sorry, I should have done this before)
Comment 8 Martin Flöser 2013-06-06 14:11:02 UTC
And I revert back to invalid. Sorry it works with KWin as of KDE 4 and that's the only thing that matters. The code has changed for a very good reason and it doesn't matter anyway - kephal is deprecated and hardly used any more.

KDE Plasma workspaces are a combination of KWin and Plasma desktop. While it is possible to use a different window manager we do not guarantee that it works correctly. If it doesn't work with another window manager, there is nothing to do. We are not going to revert a needed change because it doesn't work in Compiz. What matters is that it works correctly with KWin.