Index: x11_common.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v retrieving revision 1.148 diff -u -r1.148 x11_common.c --- x11_common.c 11 Aug 2003 19:02:37 -0000 1.148 +++ x11_common.c 12 Aug 2003 20:07:37 -0000 @@ -164,10 +164,12 @@ 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 vailable"); + 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"); } int net_wm_support_state_test( Atom atom ) @@ -230,6 +232,7 @@ 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 +244,7 @@ } XFree (args); } +#endif } if ( wm == 0 ) mp_msg( MSGT_VO,MSGL_V,"[x11] Unknown wm type...\n" ); @@ -848,7 +852,7 @@ { type = supported; - if (strncmp(vo_fstype_list[i], "layer", 5) == 0) + if (strstr(vo_fstype_list[i], "layer")) { if (vo_fstype_list[i][5] == '=') { @@ -858,13 +862,42 @@ if (endptr && *endptr == '\0' && layer >= 0 && layer <= 15) fs_layer = layer; } - type &= vo_wm_LAYER; + if (vo_fstype_list[i][0] == '-') + 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 if (strstr(vo_fstype_list[i], "above")) + { + if (vo_fstype_list[i][0] == '-') + type &= ~vo_wm_ABOVE; + else + type |= vo_wm_ABOVE; + } else if (strstr(vo_fstype_list[i], "fullscreen")) + { + if (vo_fstype_list[i][0] == '-') + type &= ~vo_wm_FULLSCREEN; + else + type |= vo_wm_FULLSCREEN; + } else if (strstr(vo_fstype_list[i], "stays_on_top")) + { + if (vo_fstype_list[i][0] == '-') + type &= ~vo_wm_STAYS_ON_TOP; + else + type |= vo_wm_STAYS_ON_TOP; + } else if (strstr(vo_fstype_list[i], "below")) + { + if (vo_fstype_list[i][0] == '-') + type &= ~vo_wm_BELOW; + else + type |= vo_wm_BELOW; + } else if (strstr(vo_fstype_list[i], "netwm")) + { + if (vo_fstype_list[i][0] == '-') + type &= ~vo_wm_NETWM; + else + type |= vo_wm_NETWM; + } else if (strstr(vo_fstype_list[i], "none")) return 0; else type = 0; if (type)