forked from AuroraMiddleware/gtk
Merge branch 'untrusted-beep' into 'master'
x11: Don't beep on untrusted displays Closes #3862 See merge request GNOME/gtk!3463
This commit is contained in:
commit
142984cbf7
@ -1795,6 +1795,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
|
||||
|
@ -4542,6 +4542,9 @@ gdk_x11_surface_beep (GdkSurface *surface)
|
||||
|
||||
display = GDK_SURFACE_DISPLAY (surface);
|
||||
|
||||
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