diff --git a/client/X11/xf_client.c b/client/X11/xf_client.c index 7ea61440c..a3b6ad92b 100644 --- a/client/X11/xf_client.c +++ b/client/X11/xf_client.c @@ -726,14 +726,14 @@ void xf_toggle_fullscreen(xfContext* xfc) PubSub_OnWindowStateChange(context->pubSub, context, &e); } -void xf_toggle_control(xfContext* xfc) +BOOL xf_toggle_control(xfContext* xfc) { EncomspClientContext* encomsp; ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU pdu; encomsp = xfc->encomsp; if (!encomsp) - return; + return FALSE; pdu.ParticipantId = 0; pdu.Flags = ENCOMSP_REQUEST_VIEW; @@ -743,6 +743,7 @@ void xf_toggle_control(xfContext* xfc) encomsp->ChangeParticipantControlLevel(encomsp, &pdu); xfc->controlToggle = !xfc->controlToggle; + return TRUE; } /** diff --git a/client/X11/xf_keyboard.c b/client/X11/xf_keyboard.c index 6286d88c5..384de53fc 100644 --- a/client/X11/xf_keyboard.c +++ b/client/X11/xf_keyboard.c @@ -516,8 +516,8 @@ BOOL xf_keyboard_handle_special_keys(xfContext* xfc, KeySym keysym) if (mod.Ctrl && mod.Alt) { /* Ctrl-Alt-C: toggle control */ - xf_toggle_control(xfc); - return TRUE; + if (xf_toggle_control(xfc)) + return TRUE; } } diff --git a/client/X11/xfreerdp.h b/client/X11/xfreerdp.h index 5d6dfb96c..fc3005cd3 100644 --- a/client/X11/xfreerdp.h +++ b/client/X11/xfreerdp.h @@ -238,7 +238,7 @@ struct xf_context BOOL xf_create_window(xfContext* xfc); void xf_toggle_fullscreen(xfContext* xfc); -void xf_toggle_control(xfContext* xfc); +BOOL xf_toggle_control(xfContext* xfc); void xf_encomsp_init(xfContext* xfc, EncomspClientContext* encomsp); void xf_encomsp_uninit(xfContext* xfc, EncomspClientContext* encomsp);