From d7a3d782794d4d70e216f22cd013701dd1ceffee Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Fri, 3 Oct 2014 16:04:15 +0200 Subject: [PATCH] xfreerdp: add support for PlaySound Using X keyboard bell. --- client/X11/xf_client.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/X11/xf_client.c b/client/X11/xf_client.c index d7bb48ec2..7259d8275 100644 --- a/client/X11/xf_client.c +++ b/client/X11/xf_client.c @@ -85,6 +85,7 @@ #include #include #include +#include #include "xf_gdi.h" #include "xf_rail.h" @@ -707,6 +708,12 @@ static void xf_post_disconnect(freerdp *instance) xf_monitors_free(xfc, instance->settings); } +static void xf_play_sound(rdpContext* context, PLAY_SOUND_UPDATE* play_sound) +{ + xfContext* xfc = (xfContext*) context; + XkbBell(xfc->display, None, 100, 0); +} + /** * Callback given to freerdp_connect() to process the pre-connect operations. * It will fill the rdp_freerdp structure (instance) with the appropriate options to use for the connection. @@ -974,6 +981,7 @@ BOOL xf_post_connect(freerdp *instance) palette_cache_register_callbacks(instance->update); instance->update->BitmapUpdate = xf_gdi_bitmap_update; } + instance->update->PlaySound = xf_play_sound; instance->context->rail = rail_new(instance->settings); rail_register_update_callbacks(instance->context->rail, instance->update);