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

Xlib: remove redumdant window management code

parent 739d2f74
...@@ -137,7 +137,6 @@ static int xvmc_check_yv12( Display *display, XvPortID port ); ...@@ -137,7 +137,6 @@ static int xvmc_check_yv12( Display *display, XvPortID port );
static void xvmc_update_XV_DOUBLE_BUFFER( vout_thread_t *p_vout ); static void xvmc_update_XV_DOUBLE_BUFFER( vout_thread_t *p_vout );
#endif #endif
static void TestNetWMSupport( vout_thread_t * );
static int ConvertKey( int ); static int ConvertKey( int );
static int X11ErrorHandler( Display *, XErrorEvent * ); static int X11ErrorHandler( Display *, XErrorEvent * );
...@@ -361,8 +360,6 @@ int Activate ( vlc_object_t *p_this ) ...@@ -361,8 +360,6 @@ int Activate ( vlc_object_t *p_this )
p_vout->p_sys->b_altfullscreen = 0; p_vout->p_sys->b_altfullscreen = 0;
p_vout->p_sys->i_time_button_last_pressed = 0; p_vout->p_sys->i_time_button_last_pressed = 0;
TestNetWMSupport( p_vout );
#ifdef MODULE_NAME_IS_xvmc #ifdef MODULE_NAME_IS_xvmc
p_vout->p_sys->p_last_subtitle_save = NULL; p_vout->p_sys->p_last_subtitle_save = NULL;
psz_value = config_GetPsz( p_vout, "xvmc-deinterlace-mode" ); psz_value = config_GetPsz( p_vout, "xvmc-deinterlace-mode" );
...@@ -2737,81 +2734,6 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args ) ...@@ -2737,81 +2734,6 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
} }
} }
/*****************************************************************************
* TestNetWMSupport: tests for Extended Window Manager Hints support
*****************************************************************************/
static void TestNetWMSupport( vout_thread_t *p_vout )
{
int i_ret, i_format;
unsigned long i, i_items, i_bytesafter;
Atom net_wm_supported;
union { Atom *p_atom; unsigned char *p_char; } p_args;
p_args.p_atom = NULL;
p_vout->p_sys->b_net_wm_state_fullscreen =
p_vout->p_sys->b_net_wm_state_above =
p_vout->p_sys->b_net_wm_state_below =
p_vout->p_sys->b_net_wm_state_stays_on_top =
false;
net_wm_supported =
XInternAtom( p_vout->p_sys->p_display, "_NET_SUPPORTED", False );
i_ret = XGetWindowProperty( p_vout->p_sys->p_display,
DefaultRootWindow( p_vout->p_sys->p_display ),
net_wm_supported,
0, 16384, False, AnyPropertyType,
&net_wm_supported,
&i_format, &i_items, &i_bytesafter,
(unsigned char **)&p_args );
if( i_ret != Success || i_items == 0 ) return;
msg_Dbg( p_vout, "Window manager supports NetWM" );
p_vout->p_sys->net_wm_state =
XInternAtom( p_vout->p_sys->p_display, "_NET_WM_STATE", False );
p_vout->p_sys->net_wm_state_fullscreen =
XInternAtom( p_vout->p_sys->p_display, "_NET_WM_STATE_FULLSCREEN",
False );
p_vout->p_sys->net_wm_state_above =
XInternAtom( p_vout->p_sys->p_display, "_NET_WM_STATE_ABOVE", False );
p_vout->p_sys->net_wm_state_below =
XInternAtom( p_vout->p_sys->p_display, "_NET_WM_STATE_BELOW", False );
p_vout->p_sys->net_wm_state_stays_on_top =
XInternAtom( p_vout->p_sys->p_display, "_NET_WM_STATE_STAYS_ON_TOP",
False );
for( i = 0; i < i_items; i++ )
{
if( p_args.p_atom[i] == p_vout->p_sys->net_wm_state_fullscreen )
{
msg_Dbg( p_vout,
"Window manager supports _NET_WM_STATE_FULLSCREEN" );
p_vout->p_sys->b_net_wm_state_fullscreen = true;
}
else if( p_args.p_atom[i] == p_vout->p_sys->net_wm_state_above )
{
msg_Dbg( p_vout, "Window manager supports _NET_WM_STATE_ABOVE" );
p_vout->p_sys->b_net_wm_state_above = true;
}
else if( p_args.p_atom[i] == p_vout->p_sys->net_wm_state_below )
{
msg_Dbg( p_vout, "Window manager supports _NET_WM_STATE_BELOW" );
p_vout->p_sys->b_net_wm_state_below = true;
}
else if( p_args.p_atom[i] == p_vout->p_sys->net_wm_state_stays_on_top )
{
msg_Dbg( p_vout,
"Window manager supports _NET_WM_STATE_STAYS_ON_TOP" );
p_vout->p_sys->b_net_wm_state_stays_on_top = true;
}
}
XFree( p_args.p_atom );
}
/***************************************************************************** /*****************************************************************************
* Key events handling * Key events handling
*****************************************************************************/ *****************************************************************************/
......
...@@ -250,17 +250,6 @@ struct vout_sys_t ...@@ -250,17 +250,6 @@ struct vout_sys_t
mtime_t i_time_button_last_pressed; /* to track dbl-clicks */ mtime_t i_time_button_last_pressed; /* to track dbl-clicks */
Pixmap cursor_pixmap; Pixmap cursor_pixmap;
/* Window manager properties */
Atom net_wm_state;
Atom net_wm_state_fullscreen;
bool b_net_wm_state_fullscreen;
Atom net_wm_state_above;
bool b_net_wm_state_above;
Atom net_wm_state_stays_on_top;
bool b_net_wm_state_stays_on_top;
Atom net_wm_state_below;
bool b_net_wm_state_below;
#ifdef MODULE_NAME_IS_glx #ifdef MODULE_NAME_IS_glx
/* GLX properties */ /* GLX properties */
int b_glx13; int b_glx13;
......
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