[vlc-commits] vout: eliminate dead window state code

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


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 12 19:15:14 2014 +0300| [6444fb21ac5168fc2307e68cec22de63ecf33f28] | committer: Rémi Denis-Courmont

vout: eliminate dead window state code

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

 modules/hw/vdpau/display.c         |    5 -----
 modules/video_output/gl.c          |    7 -------
 modules/video_output/kva.c         |    7 +------
 modules/video_output/macosx.m      |    5 -----
 modules/video_output/msw/common.c  |   21 ++++++++-------------
 modules/video_output/wayland/shm.c |    6 ------
 modules/video_output/xcb/glx.c     |    6 ------
 modules/video_output/xcb/x11.c     |    5 -----
 modules/video_output/xcb/xvideo.c  |    5 -----
 9 files changed, 9 insertions(+), 58 deletions(-)

diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
index 408a0b8..ab44621 100644
--- a/modules/hw/vdpau/display.c
+++ b/modules/hw/vdpau/display.c
@@ -367,11 +367,6 @@ static int Control(vout_display_t *vd, int query, va_list ap)
         const vout_display_cfg_t *c = va_arg(ap, const vout_display_cfg_t *);
         return vout_window_SetFullScreen(sys->embed, c->is_fullscreen);
     }
-    case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
-    {
-        unsigned state = va_arg(ap, unsigned);
-        return vout_window_SetState(sys->embed, state);
-    }
     case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
     {
         const vout_display_cfg_t *cfg = va_arg(ap, const vout_display_cfg_t *);
diff --git a/modules/video_output/gl.c b/modules/video_output/gl.c
index 74290b8..39ddae3 100644
--- a/modules/video_output/gl.c
+++ b/modules/video_output/gl.c
@@ -251,13 +251,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
         return vout_window_SetFullScreen (sys->gl->surface, c->is_fullscreen);
       }
 
-      case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
-      {
-        unsigned state = va_arg (ap, unsigned);
-
-        return vout_window_SetState (sys->gl->surface, state);
-      }
-
       case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
       case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
       case VOUT_DISPLAY_CHANGE_ZOOM:
diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index 4803088..d8b9cc1 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -463,12 +463,7 @@ static int Control( vout_display_t *vd, int query, va_list args )
         const unsigned state = va_arg( args, unsigned );
         const bool is_on_top = (state & VOUT_WINDOW_STATE_ABOVE) != 0;
 
-        if( sys->parent_window )
-        {
-            if( vout_window_SetState( sys->parent_window, state ))
-                return VLC_EGENERIC;
-        }
-        else if( is_on_top )
+        if( is_on_top )
             WinSetWindowPos( sys->frame, HWND_TOP, 0, 0, 0, 0, SWP_ZORDER );
 
         sys->is_on_top = is_on_top;
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index a4b5f2f..a74f269 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -330,11 +330,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
 
             return VLC_SUCCESS;
         }
-        case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
-        {
-            unsigned state = va_arg (ap, unsigned);
-            return vout_window_SetState (sys->embed, state);
-        }
         case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
         case VOUT_DISPLAY_CHANGE_ZOOM:
         case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
diff --git a/modules/video_output/msw/common.c b/modules/video_output/msw/common.c
index 5d22689..cd5c0e5 100644
--- a/modules/video_output/msw/common.c
+++ b/modules/video_output/msw/common.c
@@ -595,19 +595,14 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
         if (sys->use_desktop && is_on_top)
             return VLC_EGENERIC;
 #endif
-        if (sys->parent_window) {
-            if (vout_window_SetState(sys->parent_window, state))
-                return VLC_EGENERIC;
-        } else {
-            HMENU hMenu = GetSystemMenu(sys->hwnd, FALSE);
-
-            if (is_on_top && !(GetWindowLong(sys->hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)) {
-                CheckMenuItem(hMenu, IDM_TOGGLE_ON_TOP, MF_BYCOMMAND | MFS_CHECKED);
-                SetWindowPos(sys->hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
-            } else if (!is_on_top && (GetWindowLong(sys->hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)) {
-                CheckMenuItem(hMenu, IDM_TOGGLE_ON_TOP, MF_BYCOMMAND | MFS_UNCHECKED);
-                SetWindowPos(sys->hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
-            }
+        HMENU hMenu = GetSystemMenu(sys->hwnd, FALSE);
+
+        if (is_on_top && !(GetWindowLong(sys->hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)) {
+            CheckMenuItem(hMenu, IDM_TOGGLE_ON_TOP, MF_BYCOMMAND | MFS_CHECKED);
+            SetWindowPos(sys->hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
+        } else if (!is_on_top && (GetWindowLong(sys->hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)) {
+            CheckMenuItem(hMenu, IDM_TOGGLE_ON_TOP, MF_BYCOMMAND | MFS_UNCHECKED);
+            SetWindowPos(sys->hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
         }
         sys->is_on_top = is_on_top;
         return VLC_SUCCESS;
diff --git a/modules/video_output/wayland/shm.c b/modules/video_output/wayland/shm.c
index 380a881..42a0840 100644
--- a/modules/video_output/wayland/shm.c
+++ b/modules/video_output/wayland/shm.c
@@ -278,12 +278,6 @@ static int Control(vout_display_t *vd, int query, va_list ap)
             return vout_window_SetFullScreen(sys->embed, cfg->is_fullscreen);
         }
 
-        case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
-        {
-            unsigned state = va_arg(ap, unsigned);
-            return vout_window_SetState(sys->embed, state);
-        }
-
         case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
         case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
         case VOUT_DISPLAY_CHANGE_ZOOM:
diff --git a/modules/video_output/xcb/glx.c b/modules/video_output/xcb/glx.c
index 7a3c511..3165949 100644
--- a/modules/video_output/xcb/glx.c
+++ b/modules/video_output/xcb/glx.c
@@ -221,12 +221,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
         return vout_window_SetFullScreen (sys->gl->surface, c->is_fullscreen);
     }
 
-    case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
-    {
-        unsigned state = va_arg (ap, unsigned);
-        return vout_window_SetState (sys->gl->surface, state);
-    }
-
     case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
     case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
     case VOUT_DISPLAY_CHANGE_ZOOM:
diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 4316980..7086d00 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -495,11 +495,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
                               values);
         return VLC_SUCCESS;
     }
-    case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
-    {
-        unsigned state = va_arg (ap, unsigned);
-        return vout_window_SetState (sys->embed, state);
-    }
 
     case VOUT_DISPLAY_CHANGE_ZOOM:
     case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 325e224..f820e74 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -788,11 +788,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
         xcb_flush (p_sys->conn);
         return VLC_SUCCESS;
     }
-    case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
-    {
-        unsigned state = va_arg (ap, unsigned);
-        return vout_window_SetState (p_sys->embed, state);
-    }
 
     /* Hide the mouse. It will be send when
      * vout_display_t::info.b_hide_mouse is false */



More information about the vlc-commits mailing list