[vlc-commits] splitter: handle key press events

Rémi Denis-Courmont git at videolan.org
Sun Jan 13 14:55:09 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jan 13 15:41:18 2019 +0200| [1921811cf880cded5027c6bb99b0c32bfd9c7646] | committer: Rémi Denis-Courmont

splitter: handle key press events

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1921811cf880cded5027c6bb99b0c32bfd9c7646
---

 modules/video_output/splitter.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/modules/video_output/splitter.c b/modules/video_output/splitter.c
index 2e9fb10c5c..1a08848b80 100644
--- a/modules/video_output/splitter.c
+++ b/modules/video_output/splitter.c
@@ -174,10 +174,21 @@ static void vlc_vidsplit_window_MouseEvent(vout_window_t *wnd,
     vlc_mutex_unlock(&sys->lock);
 }
 
+static void vlc_vidsplit_window_KeyboardEvent(vout_window_t *wnd, unsigned key)
+{
+    vout_display_t *vd = (vout_display_t *)wnd->obj.parent;
+    vout_display_sys_t *sys = vd->sys;
+
+    vlc_mutex_lock(&sys->lock);
+    vout_window_ReportKeyPress(vd->cfg->window, key);
+    vlc_mutex_unlock(&sys->lock);
+}
+
 static const struct vout_window_callbacks vlc_vidsplit_window_cbs = {
     .resized = vlc_vidsplit_window_Resized,
     .closed = vlc_vidsplit_window_Closed,
     .mouse_event = vlc_vidsplit_window_MouseEvent,
+    .keyboard_event = vlc_vidsplit_window_KeyboardEvent,
 };
 
 static vout_window_t *video_splitter_CreateWindow(vlc_object_t *obj,



More information about the vlc-commits mailing list