| Summary: | MutiWindow do not display normal | ||
|---|---|---|---|
| Product: | SDL | Reporter: | zoucaiwang <zoucaiwangchina> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | 2.0.0 | Keywords: | target-2.0.0 |
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.) Tagging a bunch of bugs as target-2.0.0, Priority 2. This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible. That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship. Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment. Thanks! --ryan. |
if (m_bSDLInitFlag==false) { if(SDL_VideoInit(NULL) == -1) { printf("Could not initialize SDL video./n"); exit(-2); } m_bSDLInitFlag =true; } int w = 1920; int h =1080; SDL_Rect texture_rect; int iResult =SDL_GetDisplayBounds(m_iScreenIndex,&texture_rect); int iLeft =0; if (iResult==0) { iLeft=texture_rect.x; } char szWinName[MAX_PATH]; memset(szWinName,0,MAX_PATH); sprintf(szWinName,"Win%d",m_iScreenIndex); m_pWin = SDL_CreateWindow(szWinName,iLeft , 0, w,h, SDL_WINDOW_SHOWN); m_pRender = SDL_CreateRenderer(m_pWin,-1,0); m_pScreen =SDL_GetWindowSurface(m_pWin); m_pTexture =SDL_CreateTexture(m_pRender,SDL_PIXELFORMAT_YV12,SDL_TEXTUREACCESS_STREAMING,w,h); when use SDL_CreateWindow create more than 2 windows, only the first one window show normally, the others hide, i debug the source ,i found that the reason is in the sdl_keyboard.c in function void SDL_SetKeyboardFocus(SDL_Window * window) if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) { SDL_VideoDevice *video = SDL_GetVideoDevice(); if (video && video->StopTextInput) { video->StopTextInput(video); // } } the other windows is watting for the first window stopTextinput, however couldnot stopTextInput from the first window ,so others window donot display normal . thank you!!! i'm a developer from china,Guangzhou.You must know!!!