We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1482 - MutiWindow do not display normal
Summary: MutiWindow do not display normal
Status: RESOLVED DUPLICATE of bug 884
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.0
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.0
Depends on:
Blocks:
 
Reported: 2012-04-24 08:33 UTC by zoucaiwang
Modified: 2013-07-27 01:03 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zoucaiwang 2012-04-24 08:33:26 UTC
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!!!
Comment 1 Ryan C. Gordon 2013-07-12 22:15:30 UTC
(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.
Comment 2 Ryan C. Gordon 2013-07-27 01:03:06 UTC
This sounds like the same thing as Bug #884.

--ryan.

*** This bug has been marked as a duplicate of bug 884 ***