Skip to content

Commit

Permalink
x11: attempt to make initial fullscreening more reliable
Browse files Browse the repository at this point in the history
It appears some WMs have a problem with out method of setting initial
fullscreen mode. We assume that if the window's _NET_WM_STATE includes
_NET_WM_STATE_FULLSCREEN before mapping the window, the WM will show it
as fullscreen at mapped. EWMH doesn't say anything that this should
work, although one could argue that it's implied.

In any case, since it's not standard behavior without at least some
doubt, it's probably a good idea to try the "old" method as well.
Fortunately, it should be idempotent.

See #1937, #1920.

(cherry picked from commit a4f3df5)
  • Loading branch information
wm4 authored and Diogo Franco (Kovensky) committed May 19, 2015
1 parent b4fdb25 commit 8f9cb82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions video/out/x11_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,9 @@ static void vo_x11_map_window(struct vo *vo, struct mp_rect rc)
vo_x11_selectinput_witherr(vo, x11->display, x11->window, events);
XMapWindow(x11->display, x11->window);

if (vo->opts->fullscreen && (x11->wm_type & vo_wm_FULLSCREEN))
x11_set_ewmh_state(x11, "_NET_WM_STATE_FULLSCREEN", 1);

vo_x11_xembed_update(x11, XEMBED_MAPPED);
}

Expand Down

0 comments on commit 8f9cb82

Please sign in to comment.