[vlc-commits] splitter: handle mouse events

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


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

splitter: handle mouse events

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

 modules/video_output/splitter.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/splitter.c b/modules/video_output/splitter.c
index ca5fa61632..e19df069a2 100644
--- a/modules/video_output/splitter.c
+++ b/modules/video_output/splitter.c
@@ -146,10 +146,23 @@ static void vlc_vidsplit_window_Closed(vout_window_t *wnd)
         vout_display_Delete(display);
 }
 
-static const struct vout_window_callbacks vlc_vidsplit_window_cbs =
+static void vlc_vidsplit_window_MouseEvent(vout_window_t *wnd,
+                                           const vout_window_mouse_event_t *e)
 {
+    struct vlc_vidsplit_part *part = wnd->owner.sys;
+    vout_display_t *vd = (vout_display_t *)wnd->obj.parent;
+    vout_display_sys_t *sys = vd->sys;
+    vout_window_mouse_event_t ev = *e;
+
+    if (video_splitter_Mouse(&sys->splitter, part - sys->parts,
+                             &ev) == VLC_SUCCESS)
+        vout_window_SendMouseEvent(vd->cfg->window, &ev);
+}
+
+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,
 };
 
 static vout_window_t *video_splitter_CreateWindow(vlc_object_t *obj,



More information about the vlc-commits mailing list