vlc | branch: master | Rémi Denis-Courmont <r...@remlab.net> | Sun Aug  6 
10:48:50 2017 +0300| [fae9d3db8e05fd1d3181ce16924d40dd5f70248b] | committer: 
Jean-Baptiste Kempf

vout: rename and invert has_hide_mouse

The name was meant to indicate that the plugin hid the pointer
autonomously. But it was ostensibly confused as implying that the
plugin had a mouse hiding control (basically the exact opposite).
In fact, it really meant that the mouse hiding control would NOT be
used.

This tries to provide a slightly less confusing name, and accordingly
inverts the meaning. This is also realigns with the convention that
false should be the default setting (which was broken in the grand
grand parent of this changeset).

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

 include/vlc_vout_display.h              | 4 ++--
 modules/video_output/aa.c               | 2 +-
 modules/video_output/caca.c             | 2 +-
 modules/video_output/kva.c              | 2 +-
 modules/video_output/win32/direct3d11.c | 2 +-
 modules/video_output/win32/direct3d9.c  | 2 +-
 modules/video_output/win32/directdraw.c | 2 +-
 modules/video_output/win32/glwin32.c    | 2 +-
 modules/video_output/win32/wingdi.c     | 2 +-
 src/video_output/display.c              | 4 ++--
 10 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index d1cc1ba8a7..27566b776e 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -128,7 +128,7 @@ typedef struct {
 typedef struct {
     bool is_slow;                           /* The picture memory has slow 
read/write */
     bool has_double_click;                  /* Is double-click generated */
-    bool has_hide_mouse;                    /* Is mouse automatically hidden */
+    bool needs_hide_mouse;                  /* Needs VOUT_DISPLAY_HIDE_MOUSE */
     bool has_pictures_invalid;              /* Will 
VOUT_DISPLAY_EVENT_PICTURES_INVALID be used */
     const vlc_fourcc_t *subpicture_chromas; /* List of supported chromas for 
subpicture rendering. */
 } vout_display_info_t;
@@ -139,7 +139,7 @@ typedef struct {
 enum {
     /* Hide the mouse. It will be sent when
      * vout_display_t::info.b_hide_mouse is false */
-    VOUT_DISPLAY_HIDE_MOUSE,
+    VOUT_DISPLAY_HIDE_MOUSE VLC_DEPRECATED,
 
     /* Ask to reset the internal buffers after a 
VOUT_DISPLAY_EVENT_PICTURES_INVALID
      * request.
diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c
index b69ca15be7..e9146d082c 100644
--- a/modules/video_output/aa.c
+++ b/modules/video_output/aa.c
@@ -129,7 +129,7 @@ static int Open(vlc_object_t *object)
     /* Setup vout_display now that everything is fine */
     vd->fmt = fmt;
     vd->info.has_pictures_invalid = true;
-    vd->info.has_hide_mouse = false;
+    vd->info.needs_hide_mouse = true;
 
     vd->pool    = Pool;
     vd->prepare = Prepare;
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 5e3579e734..33a0409820 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -191,7 +191,7 @@ static int Open(vlc_object_t *object)
 
     /* Setup vout_display now that everything is fine */
     vd->fmt = fmt;
-    vd->info.has_hide_mouse = false;
+    vd->info.needs_hide_mouse = true;
 
     vd->pool    = Pool;
     vd->prepare = Prepare;
diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index df8803ad88..dbd2a737ed 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -158,7 +158,7 @@ static void PMThread( void *arg )
     vout_display_info_t info = vd->info;
     info.is_slow = false;
     info.has_double_click = true;
-    info.has_hide_mouse = false;
+    info.needs_hide_mouse = true;
     info.has_pictures_invalid = false;
 
     MorphToPM();
diff --git a/modules/video_output/win32/direct3d11.c 
b/modules/video_output/win32/direct3d11.c
index ff1466a857..4fbeeb8d26 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -540,7 +540,7 @@ static int Open(vlc_object_t *object)
     vd->fmt = fmt;
 
     vd->info.has_double_click     = true;
-    vd->info.has_hide_mouse       = false;
+    vd->info.needs_hide_mouse     = true;
     vd->info.has_pictures_invalid = vd->info.is_slow;
 
     if (var_InheritBool(vd, "direct3d11-hw-blending") &&
diff --git a/modules/video_output/win32/direct3d9.c 
b/modules/video_output/win32/direct3d9.c
index 407c5e81f0..b6e9c1f79e 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -271,7 +271,7 @@ static int Open(vlc_object_t *object)
     vout_display_info_t info = vd->info;
     info.is_slow = !is_d3d9_opaque(fmt.i_chroma);
     info.has_double_click = true;
-    info.has_hide_mouse = false;
+    info.needs_hide_mouse = true;
     info.has_pictures_invalid = !is_d3d9_opaque(fmt.i_chroma);
     if (var_InheritBool(vd, "direct3d9-hw-blending") &&
         sys->d3dregion_format != D3DFMT_UNKNOWN &&
diff --git a/modules/video_output/win32/directdraw.c 
b/modules/video_output/win32/directdraw.c
index d3c59310e3..67ac86495e 100644
--- a/modules/video_output/win32/directdraw.c
+++ b/modules/video_output/win32/directdraw.c
@@ -233,7 +233,7 @@ static int Open(vlc_object_t *object)
     vout_display_info_t info = vd->info;
     info.is_slow = true;
     info.has_double_click = true;
-    info.has_hide_mouse = false;
+    info.needs_hide_mouse = true;
     info.has_pictures_invalid = true;
 
     /* Interaction TODO support starting with wallpaper mode */
diff --git a/modules/video_output/win32/glwin32.c 
b/modules/video_output/win32/glwin32.c
index 4b94a286c3..c6eb15650b 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -244,7 +244,7 @@ static int Open(vlc_object_t *object)
 
     vout_display_info_t info = vd->info;
     info.has_double_click = true;
-    info.has_hide_mouse = false;
+    info.needs_hide_mouse = true;
     info.subpicture_chromas = subpicture_chromas;
 
    /* Setup vout_display now that everything is fine */
diff --git a/modules/video_output/win32/wingdi.c 
b/modules/video_output/win32/wingdi.c
index 4dc43a7ee2..77ca3aa1f7 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -106,7 +106,7 @@ static int Open(vlc_object_t *object)
     vout_display_info_t info = vd->info;
     info.is_slow              = false;
     info.has_double_click     = true;
-    info.has_hide_mouse       = false;
+    info.needs_hide_mouse     = true;
     info.has_pictures_invalid = true;
 
     /* */
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 8c6753ead0..778942be4e 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -92,7 +92,7 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
 
     vd->info.is_slow = false;
     vd->info.has_double_click = false;
-    vd->info.has_hide_mouse = true;
+    vd->info.needs_hide_mouse = false;
     vd->info.has_pictures_invalid = false;
     vd->info.subpicture_chromas = NULL;
 
@@ -754,7 +754,7 @@ bool vout_ManageDisplay(vout_display_t *vd, bool 
allow_reset_pictures)
     if (hide_mouse) {
         msg_Dbg(vd, "auto hiding mouse cursor");
         if (vout_HideWindowMouse(osys->vout, true) != VLC_SUCCESS
-         && !vd->info.has_hide_mouse)
+         && vd->info.needs_hide_mouse)
             vout_display_Control(vd, VOUT_DISPLAY_HIDE_MOUSE);
     }
 

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

Reply via email to