[gtk+osx] problem with focus remaining on destroyed window
Status: Beta
Brought to you by:
jralls
From: Charles B. <C.C...@dl...> - 2004-08-06 16:19:18
|
Hi, I am playing with gtkglarea under OS X. One of the test cases, viewlw, closes a window which often has the focus. When running outside a debugger the memory pointed to by MacCarbonEvents::mac_gwind_grabbed often seems to be legit, so the mouse events code in mouse_motion_handler() gives a sigsev. Inside the debugger I can confirm that the gdk_window_internal_destroy() function clears the memory, but then the app does not crash. The simplest workaround that I have found is to extend the test on line 201 of MacCarbonEvents.c to also test the values of mac_gwind_grabbed, and confirm that it is valid by comparing mac_gwind_grabbed to mac_gwind_grabbed->magic e.g. if(win_ref && mac_gwind_grabbed && mac_gwin_grabbed == mac_gwind_grabbed->magic) { Ta, Charles Ballard |