comparison src/video/win32/SDL_win32events.c @ 3095:75483112b97f

Date: Sat, 21 Mar 2009 19:41:52 -0700 (PDT) From: Mason Wheeler Subject: [SDL] Critical SDL 1.3 patch Displaying a window created with SDL_CreateWindowFrom was causing stack overf lows for me under certain conditions. After far too much work trying to get Visual Studio's debugger to play nice with a program written in Delphi, I tra cked it down to a nasty reentrancy cycle in the WndProc handling. Here's a p atch that fixes the problem
author Sam Lantinga <slouken@libsdl.org>
date Mon, 23 Mar 2009 02:02:30 +0000
parents 085e46423377
children 0d12e8f1de3c
comparison
equal deleted inserted replaced
3094:c0ce3380742d 3095:75483112b97f
567 SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_EXPOSED, 567 SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_EXPOSED,
568 0, 0); 568 0, 0);
569 } 569 }
570 } 570 }
571 return (0); 571 return (0);
572
573 /* If this isn't our window, we don't need to repaint the frame.
574 This fixes a reentrancy issue that can cause stack overflows with foreign windows.
575 3/21/09 Mason Wheeler */
576 case WM_NCPAINT:
577 {
578 if (SDL_GetWindowFlags(data->windowID) && SDL_WINDOW_FOREIGN) {
579 return(0);
580 }
581 break;
582 }
572 583
573 /* We'll do our own drawing, prevent flicker */ 584 /* We'll do our own drawing, prevent flicker */
574 case WM_ERASEBKGND: 585 case WM_ERASEBKGND:
575 { 586 {
576 } 587 }