Merge branch 'untrusted-beep-3' into 'gtk-3-24'

x11: Don't beep on untrusted displays

See merge request GNOME/gtk!3462
This commit is contained in:
Matthias Clasen 2021-04-21 10:12:19 +00:00
commit ca6794b2d8
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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)
{