mirror of
https://github.com/mpv-player/mpv
synced 2025-01-16 22:37:28 +01:00
Commit alex's fstype patch x11_common.c3.diff with additional manpage extension.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10696 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8a85640354
commit
aea4ad40a8
@ -1609,12 +1609,38 @@ Try this option if you still experience fullscreen problems.
|
||||
.TP
|
||||
.B \-fstype <type1,type2,...>
|
||||
Specify a priority list of fullscreen layer setting modes to be
|
||||
used.
|
||||
used. The available types are:
|
||||
|
||||
.DP0
|
||||
.RSs
|
||||
.IPs "above"
|
||||
use _NETWM_STATE_ABOVE hint if available
|
||||
.IPs "below"
|
||||
use _NETWM_STATE_BELOW hint if available
|
||||
.IPs "fullscreen"
|
||||
use _NETWM_STATE_FULLSCREEN hint if availale
|
||||
.IPs "layer"
|
||||
Use _WIN_LAYER hint with default layer
|
||||
.IPs "layer=<0..15>"
|
||||
Use _WIN_LAYER hint with layer number
|
||||
.IPs "netwm"
|
||||
force NETWM style
|
||||
.IPs "none"
|
||||
don't set fullscreen window layer
|
||||
.IPs "stays_on_top"
|
||||
use _NETWM_STATE_STAYS_ON_TOP hint if available
|
||||
.RE
|
||||
.DP 1
|
||||
|
||||
It's possible to negate the modes by prefixing them with "\-"
|
||||
.br
|
||||
The default order is "layer,stays_on_top,above,fullscreen".
|
||||
It will be used as a fallback in case of specifying incorrect
|
||||
or unsupported modes.
|
||||
.br
|
||||
OpenBox 1.x users have to use \-fstype \-fullscreen
|
||||
to achive working fs switching.
|
||||
.br
|
||||
If you experience problems with fullscreen window being covered by other
|
||||
windows try using a different order.
|
||||
|
||||
|
@ -164,10 +164,33 @@ void fstype_help(void)
|
||||
mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "none", "don't set fullscreen window layer");
|
||||
mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "layer", "use _WIN_LAYER hint with default layer");
|
||||
mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "layer=<0..15>", "use _WIN_LAYER hint with a given layer number");
|
||||
mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "netwm", "force NETWM style");
|
||||
mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "above", "use _NETWM_STATE_ABOVE hint if available");
|
||||
mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "below", "use _NETWM_STATE_BELOW hint if available");
|
||||
mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "fullscreen", "use _NETWM_STATE_FULLSCREEN hint if availale");
|
||||
mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "stays_on_top", "use _NETWM_STATE_STAYS_ON_TOP hint if available");
|
||||
mp_msg(MSGT_VO, MSGL_INFO, "You can also negate the settings with simply putting '-' in the beginning");
|
||||
}
|
||||
|
||||
static void fstype_dump(int fstype)
|
||||
{
|
||||
if (fstype)
|
||||
{
|
||||
mp_msg(MSGT_VO, MSGL_V, "[x11] Current fstype setting honours");
|
||||
if (fstype & vo_wm_LAYER)
|
||||
mp_msg(MSGT_VO, MSGL_V, " LAYER");
|
||||
if (fstype & vo_wm_FULLSCREEN)
|
||||
mp_msg(MSGT_VO, MSGL_V, " FULLSCREEN");
|
||||
if (fstype & vo_wm_STAYS_ON_TOP)
|
||||
mp_msg(MSGT_VO, MSGL_V, " STAYS_ON_TOP");
|
||||
if (fstype & vo_wm_ABOVE)
|
||||
mp_msg(MSGT_VO, MSGL_V, " ABOVE");
|
||||
if (fstype & vo_wm_BELOW)
|
||||
mp_msg(MSGT_VO, MSGL_V, " BELOW");
|
||||
mp_msg(MSGT_VO, MSGL_V, " X atoms\n");
|
||||
}
|
||||
else
|
||||
mp_msg(MSGT_VO, MSGL_V, "[x11] Current fstype setting doesn't honour any X atoms\n");
|
||||
}
|
||||
|
||||
static int net_wm_support_state_test(Atom atom)
|
||||
@ -230,6 +253,7 @@ static int vo_wm_detect(void)
|
||||
for (i = 0; i < nitems; i++)
|
||||
wm |= net_wm_support_state_test (args[i]);
|
||||
XFree( args );
|
||||
#if 0
|
||||
// ugly hack for broken OpenBox _NET_WM_STATE_FULLSCREEN support
|
||||
// (in their implementation it only changes internal state of window, nothing more!!!)
|
||||
if (wm & vo_wm_FULLSCREEN)
|
||||
@ -241,6 +265,7 @@ static int vo_wm_detect(void)
|
||||
}
|
||||
XFree (args);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( wm == 0 ) mp_msg( MSGT_VO,MSGL_V,"[x11] Unknown wm type...\n" );
|
||||
@ -386,6 +411,8 @@ int vo_init( void )
|
||||
vo_wm_type=vo_wm_detect();
|
||||
|
||||
vo_fs_type=vo_x11_get_fs_type(vo_wm_type);
|
||||
|
||||
fstype_dump(vo_fs_type);
|
||||
|
||||
saver_off(mDisplay);
|
||||
return 1;
|
||||
@ -840,17 +867,24 @@ void vo_x11_setlayer( Display * mDisplay,Window vo_window,int layer )
|
||||
static int vo_x11_get_fs_type(int supported)
|
||||
{
|
||||
int i;
|
||||
int type;
|
||||
int type = supported;
|
||||
|
||||
if (vo_fstype_list) {
|
||||
i = 0;
|
||||
for (i = 0; vo_fstype_list[i]; i++)
|
||||
{
|
||||
type = supported;
|
||||
|
||||
if (strncmp(vo_fstype_list[i], "layer", 5) == 0)
|
||||
int neg = 0;
|
||||
char * arg = vo_fstype_list[i];
|
||||
|
||||
if (vo_fstype_list[i][0] == '-')
|
||||
{
|
||||
if (vo_fstype_list[i][5] == '=')
|
||||
neg = 1;
|
||||
arg = vo_fstype_list[i] + 1;
|
||||
}
|
||||
|
||||
if (!strncmp(arg, "layer", 5))
|
||||
{
|
||||
if (!neg && (arg[5] == '='))
|
||||
{
|
||||
char *endptr = NULL;
|
||||
int layer = strtol(vo_fstype_list[i]+6, &endptr, 10);
|
||||
@ -858,21 +892,46 @@ static int vo_x11_get_fs_type(int supported)
|
||||
if (endptr && *endptr == '\0' && layer >= 0 && layer <= 15)
|
||||
fs_layer = layer;
|
||||
}
|
||||
type &= vo_wm_LAYER;
|
||||
if (neg)
|
||||
type &= ~vo_wm_LAYER;
|
||||
else
|
||||
type |= vo_wm_LAYER;
|
||||
}
|
||||
else if (strcmp(vo_fstype_list[i], "above") == 0) type &= vo_wm_ABOVE;
|
||||
else if (strcmp(vo_fstype_list[i], "fullscreen") == 0) type &= vo_wm_FULLSCREEN;
|
||||
else if (strcmp(vo_fstype_list[i], "stays_on_top") == 0) type &= vo_wm_STAYS_ON_TOP;
|
||||
else if (strcmp(vo_fstype_list[i], "below") == 0) type &= vo_wm_BELOW;
|
||||
else if (strcmp(vo_fstype_list[i], "none") == 0) return 0;
|
||||
else type = 0;
|
||||
|
||||
if (type)
|
||||
return type;
|
||||
else if (!strcmp(arg, "above"))
|
||||
{
|
||||
if (neg)
|
||||
type &= ~vo_wm_ABOVE;
|
||||
else
|
||||
type |= vo_wm_ABOVE;
|
||||
} else if (!strcmp(arg, "fullscreen"))
|
||||
{
|
||||
if (neg)
|
||||
type &= ~vo_wm_FULLSCREEN;
|
||||
else
|
||||
type |= vo_wm_FULLSCREEN;
|
||||
} else if (!strcmp(arg, "stays_on_top"))
|
||||
{
|
||||
if (neg)
|
||||
type &= ~vo_wm_STAYS_ON_TOP;
|
||||
else
|
||||
type |= vo_wm_STAYS_ON_TOP;
|
||||
} else if (!strcmp(arg, "below"))
|
||||
{
|
||||
if (neg)
|
||||
type &= ~vo_wm_BELOW;
|
||||
else
|
||||
type |= vo_wm_BELOW;
|
||||
} else if (!strcmp(arg, "netwm"))
|
||||
{
|
||||
if (neg)
|
||||
type &= ~vo_wm_NETWM;
|
||||
else
|
||||
type |= vo_wm_NETWM;
|
||||
} else if (!strcmp(arg, "none")) return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return supported;
|
||||
return type;
|
||||
}
|
||||
|
||||
void vo_x11_fullscreen( void )
|
||||
|
Loading…
Reference in New Issue
Block a user