Mercurial > mplayer.hg
changeset 36192:2e0729818242
Relocate internal wsWindowList registration code.
Register early.
author | ib |
---|---|
date | Sun, 26 May 2013 15:48:47 +0000 |
parents | 16e7d4a1ee59 |
children | 9beb155c77a0 |
files | gui/wm/ws.c |
diffstat | 1 files changed, 15 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/wm/ws.c Sun May 26 12:41:09 2013 +0000 +++ b/gui/wm/ws.c Sun May 26 15:48:47 2013 +0000 @@ -788,6 +788,21 @@ { int depth; + { + int i; + + for (i = 0; i < wsWLCount; i++) + if (wsWindowList[i] == NULL) + break; + + if (i == wsWLCount) { + mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_TooManyOpenWindows); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); + } + + wsWindowList[i] = win; + } + win->Property = p; win->Decoration = ((p & wsShowFrame) != 0); @@ -909,21 +924,6 @@ wsImageCreate(win, win->Width, win->Height); /* End of creating -------------------------------------------------------------------------- */ - { - int i; - - for (i = 0; i < wsWLCount; i++) - if (wsWindowList[i] == NULL) - break; - - if (i == wsWLCount) { - mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_TooManyOpenWindows); - mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); - } - - wsWindowList[i] = win; - } - XFlush(wsDisplay); XSync(wsDisplay, False);