gdkevents-win32.c: Avoid crash in SetTimer()
Since we only support a single GdkDisplay for Windows, make use of it to ensure we always obtain a proper GdkDisplay to check whether a modal operation is in progress. This should fix issue #7147.
This commit is contained in:
@@ -1365,7 +1365,9 @@ modal_timer_proc (HWND hwnd,
|
||||
DWORD time)
|
||||
{
|
||||
int arbitrary_limit = 10;
|
||||
GdkWin32Display *display = GDK_WIN32_DISPLAY (gdk_surface_get_display (GDK_SURFACE (id)));
|
||||
|
||||
/* todo: if we support multiple GdkDisplay's on Windows? */
|
||||
GdkWin32Display *display = GDK_WIN32_DISPLAY (gdk_display_get_default ());
|
||||
|
||||
while (display->display_surface_record->modal_operation_in_progress != GDK_WIN32_MODAL_OP_NONE &&
|
||||
g_main_context_pending (NULL) &&
|
||||
|
||||
Reference in New Issue
Block a user