GNOME Bugzilla – Bug 491090
Initially iconified windows regression
Last modified: 2009-02-04 11:49:59 UTC
The support in metacity for mapping a window initially iconified/minimized is not working properly. I'll attach a short test case program that demonstrates this. The obvious problem is: /* See bug 334899; the window may have minimized ancestors * which need to be shown. * * However, we shouldn't unminimize windows here when opening * a new display because that breaks passing _NET_WM_STATE_HIDDEN * between window managers when replacing them; see bug 358042. */ if (!display->display_opening) unminimize_window_and_all_transient_parents (window); Which gets called even if earlier in the same function we did: if (window->initially_iconic) { /* WM_HINTS said minimized */ window->minimized = TRUE; meta_verbose ("Window %s asked to start out minimized\n", window->desc); } I think that the right fix is: - if (!display->display_opening) + if (!display->display_opening && !window->minimized) unminimize_window_and_all_transient_parents (window); The display->display_opening check is still needed because it applies to the case where the window isn't minimized but some parent is ... we still want to preserve that previous state. (probably ... it's a little pathological) "unminimize_window_and_all_transient_parents" is used elsewhere, so it doesn't need to be changed to "unminimize_all_transient_parents".
Created attachment 98033 [details] Quick test case
Created attachment 98034 [details] [review] Proposed patch Here's a patch. I didn't add a bug reference in the comment to go with the other two bug references since it's just a logic correction not some obscure user behavior tweak that needs history to explain.
Looks correct to me, though Elijah or Thomas may have thoughts.
Well spotted, works beautifully, nice test case. You can commit if you like, or I will if you'd rather. Thank you!
Commited, thanks for the review. 2007-10-28 Owen Taylor <otaylor@redhat.com> * src/window.c (meta_window_new_with_attrs): Don't immediately unminimize an initially iconic window (#491090)
The other bugs already filed about this issue should be marked as a duplicate of this one. Any takers willing to look them up? At least one mentions xterm... Thanks for fixing this, Owen.
*** Bug 360900 has been marked as a duplicate of this bug. ***
Um, did you only commit on the 2-20 branch? It'd be nice to have on trunk too. :-)
Checked into trunk! http://svn.gnome.org/viewvc/metacity?rev=3667&view=rev
Still reproducible with 2.22 on my Ubuntu 8.04 with Compiz...