Commit d4248374 authored by Victor Toso's avatar Victor Toso Committed by Carlos Garnacho

gdkseatdefault: Don't hide GdkSurface on grab failure

Application is not expecting that.

Bug found due gdk_seat_grab() failure on Lock Screen. When user
Unlock the screen, the application is visible but does not receive
enter-event any more on X11/GNOME.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1485968
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1571422Signed-off-by: Victor Toso's avatarVictor Toso <victortoso@redhat.com>
Signed-off-by: Carlos Garnacho's avatarCarlos Garnacho <carlosg@gnome.org>
parent 694d9aa9
Pipeline #13444 passed with stages
in 63 minutes and 22 seconds
......@@ -115,8 +115,10 @@ gdk_seat_default_grab (GdkSeat *seat,
GdkSeatDefaultPrivate *priv;
guint32 evtime = event ? gdk_event_get_time (event) : GDK_CURRENT_TIME;
GdkGrabStatus status = GDK_GRAB_SUCCESS;
gboolean was_visible;
priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat));
was_visible = gdk_surface_is_visible (surface);
if (prepare_func)
(prepare_func) (seat, surface, prepare_func_data);
......@@ -163,10 +165,12 @@ gdk_seat_default_grab (GdkSeat *seat,
{
if (capabilities & ~GDK_SEAT_CAPABILITY_KEYBOARD)
gdk_device_ungrab (priv->master_pointer, evtime);
gdk_surface_hide (surface);
}
}
if (status != GDK_GRAB_SUCCESS && !was_visible)
gdk_surface_hide (surface);
G_GNUC_END_IGNORE_DEPRECATIONS;
return status;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment