[gtk/mainloop-cleanup: 11/21] win32 printing: Stop using gtk_events_pending
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/mainloop-cleanup: 11/21] win32 printing: Stop using gtk_events_pending
- Date: Mon, 10 Feb 2020 04:16:53 +0000 (UTC)
commit 9eeeb631cacc351e5ce40279c19f0c4a974e5996
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 9 19:27:59 2020 -0500
win32 printing: Stop using gtk_events_pending
Just use the GMainContext API directly.
gtk/gtkprintoperation-win32.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c
index 93036831e8..82e604a759 100644
--- a/gtk/gtkprintoperation-win32.c
+++ b/gtk/gtkprintoperation-win32.c
@@ -113,13 +113,13 @@ run_mainloop_hook (HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
if (uiMsg == WM_INITDIALOG)
{
gdk_win32_set_modal_dialog_libgtk_only (hdlg);
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
}
else if (uiMsg == got_gdk_events_message)
{
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
return 1;
}
return 0;
@@ -1358,13 +1358,13 @@ iprintdialogcallback_handlemessage (IPrintDialogCallback *This,
{
gdk_win32_set_modal_dialog_libgtk_only (hDlg);
callback->set_hwnd = TRUE;
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
}
else if (uMsg == got_gdk_events_message)
{
- while (gtk_events_pending ())
- gtk_main_iteration ();
+ while (g_main_context_pending (NULL))
+ g_main_context_iteration (NULL, TRUE);
*pResult = TRUE;
return S_OK;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]