[mutter] x11: Unminimize windows with initial IconicState if first known on MapRequest
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] x11: Unminimize windows with initial IconicState if first known on MapRequest
- Date: Tue, 15 Nov 2016 17:41:06 +0000 (UTC)
commit be5c2ebcb59652c91a5817762e6535b357f14a47
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Sep 18 12:03:53 2014 +0200
x11: Unminimize windows with initial IconicState if first known on MapRequest
In that case, the MetaWindow is created, but it should also be unminimized
to satisfy the MapRequest triggered by the client, otherwise these would
stay minimized until they're shown explicitly by the user.
https://bugzilla.gnome.org/show_bug.cgi?id=774333
src/x11/events.c | 37 ++++++++++++++++++++++++-------------
1 files changed, 24 insertions(+), 13 deletions(-)
---
diff --git a/src/x11/events.c b/src/x11/events.c
index 98f5f03..e0458ae 100644
--- a/src/x11/events.c
+++ b/src/x11/events.c
@@ -1370,22 +1370,33 @@ handle_other_xevent (MetaDisplay *display,
{
window = meta_window_x11_new (display, event->xmaprequest.window,
FALSE, META_COMP_EFFECT_CREATE);
+ /* The window might have initial iconic state, but this is a
+ * MapRequest, fall through to ensure it is unminimized in
+ * that case.
+ */
}
- /* if frame was receiver it's some malicious send event or something */
- else if (!frame_was_receiver && window)
+ else if (frame_was_receiver)
{
- meta_verbose ("MapRequest on %s mapped = %d minimized = %d\n",
- window->desc, window->mapped, window->minimized);
- if (window->minimized)
+ meta_warning ("Map requests on the frame window are unexpected\n");
+ break;
+ }
+
+ /* Double check that creating the MetaWindow succeeded */
+ if (window == NULL)
+ break;
+
+ meta_verbose ("MapRequest on %s mapped = %d minimized = %d\n",
+ window->desc, window->mapped, window->minimized);
+
+ if (window->minimized)
+ {
+ meta_window_unminimize (window);
+ if (window->workspace != window->screen->active_workspace)
{
- meta_window_unminimize (window);
- if (window->workspace != window->screen->active_workspace)
- {
- meta_verbose ("Changing workspace due to MapRequest mapped = %d minimized = %d\n",
- window->mapped, window->minimized);
- meta_window_change_workspace (window,
- window->screen->active_workspace);
- }
+ meta_verbose ("Changing workspace due to MapRequest mapped = %d minimized = %d\n",
+ window->mapped, window->minimized);
+ meta_window_change_workspace (window,
+ window->screen->active_workspace);
}
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]