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 167042 - need to separate takes_focus_on_map and places_on_top_on_map
need to separate takes_focus_on_map and places_on_top_on_map
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.9.x
Other Linux
: High normal
: 2.10.x
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks: 149028
 
 
Reported: 2005-02-11 11:33 UTC by Sebastien Bacher
Modified: 2005-02-12 07:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Need to handle both takes_focus_on_map and places_on_top_on_map (9.29 KB, patch)
2005-02-12 01:59 UTC, Elijah Newren
none Details | Review

Description Sebastien Bacher 2005-02-11 11:33:23 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
Comment 1 Michael Natterer 2005-02-11 12:38:11 UTC
That's clearly a metacity bug. GIMP sets the GDK_WINDOW_TYPE_HINT_SPLASHSCREEN
hint and metacity must respect that.
Comment 2 Elijah Newren 2005-02-11 16:40:45 UTC
See bug 165243.  It's intentional.  Splashscreens aren't the most important
thing in the universe.  ;-)
Comment 3 Elijah Newren 2005-02-11 16:53:42 UTC
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.
Comment 4 Elijah Newren 2005-02-12 01:59:08 UTC
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.
Comment 5 Elijah Newren 2005-02-12 02:06:15 UTC
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 6 Havoc Pennington 2005-02-12 04:41:31 UTC
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.
Comment 7 Elijah Newren 2005-02-12 07:20:06 UTC
committed with those changes.