forked from AuroraMiddleware/gtk
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=1571422 Signed-off-by: Victor Toso <victortoso@redhat.com> Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
This commit is contained in:
parent
694d9aa9f9
commit
d424837496
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user