xfreerdp: add support for PlaySound
Using X keyboard bell.
This commit is contained in:
parent
f40053577f
commit
d7a3d78279
@ -85,6 +85,7 @@
|
||||
#include <winpr/synch.h>
|
||||
#include <winpr/file.h>
|
||||
#include <winpr/print.h>
|
||||
#include <X11/XKBlib.h>
|
||||
|
||||
#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);
|
||||
|
Loading…
Reference in New Issue
Block a user