After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 360900 - xterm -iconic does not start iconized
xterm -iconic does not start iconized
Status: RESOLVED DUPLICATE of bug 491090
Product: metacity
Classification: Other
Component: general
trunk
Other All
: High major
: 2.18.x
Assigned To: Metacity maintainers list
Metacity maintainers list
: 375713 440691 450055 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-10-09 13:11 UTC by padraig.obriain
Modified: 2007-12-13 03:25 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description padraig.obriain 2006-10-09 13:11:51 UTC
xterm -iconic does not start iconized.

This is a regression caused by the fix for bug #334899.
Comment 1 Elijah Newren 2006-10-09 21:53:58 UTC
Right, so the problem was that in bug 334899 we were only supposed to unminimize transients of a new window that was going to be shown, instead we unminimized all the transients AND the window itself unconditionally.  A condition was later added, but it turns out to just be a hack for when restarting.  Also, the meta_window_foreach_transient() call just above that area of the code looks like it can be nuked as well.  Should be easy to fix.
Comment 2 Thomas Thurman 2006-10-09 22:37:47 UTC
Should I hack on this, or is it a gnome-love candidate?
Comment 3 Elijah Newren 2006-10-09 22:39:04 UTC
We could make it into a gnome-love candidate with a better description, but I'm too lazy to do that right now.  Go for it.  :-)
Comment 4 Elijah Newren 2007-04-12 21:40:55 UTC
*** Bug 375713 has been marked as a duplicate of this bug. ***
Comment 5 Elijah Newren 2007-05-23 23:57:05 UTC
*** Bug 440691 has been marked as a duplicate of this bug. ***
Comment 6 Elijah Newren 2007-06-30 17:01:13 UTC
*** Bug 450055 has been marked as a duplicate of this bug. ***
Comment 7 Elijah Newren 2007-06-30 17:03:06 UTC
This is biting lots of people, and it's definitely not just xterm.  Hints about the fix, again, are in comment 1.
Comment 8 Thomas Thurman 2007-06-30 20:14:37 UTC
It's been six months and no gnome-love action, so I'll fix this myself.
Comment 9 Anthony Petrov 2007-07-04 07:00:01 UTC
As it is noted in bug 440691, the IconicState initial state is not honored if set with XSetWMHints(). 
I experimented a bit more and figured out one more issue:
If one invokes the XSetWMHints() function, sets the initial_state to WithdrawnState using the StateHint flags, and then maps the window (via the XMapWindow() function), Metacity displays the window. It means that Metacity completely ignores the initial_state value and alsways displays windows in NormalState initially. The version of Metacity I played with is 2.16.1.
Comment 10 Anthony Petrov 2007-07-04 07:14:18 UTC
(In reply to comment #9)
Well, after some more experiments I noticed that KWin ignores the inital_state of WithdrawnState either. And I feel this is a correct  behavior. Because it's hard to imagine why one would ever want to call the XMapWindow() and leave the window unmapped. Though I wonder what is the meanning of the initial_state == WithdrawnState in this case? Is it just supposed to be ignored (what we see in practice)? Where is this stated?
Comment 11 Havoc Pennington 2007-07-04 15:20:24 UTC
The ICCCM state transition rules create an invariant that a withdrawn window is always unmapped. Mapping a window and asking for it to be in WithdrawnState does not make sense (if someone wanted to do that, probably what they really want is an override redirect window).

The only time the WithdrawnState value might be used by the WM is that the WM can set WM_STATE to WithdrawnState when a window is withdrawn, or alternatively the WM is allowed to just remove the WM_STATE property for withdrawn windows.
Otherwise, WithdrawnState is only of interest to clients, since the WM "forgets" about withdrawn windows and only cares about windows when they are not in WithdrawnState.
Comment 12 Ritesh Khadgaray ( irc:ritz) 2007-12-12 20:08:08 UTC
"xterm -iconic" works as expected for me with metacity2.20 on Fedora8 box.
Comment 13 Elijah Newren 2007-12-13 03:25:59 UTC
Yeah, Owen fixed this; it was a one liner.

*** This bug has been marked as a duplicate of 491090 ***