comparison gui/wm/ws.c @ 36193:9beb155c77a0

Cosmetic: Adjust indent. Additionally, merge variable definitions.
author ib
date Sun, 26 May 2013 15:51:54 +0000
parents 2e0729818242
children 829983f984ad
comparison
equal deleted inserted replaced
36192:2e0729818242 36193:9beb155c77a0
784 // c : mouse cursor visible 784 // c : mouse cursor visible
785 // p : properties - "decoration", visible titlebar, etc ... 785 // p : properties - "decoration", visible titlebar, etc ...
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 i, depth;
790 790
791 { 791 for (i = 0; i < wsWLCount; i++)
792 int i; 792 if (wsWindowList[i] == NULL)
793 793 break;
794 for (i = 0; i < wsWLCount; i++) 794
795 if (wsWindowList[i] == NULL) 795 if (i == wsWLCount) {
796 break; 796 mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_TooManyOpenWindows);
797 797 mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
798 if (i == wsWLCount) { 798 }
799 mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_TooManyOpenWindows); 799
800 mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); 800 wsWindowList[i] = win;
801 }
802
803 wsWindowList[i] = win;
804 }
805 801
806 win->Property = p; 802 win->Property = p;
807 803
808 win->Decoration = ((p & wsShowFrame) != 0); 804 win->Decoration = ((p & wsShowFrame) != 0);
809 805