Bug 296076 - Fix fullscreen state handling: NETWM says it's bound to focus and not stacking order, also see bug #224600
Summary: Fix fullscreen state handling: NETWM says it's bound to focus and not stackin...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 4.8.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 4.11
Assignee: KWin default assignee
URL: https://git.reviewboard.kde.org/r/109...
Keywords:
: 303135 306580 308254 314476 318849 327657 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-15 14:57 UTC by mcnaz
Modified: 2013-11-15 15:49 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11
thomas.luebking: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mcnaz 2012-03-15 14:57:15 UTC
This is related to kwin - kde-window-manager - or so I hope.

Description of Issue:

Running Kubuntu 12.04 with a dual monitor setup - /etc/X11/xorg.conf
shown later. Primary monitor 1680 x 1050 on the right and secondary
monitor 1280 x 1080 on the left

Installed VirtualBox 4.1.8 - 4.1.8-dfsg-2 - installed from Muon.

When VirtualBox is running on the primary monitor and is maximised (via
HOST+F), the following issues arise:

1. Any applications shown on the secondary monitor's Panel via Task
Manager widget cannot be minimised by clicking on the applications tab.
Existing minimised applications on this monitor can be restored by
clicking on their respective tab but subsequent clicks on the tab does
not re-minimise the application. Applications on the secondary monitor
can only by minimised by clicking on Task Manager tabs when VirtualBox
is not in Full Screen mode (VB Host + F)

2. Kickoff Application Launcher menu (present on the primary monitor
only) is rendered under the VirtualBox VM when the VM is in Full Screen.
A keyboard shortcut is assigned to display the Kickoff menu. The menu
renders fine when VirtualBox VM is not maximised. When the VM is in
fullscreen, Kickoff keyboard shortcut does not display the menu - it is
only briefly visible when the Kickoff shortcut menu renders its
slidedown closing animation. Kickoff shortcut is executed outside of the
VB VM by clicking on an empty space on the secondary monitor

3. Applications cannot be dragged from the secondary monitor to the
primary monitor whilst a VirtualBox VM is in fullscreen mode on the
primary monitor. Applications are rendered under the fullscreen VM.

Expected Behaviour:

1. Application can be minimised/maximised on the secondary monitor
irrespective of a full screen application running on the primary monitor

2. Kickoff menu to render above all content on the primary monitor when
kickoff keyboard shortcut is invoked.

3. Dragged application windows from the secondary monitor should render
on top of the active application window on the primary monitor.

:$ lsb_release -rd
Description: Ubuntu precise (development branch)
Release: 12.04

~$ apt-cache policy kde-window-manager
kde-window-manager:
Installed: 4:4.8.1-0ubuntu2
Candidate: 4:4.8.1-0ubuntu2
Version table:
*** 4:4.8.1-0ubuntu2 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
100 /var/lib/dpkg/status

$ apt-cache policy virtualbox-qt
virtualbox-qt:
Installed: 4.1.8-dfsg-2
Candidate: 4.1.8-dfsg-2
Version table:
*** 4.1.8-dfsg-2 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
100 /var/lib/dpkg/status


/etc/X11/xorg.conf:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 295.20  (buildd@rothera)  Sat Feb 18 09:49:17 UTC 2012

Section "ServerLayout"
   Identifier     "Layout0"
   Screen      0  "Screen0" 0 0
   InputDevice    "Keyboard0" "CoreKeyboard"
   InputDevice    "Mouse0" "CorePointer"
   Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
   # generated from default
   Identifier     "Mouse0"
   Driver         "mouse"
   Option         "Protocol" "auto"
   Option         "Device" "/dev/psaux"
   Option         "Emulate3Buttons" "no"
   Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
   # generated from default
   Identifier     "Keyboard0"
   Driver         "kbd"
EndSection

Section "Monitor"
   # HorizSync source: edid, VertRefresh source: edid
   Identifier     "Monitor0"
   VendorName     "Unknown"
   ModelName      "AOC LM720/LM720A"
   HorizSync       30.0 - 83.0
   VertRefresh     55.0 - 75.0
   Option         "DPMS"
EndSection

Section "Device"
   Identifier     "Device0"
   Driver         "nvidia"
   VendorName     "NVIDIA Corporation"
   BoardName      "GeForce 8800 GTS"
EndSection

Section "Screen"
   Identifier     "Screen0"
   Device         "Device0"
   Monitor        "Monitor0"
   DefaultDepth    24
   Option         "TwinView" "1"
   Option         "TwinViewXineramaInfoOrder" "DFP-1"
   Option         "metamodes" "CRT: 1280x1024_75 +0+0, DFP: 1680x1050_60 +1280+0"
   SubSection     "Display"
       Depth       24
   EndSubSection
EndSection
Comment 1 Thomas Lübking 2012-03-15 15:34:57 UTC
Please don't collect bugs in one report. That makes triaging a nightmare.
1. is a dupe of bug #246838 (plasma/widgtet-taskbar component)
2 & 3 are effectively dupes of bug #224600 because the window remains considered fullscreen

I will change this bug towards correcting the implementation for 2&3, for 1 please attach yourself to that bug.
Comment 2 mcnaz 2012-03-15 15:37:45 UTC
Thanks Thomas.

Sorry for the dupes and for the multiple reports. First time on bugs.kde. I did do a search prior to submission but clearly I could have done a better job of it.

Thank you for pointing me in the right direction.
Comment 3 Thomas Lübking 2012-07-07 14:52:58 UTC
*** Bug 303135 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Lübking 2012-09-13 13:18:28 UTC
*** Bug 306580 has been marked as a duplicate of this bug. ***
Comment 5 Thomas Lübking 2012-10-11 20:22:57 UTC
*** Bug 308254 has been marked as a duplicate of this bug. ***
Comment 6 Thomas Lübking 2013-02-05 20:52:26 UTC
*** Bug 314476 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Lübking 2013-03-20 21:24:37 UTC
Git commit 3b0cb1a9e353683930e9755f158d425d3551ec0c by Thomas Lübking.
Committed on 18/03/2013 at 17:26.
Pushed by luebking into branch 'master'.

Depend fs layer upon active state, not stackorder

according to NETWM spec implementation notes suggests
"focused windows having state _NET_WM_STATE_FULLSCREEN" to be on the highest layer.
We'll also take the screen into account
The user set stacking (being raised) is not considered by the spec note
This behavior is also suggested by an old comment in activation.cpp, void Workspace::setActiveClient()
Related: bug 224600
REVIEW: 109572
FIXED-IN: 4.11

M  +5    -16   kwin/layers.cpp
M  +9    -2    kwin/workspace.cpp

http://commits.kde.org/kde-workspace/3b0cb1a9e353683930e9755f158d425d3551ec0c
Comment 8 Martin Flöser 2013-06-07 06:45:04 UTC
*** Bug 318849 has been marked as a duplicate of this bug. ***
Comment 9 Thomas Lübking 2013-11-15 15:49:49 UTC
*** Bug 327657 has been marked as a duplicate of this bug. ***