Author: ib Date: Sun May 26 17:48:47 2013 New Revision: 36288 Log: Relocate internal wsWindowList registration code. Register early. Modified: trunk/gui/wm/ws.c Modified: trunk/gui/wm/ws.c ============================================================================== --- trunk/gui/wm/ws.c Sun May 26 14:41:09 2013 (r36287) +++ trunk/gui/wm/ws.c Sun May 26 17:48:47 2013 (r36288) @@ -788,6 +788,21 @@ void wsWindowCreate(wsWindow *win, int x { 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 @@ void wsWindowCreate(wsWindow *win, int x 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);
participants (1)
-
ib