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

Xlib: rely on window provider for full-screen and always-on-top

This fixes always-on-top going away when toggling full-screen and back.
parent 36938ceb
...@@ -255,7 +255,7 @@ int InitGLX13( vout_thread_t *p_vout ) ...@@ -255,7 +255,7 @@ int InitGLX13( vout_thread_t *p_vout )
* configuration was chosen, instead of selecting the frame buffer from * configuration was chosen, instead of selecting the frame buffer from
* the window. That requires reworking xcommon.c though. * the window. That requires reworking xcommon.c though.
* -- Courmisch */ * -- Courmisch */
XGetWindowAttributes( p_sys->p_display, p_sys->p_win->video_window, &att ); XGetWindowAttributes( p_sys->p_display, p_sys->window.video_window, &att );
for( int i = 0; i < i_nb && !fbconf; i++ ) for( int i = 0; i < i_nb && !fbconf; i++ )
{ {
XVisualInfo *p_vi; XVisualInfo *p_vi;
...@@ -277,7 +277,7 @@ int InitGLX13( vout_thread_t *p_vout ) ...@@ -277,7 +277,7 @@ int InitGLX13( vout_thread_t *p_vout )
/* Create the GLX window */ /* Create the GLX window */
p_sys->gwnd = glXCreateWindow( p_sys->p_display, fbconf, p_sys->gwnd = glXCreateWindow( p_sys->p_display, fbconf,
p_sys->p_win->video_window, NULL ); p_sys->window.video_window, NULL );
if( p_sys->gwnd == None ) if( p_sys->gwnd == None )
{ {
msg_Err( p_vout, "Cannot create GLX window" ); msg_Err( p_vout, "Cannot create GLX window" );
...@@ -305,8 +305,8 @@ static void SwapBuffers( vout_thread_t *p_vout ) ...@@ -305,8 +305,8 @@ static void SwapBuffers( vout_thread_t *p_vout )
vout_sys_t *p_sys = p_vout->p_sys; vout_sys_t *p_sys = p_vout->p_sys;
unsigned int i_width, i_height, i_x, i_y; unsigned int i_width, i_height, i_x, i_y;
vout_PlacePicture( p_vout, p_vout->p_sys->p_win->i_width, vout_PlacePicture( p_vout, p_vout->p_sys->window.i_width,
p_vout->p_sys->p_win->i_height, p_vout->p_sys->window.i_height,
&i_x, &i_y, &i_width, &i_height ); &i_x, &i_y, &i_width, &i_height );
glViewport( 0, 0, (GLint)i_width, (GLint)i_height ); glViewport( 0, 0, (GLint)i_width, (GLint)i_height );
...@@ -317,7 +317,7 @@ static void SwapBuffers( vout_thread_t *p_vout ) ...@@ -317,7 +317,7 @@ static void SwapBuffers( vout_thread_t *p_vout )
} }
else else
{ {
glXSwapBuffers( p_sys->p_display, p_sys->p_win->video_window ); glXSwapBuffers( p_sys->p_display, p_sys->window.video_window );
} }
} }
...@@ -333,7 +333,7 @@ void SwitchContext( vout_thread_t *p_vout ) ...@@ -333,7 +333,7 @@ void SwitchContext( vout_thread_t *p_vout )
} }
else else
{ {
glXMakeCurrent( p_sys->p_display, p_sys->p_win->video_window, glXMakeCurrent( p_sys->p_display, p_sys->window.video_window,
p_sys->gwctx ); p_sys->gwctx );
} }
} }
This diff is collapsed.
...@@ -214,12 +214,8 @@ struct vout_sys_t ...@@ -214,12 +214,8 @@ struct vout_sys_t
Visual * p_visual; /* visual pointer */ Visual * p_visual; /* visual pointer */
int i_screen; /* screen number */ int i_screen; /* screen number */
/* Our current window */ /* Our window */
x11_window_t * p_win; x11_window_t window;
/* Our two windows */
x11_window_t original_window;
x11_window_t fullscreen_window;
/* key and mouse event handling */ /* key and mouse event handling */
int i_vout_event; /* 1(Fullsupport), 2(FullscreenOnly), 3(none) */ int i_vout_event; /* 1(Fullsupport), 2(FullscreenOnly), 3(none) */
......
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