mirror of https://github.com/snes9xgit/snes9x.git
Merge pull request #259 from NoSuck/unix_fullscreen
unix: fix fullscreen property change timing
This commit is contained in:
commit
d89154a0b2
15
unix/x11.cpp
15
unix/x11.cpp
|
@ -864,6 +864,12 @@ void S9xInitDisplay (int argc, char **argv)
|
||||||
WidthOfScreen(GUI.screen), HeightOfScreen(GUI.screen), 0,
|
WidthOfScreen(GUI.screen), HeightOfScreen(GUI.screen), 0,
|
||||||
GUI.depth, InputOutput, GUI.visual, CWBackPixel | CWColormap, &attrib);
|
GUI.depth, InputOutput, GUI.visual, CWBackPixel | CWColormap, &attrib);
|
||||||
|
|
||||||
|
/* Try to tell the Window Manager not to decorate this window. */
|
||||||
|
Atom wm_state = XInternAtom (GUI.display, "_NET_WM_STATE", true );
|
||||||
|
Atom wm_fullscreen = XInternAtom (GUI.display, "_NET_WM_STATE_FULLSCREEN", true );
|
||||||
|
|
||||||
|
XChangeProperty(GUI.display, GUI.window, wm_state, XA_ATOM, 32, PropModeReplace, (unsigned char *)&wm_fullscreen, 1);
|
||||||
|
|
||||||
#ifdef USE_XVIDEO
|
#ifdef USE_XVIDEO
|
||||||
if (GUI.use_xvideo)
|
if (GUI.use_xvideo)
|
||||||
{
|
{
|
||||||
|
@ -966,15 +972,6 @@ void S9xInitDisplay (int argc, char **argv)
|
||||||
XNextEvent(GUI.display, &event);
|
XNextEvent(GUI.display, &event);
|
||||||
} while (event.type != MapNotify || event.xmap.event != GUI.window);
|
} while (event.type != MapNotify || event.xmap.event != GUI.window);
|
||||||
|
|
||||||
if (GUI.fullscreen)
|
|
||||||
{
|
|
||||||
/* Try to tell the Window Manager not to decorate this window. */
|
|
||||||
Atom wm_state = XInternAtom (GUI.display, "_NET_WM_STATE", true );
|
|
||||||
Atom wm_fullscreen = XInternAtom (GUI.display, "_NET_WM_STATE_FULLSCREEN", true );
|
|
||||||
|
|
||||||
XChangeProperty(GUI.display, GUI.window, wm_state, XA_ATOM, 32, PropModeReplace, (unsigned char *)&wm_fullscreen, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef USE_XVIDEO
|
#ifdef USE_XVIDEO
|
||||||
if (GUI.use_xvideo)
|
if (GUI.use_xvideo)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue