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 - problem with creating multiple windows in SDL 1.3
Summary: problem with creating multiple windows in SDL 1.3
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: All Windows (All)
: P2 critical
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
: 885 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-11-07 20:28 UTC by Sam Lantinga
Modified: 2011-02-16 03:40 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 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.