GNOME Bugzilla – Bug 167042
need to separate takes_focus_on_map and places_on_top_on_map
Last modified: 2005-02-12 07:20:06 UTC
with the new metacity (2.9) and the focus stealing prevention the splashscreen is displayed behind the other windows, it should probably be on top
That's clearly a metacity bug. GIMP sets the GDK_WINDOW_TYPE_HINT_SPLASHSCREEN hint and metacity must respect that.
See bug 165243. It's intentional. Splashscreens aren't the most important thing in the universe. ;-)
Okay, I made a mistake. takes_focus_on_map returns false unconditionally for splash screens. That makes sense, but it means that we place the window behind the focus window. If the focus window covers the center of the screen, the splashscreen will not be seen.
Created attachment 37380 [details] [review] Need to handle both takes_focus_on_map and places_on_top_on_map Previously, we would place windows that didn't get focus on map below the focused window. Since it makes no sense to give focus to splashscreens (and some other windows), this caused problems. So, we also need a separate placed_on_top_on_map variable in the code, which will in most cases be equal to takes_focus_on_map--but which will be different for cases like splashscreens when there is no intervening user interaction.
Oh, this patch looks long but it really isn't, so let me explain: 1) window_takes_focus_on_map -> window_state_on_map (because it determines two variables now) 2) rip the timestamp comparison stuff out and stick it in a separate intervening_user_event_occurred (do this because it can be used to set two variables; this is what causes most of the line changes in the patch, when it's merely a move of a lot of code into a separate function) 3) use place_on_top_on_map inside meta_window_show
Comment on attachment 37380 [details] [review] Need to handle both takes_focus_on_map and places_on_top_on_map brace on wrong line ;-) if (focus_window != NULL) { declare and assign on same line: gboolean intervening_events = intervening_user_event_occurred (window); pointless return statement: + return; } Everything substantive looks good, go ahead and commit.
committed with those changes.