vout: rename and invert has_hide_mouse
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 6 Aug 2017 07:48:50 +0000 (10:48 +0300)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 6 Aug 2017 20:25:26 +0000 (22:25 +0200)
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).

include/vlc_vout_display.h
modules/video_output/aa.c
modules/video_output/caca.c
modules/video_output/kva.c
modules/video_output/win32/direct3d11.c
modules/video_output/win32/direct3d9.c
modules/video_output/win32/directdraw.c
modules/video_output/win32/glwin32.c
modules/video_output/win32/wingdi.c
src/video_output/display.c

index d1cc1ba..27566b7 100644 (file)
@@ -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.
index b69ca15..e9146d0 100644 (file)
@@ -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;
index 5e3579e..33a0409 100644 (file)
@@ -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;
index df8803a..dbd2a73 100644 (file)
@@ -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();
index ff1466a..4fbeeb8 100644 (file)
@@ -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") &&
index 407c5e8..b6e9c1f 100644 (file)
@@ -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 &&
index d3c5931..67ac864 100644 (file)
@@ -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 */
index 4b94a28..c6eb156 100644 (file)
@@ -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 */
index 4dc43a7..77ca3aa 100644 (file)
@@ -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;
 
     /* */
index 8c6753e..778942b 100644 (file)
@@ -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);
     }