mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
x11: Don't beep on untrusted displays
This can trigger BadAccess, and we don't want that. Fixes: #3862
This commit is contained in:
parent
191433bf0a
commit
9c84f7645e
@ -1964,6 +1964,9 @@ _gdk_x11_display_update_grab_info_ungrab (GdkDisplay *display,
|
||||
static void
|
||||
gdk_x11_display_beep (GdkDisplay *display)
|
||||
{
|
||||
if (!GDK_X11_DISPLAY (display)->trusted_client)
|
||||
return;
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
XkbBell (GDK_DISPLAY_XDISPLAY (display), None, 0, None);
|
||||
#else
|
||||
|
@ -5472,6 +5472,9 @@ gdk_x11_window_beep (GdkWindow *window)
|
||||
|
||||
display = GDK_WINDOW_DISPLAY (window);
|
||||
|
||||
if (!GDK_X11_DISPLAY (display)->trusted_client)
|
||||
return FALSE;
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
if (GDK_X11_DISPLAY (display)->use_xkb)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user