Mercurial > mplayer.hg
comparison gui/wm/ws.c @ 36192:2e0729818242
Relocate internal wsWindowList registration code.
Register early.
author | ib |
---|---|
date | Sun, 26 May 2013 15:48:47 +0000 |
parents | 506cefd8a5f0 |
children | 9beb155c77a0 |
comparison
equal
deleted
inserted
replaced
36191:16e7d4a1ee59 | 36192:2e0729818242 |
---|---|
786 // ---------------------------------------------------------------------------------------------- | 786 // ---------------------------------------------------------------------------------------------- |
787 void wsWindowCreate(wsWindow *win, int x, int y, int w, int h, int p, int c, char *label) | 787 void wsWindowCreate(wsWindow *win, int x, int y, int w, int h, int p, int c, char *label) |
788 { | 788 { |
789 int depth; | 789 int depth; |
790 | 790 |
791 { | |
792 int i; | |
793 | |
794 for (i = 0; i < wsWLCount; i++) | |
795 if (wsWindowList[i] == NULL) | |
796 break; | |
797 | |
798 if (i == wsWLCount) { | |
799 mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_TooManyOpenWindows); | |
800 mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); | |
801 } | |
802 | |
803 wsWindowList[i] = win; | |
804 } | |
805 | |
791 win->Property = p; | 806 win->Property = p; |
792 | 807 |
793 win->Decoration = ((p & wsShowFrame) != 0); | 808 win->Decoration = ((p & wsShowFrame) != 0); |
794 | 809 |
795 wsWindowUpdatePosition(win, x, y, w, h); | 810 wsWindowUpdatePosition(win, x, y, w, h); |
906 wsWindowMapWait(win); | 921 wsWindowMapWait(win); |
907 } | 922 } |
908 | 923 |
909 wsImageCreate(win, win->Width, win->Height); | 924 wsImageCreate(win, win->Width, win->Height); |
910 /* End of creating -------------------------------------------------------------------------- */ | 925 /* End of creating -------------------------------------------------------------------------- */ |
911 | |
912 { | |
913 int i; | |
914 | |
915 for (i = 0; i < wsWLCount; i++) | |
916 if (wsWindowList[i] == NULL) | |
917 break; | |
918 | |
919 if (i == wsWLCount) { | |
920 mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_TooManyOpenWindows); | |
921 mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); | |
922 } | |
923 | |
924 wsWindowList[i] = win; | |
925 } | |
926 | 926 |
927 XFlush(wsDisplay); | 927 XFlush(wsDisplay); |
928 XSync(wsDisplay, False); | 928 XSync(wsDisplay, False); |
929 | 929 |
930 win->DrawHandler = NULL; | 930 win->DrawHandler = NULL; |