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 879

Summary: problem with creating multiple windows in SDL 1.3
Product: SDL Reporter: Sam Lantinga <slouken>
Component: eventsAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: critical    
Priority: P2 CC: alistair.lowe
Version: HG 2.0   
Hardware: All   
OS: Windows (All)   

Description Sam Lantinga 2009-11-07 20:28:53 UTC
From: mweber26
	
If you create a window (#1) in SDL 1.3, then create a new window (#2) later on, then destroy window #2. Window #1 stops responding to mouse events. It appear that this is because SDL re-registers with RegisterRawInputDevices on every window create, which causes #2 to get the inputs (which no longer exists). Does this seem right? If so, should it only do RegisterRawInputDevices on the first window created, or maybe even re-register on a destroy window with another window ID that actually exists?

mike
Comment 1 Sam Lantinga 2010-01-26 21:26:50 UTC
Ryan, this is a critical bug caused by the multi-mouse stuff.
Comment 2 Sam Lantinga 2010-01-26 21:27:12 UTC
*** Bug 885 has been marked as a duplicate of this bug. ***
Comment 3 Nathaniel J Fries 2011-01-07 12:32:35 UTC
Tested with this code:
if(event.type == SDL_MOUSEBUTTONDOWN && event.button.windowID == SDL_GetWindowID(window1))
{
    if(window2){
       SDL_DestroyWindow(window2);
       window2 = NULL;
    }
    else{
       loop_running = false;
       break;
    }

}
in my main loop. The first click closes the second window, the second click stops the main loop as expected.

This appears to be fixed; at least in Windows 7.

but of course that's probably due to the fact that you have already removed raw input for multiple mouse support.
Comment 4 Sam Lantinga 2011-02-16 03:40:15 UTC
Yep, the raw mouse API stuff is gone.