mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-09 04:00:08 +00:00
gdkseatdefault: Don't hide GdkWindow 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 <mrgarnacho@gmail.com>
This commit is contained in:
parent
f62ee9f74a
commit
2c8b95a518
@ -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_window_is_visible (window);
|
||||
|
||||
if (prepare_func)
|
||||
(prepare_func) (seat, window, 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_window_hide (window);
|
||||
}
|
||||
}
|
||||
|
||||
if (status != GDK_GRAB_SUCCESS && !was_visible)
|
||||
gdk_window_hide (window);
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
|
||||
return status;
|
||||
|
Loading…
Reference in New Issue
Block a user