Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
garnacho authored and muktupavels committed Mar 4, 2017
1 parent a01b890 commit 6875256
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions src/core/display.c
Expand Up @@ -2296,22 +2296,34 @@ event_callback (XEvent *event,
{
meta_compositor_add_window (display->compositor, window, xwindow);
}

/* 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;
Expand Down

0 comments on commit 6875256

Please sign in to comment.