[vlc-commits] display: process window state synchronously
Rémi Denis-Courmont
git at videolan.org
Mon Dec 31 17:40:22 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Dec 30 21:39:07 2018 +0200| [1cfd6bb0a9c03f3455e1fe3d3758b31afad4ef2b] | committer: Rémi Denis-Courmont
display: process window state synchronously
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1cfd6bb0a9c03f3455e1fe3d3758b31afad4ef2b
---
include/vlc_vout_display.h | 5 ++---
src/video_output/display.c | 28 +---------------------------
2 files changed, 3 insertions(+), 30 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 8c8d7b1b8f..2c8ad85155 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -171,7 +171,6 @@ enum {
#if defined(_WIN32) || defined(__OS2__)
VOUT_DISPLAY_EVENT_FULLSCREEN,
- VOUT_DISPLAY_EVENT_WINDOW_STATE,
#endif
/* Mouse event */
@@ -364,10 +363,10 @@ static inline void vout_display_SendEventFullscreen(vout_display_t *vd, bool is_
vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_FULLSCREEN, is_fullscreen);
}
-VLC_DEPRECATED /* Core needs not know about this. Don't call. */
+VLC_DEPRECATED
static inline void vout_display_SendWindowState(vout_display_t *vd, unsigned state)
{
- vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_WINDOW_STATE, state);
+ vout_display_Control(vd, VOUT_DISPLAY_CHANGE_WINDOW_STATE, state);
}
#endif
static inline void vout_display_SendEventMouseMoved(vout_display_t *vd, int x, int y)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index c17716a581..cd0521a315 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -335,8 +335,6 @@ typedef struct {
#if defined(_WIN32) || defined(__OS2__)
bool ch_fullscreen;
bool is_fullscreen;
- bool ch_wm_state;
- unsigned wm_state;
#endif
struct {
@@ -553,20 +551,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
vlc_mutex_unlock(&osys->lock);
break;
}
-
- case VOUT_DISPLAY_EVENT_WINDOW_STATE: {
- const unsigned state = va_arg(args, unsigned);
-
- msg_Dbg(vd, "VoutDisplayEvent 'window state' %u", state);
-
- vlc_mutex_lock(&osys->lock);
- if (state != osys->wm_state) {
- osys->ch_wm_state = true;
- osys->wm_state = state;
- }
- vlc_mutex_unlock(&osys->lock);
- break;
- }
#endif
case VOUT_DISPLAY_EVENT_PICTURES_INVALID: {
@@ -627,13 +611,9 @@ void vout_ManageDisplay(vout_display_t *vd)
bool ch_fullscreen = osys->ch_fullscreen;
bool is_fullscreen = osys->is_fullscreen;
osys->ch_fullscreen = false;
-
- bool ch_wm_state = osys->ch_wm_state;
- unsigned wm_state = osys->wm_state;
- osys->ch_wm_state = false;
vlc_mutex_unlock(&osys->lock);
- if (!ch_fullscreen && !ch_wm_state)
+ if (!ch_fullscreen)
break;
/* */
@@ -644,12 +624,6 @@ void vout_ManageDisplay(vout_display_t *vd)
} else
msg_Err(vd, "Failed to set fullscreen");
}
-
- /* */
- if (ch_wm_state
- && vout_display_Control(vd, VOUT_DISPLAY_CHANGE_WINDOW_STATE,
- wm_state))
- msg_Err(vd, "Failed to set on top");
}
}
#endif
More information about the vlc-commits
mailing list