summaryrefslogtreecommitdiff
path: root/gtk/gtkprintoperation-unix.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-02-02 16:34:40 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-02-03 12:07:10 +0100
commit888dfe499d92a434c3ce703df7057c4703a6c75e (patch)
tree91e393aadfe75f32a819f9e78deac024977918dd /gtk/gtkprintoperation-unix.c
parentc655759cefa56efdb0cb943bb5dada3ff75a963c (diff)
downloadgtk+-888dfe499d92a434c3ce703df7057c4703a6c75e.tar.gz
Drop the Big GDK Lock
GDK has a lock to mark critical sections inside the backends. Additionally, code that would re-enter into the GTK main loop was supposed to hold the lock. Back in the Good Old Days™ this was guaranteed to kind of work only on the X11 backend, and would cause a neat explosion on any other GDK backend. During GTK+ 3.x we deprecated the API to enter and leave the critical sections, and now we can remove all the internal uses of the lock, since external API that uses GTK+ 4.x won't be able to hold the GDK lock. https://bugzilla.gnome.org/show_bug.cgi?id=793124
Diffstat (limited to 'gtk/gtkprintoperation-unix.c')
-rw-r--r--gtk/gtkprintoperation-unix.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c
index 1b8e35d298..29781b87d7 100644
--- a/gtk/gtkprintoperation-unix.c
+++ b/gtk/gtkprintoperation-unix.c
@@ -390,11 +390,7 @@ unix_end_run (GtkPrintOperation *op,
{
g_object_ref (op);
if (!op_unix->data_sent)
- {
- gdk_threads_leave ();
- g_main_loop_run (op_unix->loop);
- gdk_threads_enter ();
- }
+ g_main_loop_run (op_unix->loop);
g_main_loop_unref (op_unix->loop);
op_unix->loop = NULL;
g_object_unref (op);
@@ -881,10 +877,7 @@ gtk_print_operation_unix_run_dialog (GtkPrintOperation *op,
find_printer (printer_name,
(GFunc) found_printer, &rdata);
- gdk_threads_leave ();
g_main_loop_run (rdata.loop);
- gdk_threads_enter ();
-
g_main_loop_unref (rdata.loop);
rdata.loop = NULL;
}