Unity does not send UnmapNotify event when window is iconified
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Unity |
New
|
Undecided
|
Unassigned | ||
cinnamon (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
gnome-shell (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
unity (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
To reproduce this bug, run "wish" in a terminal window. Here's what I did in wish:
> wish
% wm tracing 1
% wm iconify .
WaitForMapNotify giving up on .
WaitForMapNotify finished with . (winPtr 0x1af3a50, wmPtr 0x1af3850)
% wm state .
normal
% wm deiconify .
%
Three symptoms can be seen in the wish session:
1. wish should not report "WaitForMapNotify giving up on ."
2. After the "wm iconify ." command, the window disappears; however, the "wm state ." should report "iconic" instead of "normal".
3. The "wm deiconify ." command should make the window reappear, but it does not.
I'm struggling with whether this is a Unity bug or a Tk bug. The problem is exhibited under Unity and Gnome Shell, but does not occur under fvwm2 (I ran the test under all 3 window managers on the same system). Under fvwm2:
1. wish does not report "WaitForMapNotify giving up on ."
2) The "wm state ." command correctly returns "iconic".
3) The "wm deiconify ." command correctly makes the window reappear.
Under Gnome Shell and fvwm2, I was able to run "xtrace wish", and repeat the session to watch the X11 events (I got a SEGV when I tried this under Unity and I filed a bug). Under Gnome Shell, the xtrace info looks like this:
000:<:0092: 24: Request(16): InternAtom only-if-
000:>:0092:32: Reply to InternAtom: atom=0x1dc(
000:<:0093: 44: Request(25): SendEvent propagate=
000:>:0093: Event PropertyNotify(28) window=0x01800006 atom=0x185(
000:>:0093: Event PropertyNotify(28) window=0x01800006 atom=0x15c(
000:<:0094: 24: Request(20): GetProperty delete=false(0x00) window=0x01800006 property=
000:>:0094:36: Reply to GetProperty: type=0x4("ATOM") bytes-after=
Under fvwm2, the xtrace info looks like this:
000:<:008b: 24: Request(16): InternAtom only-if-
000:>:008b:32: Reply to InternAtom: atom=0x1b1(
000:<:008c: 44: Request(25): SendEvent propagate=
000:>:008c: Event UnmapNotify(18) event=0x01c00006 window=0x01c00006 from-configure=
000:>:008c: Event PropertyNotify(28) window=0x01c00006 atom=0x185(
000:<:008d: 8: Request(10): UnmapWindow window=0x01c00005
000:>:008d: Event PropertyNotify(28) window=0x01c00006 atom=0x15c(
000:<:008e: 4: Request(127): NoOperation
000:<:008f: 24: Request(20): GetProperty delete=false(0x00) window=0x01c00006 property=
000:>:008f:36: Reply to GetProperty: type=0x4("ATOM") bytes-after=
Note that fvwm2 returns the UnmapNotify event to the client (in response to the ClientMessage event), but Gnome Shell (and presumably Unity) doesn't. As a result, wish does not send the UnmapWindow request to the window manager under Gnome Shell.
The ICCCM (section 4.1.4) says "Clients can select for StructureNotify on their top-level windows to track transitions between Normal and Iconic states. Receipt of a MapNotify event will indicate a transition to the Normal state, and receipt of an UnmapNotify event will indicate a transition to the Iconic state.
The relevant Tk code is in the tk8.6 source package (http://
As I previously said, I'm torn on whether this is a Tk bug or a Unity/Gnome Shell bug. Since both Unity and Gnome Shell get the same answer, and WaitForMapNotify() says that it needs to handle the situation where the window manager does not respond with the UnmapNotify event, I'm inclined to think that this is a Tk bug. However, since fvwm exhibits the correct behavior, and the ICCCM seems to say that the window manager should return the UnmapNotify event to the client, I decided to file the bug against Unity.
----------------
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: unity 7.2.5+14.
ProcVersionSign
Uname: Linux 3.16.0-50-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.15
Architecture: amd64
CompizPlugins: No value set for `/apps/
CurrentDesktop: Unity
Date: Fri Oct 2 18:57:04 2015
InstallationDate: Installed on 2015-05-11 (144 days ago)
InstallationMedia: Ubuntu 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in gnome-shell (Ubuntu): | |
status: | New → Confirmed |
This bug continues to exist in all versions of gnome-shell and Unity (Ubuntu 16.04, 16.10, 17.04 at least).