Commit a31ac0a3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

display: remove useless "window fullscreen" parameter

The only effect of the event when the window flag is true is to update
the fullscreen flag in display configuration. And that flag is unused
when the display is windowed.
parent f31997e0
...@@ -332,10 +332,9 @@ static inline void vout_display_SendEventKey(vout_display_t *vd, int key) ...@@ -332,10 +332,9 @@ static inline void vout_display_SendEventKey(vout_display_t *vd, int key)
vout_window_ReportKeyPress(vd->cfg->window, key); vout_window_ReportKeyPress(vd->cfg->window, key);
} }
static inline void vout_display_SendEventFullscreen(vout_display_t *vd, bool is_fullscreen, static inline void vout_display_SendEventFullscreen(vout_display_t *vd, bool is_fullscreen)
bool is_window_fullscreen)
{ {
vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_FULLSCREEN, is_fullscreen, is_window_fullscreen); vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_FULLSCREEN, is_fullscreen);
} }
VLC_DEPRECATED /* Core needs not know about this. Don't call. */ VLC_DEPRECATED /* Core needs not know about this. Don't call. */
......
...@@ -109,7 +109,7 @@ int CommonInit(vout_display_t *vd) ...@@ -109,7 +109,7 @@ int CommonInit(vout_display_t *vd)
if (vd->cfg->is_fullscreen) { if (vd->cfg->is_fullscreen) {
if (CommonControlSetFullscreen(vd, true)) if (CommonControlSetFullscreen(vd, true))
vout_display_SendEventFullscreen(vd, false, false); vout_display_SendEventFullscreen(vd, false);
} }
#endif #endif
......
...@@ -333,7 +333,7 @@ static int Open(vlc_object_t *object) ...@@ -333,7 +333,7 @@ static int Open(vlc_object_t *object)
/* Fix state in case of desktop mode */ /* Fix state in case of desktop mode */
if (sys->sys.use_desktop && vd->cfg->is_fullscreen) if (sys->sys.use_desktop && vd->cfg->is_fullscreen)
vout_display_SendEventFullscreen(vd, false, false); vout_display_SendEventFullscreen(vd, false);
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
...@@ -669,13 +669,13 @@ static int ControlReopenDevice(vout_display_t *vd) ...@@ -669,13 +669,13 @@ static int ControlReopenDevice(vout_display_t *vd)
if (sys->sys.use_desktop) { if (sys->sys.use_desktop) {
/* Disable fullscreen/on_top while using desktop */ /* Disable fullscreen/on_top while using desktop */
if (sys->desktop_save.is_fullscreen) if (sys->desktop_save.is_fullscreen)
vout_display_SendEventFullscreen(vd, false, false); vout_display_SendEventFullscreen(vd, false);
if (sys->desktop_save.is_on_top) if (sys->desktop_save.is_on_top)
vout_display_SendWindowState(vd, VOUT_WINDOW_STATE_NORMAL); vout_display_SendWindowState(vd, VOUT_WINDOW_STATE_NORMAL);
} else { } else {
/* Restore fullscreen/on_top */ /* Restore fullscreen/on_top */
if (sys->desktop_save.is_fullscreen) if (sys->desktop_save.is_fullscreen)
vout_display_SendEventFullscreen(vd, true, false); vout_display_SendEventFullscreen(vd, true);
if (sys->desktop_save.is_on_top) if (sys->desktop_save.is_on_top)
vout_display_SendWindowState(vd, VOUT_WINDOW_STATE_ABOVE); vout_display_SendWindowState(vd, VOUT_WINDOW_STATE_ABOVE);
} }
......
...@@ -342,7 +342,6 @@ typedef struct { ...@@ -342,7 +342,6 @@ typedef struct {
unsigned height_saved; unsigned height_saved;
bool ch_fullscreen; bool ch_fullscreen;
bool is_fullscreen; bool is_fullscreen;
bool window_fullscreen;
bool ch_wm_state; bool ch_wm_state;
unsigned wm_state; unsigned wm_state;
#endif #endif
...@@ -559,7 +558,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args) ...@@ -559,7 +558,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
#if defined(_WIN32) || defined(__OS2__) #if defined(_WIN32) || defined(__OS2__)
case VOUT_DISPLAY_EVENT_FULLSCREEN: { case VOUT_DISPLAY_EVENT_FULLSCREEN: {
const int is_fullscreen = (int)va_arg(args, int); const int is_fullscreen = (int)va_arg(args, int);
const bool window_fullscreen = va_arg(args, int);
msg_Dbg(vd, "VoutDisplayEvent 'fullscreen' %d", is_fullscreen); msg_Dbg(vd, "VoutDisplayEvent 'fullscreen' %d", is_fullscreen);
...@@ -567,7 +565,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args) ...@@ -567,7 +565,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
if (!is_fullscreen != !osys->is_fullscreen) { if (!is_fullscreen != !osys->is_fullscreen) {
osys->ch_fullscreen = true; osys->ch_fullscreen = true;
osys->is_fullscreen = is_fullscreen; osys->is_fullscreen = is_fullscreen;
osys->window_fullscreen = window_fullscreen;
} }
vlc_mutex_unlock(&osys->lock); vlc_mutex_unlock(&osys->lock);
break; break;
...@@ -690,12 +687,11 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures) ...@@ -690,12 +687,11 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
/* */ /* */
#if defined(_WIN32) || defined(__OS2__) #if defined(_WIN32) || defined(__OS2__)
if (ch_fullscreen) { if (ch_fullscreen) {
if (osys->window_fullscreen if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_FULLSCREEN,
|| vout_display_Control(vd, VOUT_DISPLAY_CHANGE_FULLSCREEN,
is_fullscreen) == VLC_SUCCESS) { is_fullscreen) == VLC_SUCCESS) {
osys->cfg.is_fullscreen = is_fullscreen; osys->cfg.is_fullscreen = is_fullscreen;
if (!is_fullscreen && !osys->window_fullscreen) if (!is_fullscreen)
vout_SetDisplayWindowSize(osys->vout, osys->width_saved, vout_SetDisplayWindowSize(osys->vout, osys->width_saved,
osys->height_saved); osys->height_saved);
} else } else
......
...@@ -1346,12 +1346,6 @@ static void ThreadChangeFullscreen(vout_thread_t *vout, bool fullscreen) ...@@ -1346,12 +1346,6 @@ static void ThreadChangeFullscreen(vout_thread_t *vout, bool fullscreen)
return; /* splitter! */ return; /* splitter! */
vout_window_SetFullScreen(window, fullscreen); vout_window_SetFullScreen(window, fullscreen);
#if defined(_WIN32) || defined(__OS2__)
/* FIXME: remove this event */
if (vout->p->display.vd != NULL)
vout_display_SendEventFullscreen(vout->p->display.vd, fullscreen,
true);
#endif
} }
static void ThreadChangeWindowState(vout_thread_t *vout, unsigned state) static void ThreadChangeWindowState(vout_thread_t *vout, unsigned state)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment