[vlc-commits] window: dispatch the close event to the vout thread

Rémi Denis-Courmont git at videolan.org
Thu Oct 16 19:26:04 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 12 16:23:17 2014 +0300| [06aedfd00d9474a654bd9faad36e2799b527ac6a] | committer: Rémi Denis-Courmont

window: dispatch the close event to the vout thread

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

 src/video_output/window.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/video_output/window.c b/src/video_output/window.c
index e906043..1fc9873 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -113,8 +113,10 @@ void vout_window_Delete(vout_window_t *window)
 }
 
 /* Video output display integration */
+#include <vlc_vout.h>
 #include <vlc_vout_display.h>
 #include "window.h"
+#include "event.h"
 
 typedef struct vout_display_window
 {
@@ -140,6 +142,13 @@ static void vout_display_window_ResizeNotify(vout_window_t *window,
     vlc_mutex_unlock(&state->lock);
 }
 
+static void vout_display_window_CloseNotify(vout_window_t *window)
+{
+    vout_thread_t *vout = (vout_thread_t *)window->p_parent;
+
+    vout_SendEventClose(vout);
+}
+
 /**
  * Creates a video window, initially without any attached display.
  */
@@ -158,6 +167,7 @@ vout_window_t *vout_display_window_New(vout_thread_t *vout,
     vout_window_owner_t owner = {
         .sys = state,
         .resized = vout_display_window_ResizeNotify,
+        .closed = vout_display_window_CloseNotify,
     };
     vout_window_t *window;
 



More information about the vlc-commits mailing list