vlc | branch: master | Rémi Denis-Courmont <r...@remlab.net> | Sun Aug  6 
16:26:55 2017 +0300| [ab6349c924e311c24c156aa6ca8205f975608429] | committer: 
Rémi Denis-Courmont

window: add info struct and double click flag

Like display plugins before, window plugins need to be handled
differently if they emit double click events than not.

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

 include/vlc_vout_window.h | 5 +++++
 modules/gui/qt/qt.cpp     | 1 +
 src/video_output/window.c | 1 +
 3 files changed, 7 insertions(+)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index 69a719bd2a..4081a0b856 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -147,6 +147,11 @@ struct vout_window_t {
      */
     int (*control)(vout_window_t *, int query, va_list);
 
+    struct {
+        bool has_double_click; /**< Whether double click events are sent,
+                                    or need to be emulated */
+    } info;
+
     /* Private place holder for the vout_window_t module (optional)
      *
      * A module is free to use it as it wishes.
diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
index 2ad68eb401..f521d04171 100644
--- a/modules/gui/qt/qt.cpp
+++ b/modules/gui/qt/qt.cpp
@@ -755,6 +755,7 @@ static int WindowOpen( vout_window_t *p_wnd, const 
vout_window_cfg_t *cfg )
     if( !p_mi->getVideo( p_wnd, cfg->width, cfg->height, cfg->is_fullscreen ) )
         return VLC_EGENERIC;
 
+    p_wnd->info.has_double_click = true;
     p_wnd->control = WindowControl;
     p_wnd->sys = (vout_window_sys_t*)p_mi;
     return VLC_SUCCESS;
diff --git a/src/video_output/window.c b/src/video_output/window.c
index 6d76f12199..bd43592edb 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -59,6 +59,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj, const char 
*module,
     vout_window_t *window = &w->wnd;
 
     memset(&window->handle, 0, sizeof(window->handle));
+    window->info.has_double_click = false;
     window->control = NULL;
     window->sys = NULL;
 

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to