summaryrefslogtreecommitdiff
path: root/gdk/quartz
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 /gdk/quartz
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 'gdk/quartz')
-rw-r--r--gdk/quartz/gdkeventloop-quartz.c12
-rw-r--r--gdk/quartz/gdkevents-quartz.c2
2 files changed, 0 insertions, 14 deletions
diff --git a/gdk/quartz/gdkeventloop-quartz.c b/gdk/quartz/gdkeventloop-quartz.c
index c20563931f..bd015ff30a 100644
--- a/gdk/quartz/gdkeventloop-quartz.c
+++ b/gdk/quartz/gdkeventloop-quartz.c
@@ -620,8 +620,6 @@ gdk_event_prepare (GSource *source,
{
gboolean retval;
- gdk_threads_enter ();
-
/* The prepare stage is the stage before the main loop starts polling
* and dispatching events. The autorelease poll is drained here for
* the preceding main loop iteration or, in case of the first iteration,
@@ -655,8 +653,6 @@ gdk_event_prepare (GSource *source,
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
_gdk_quartz_event_loop_check_pending ());
- gdk_threads_leave ();
-
return retval;
}
@@ -665,16 +661,12 @@ gdk_event_check (GSource *source)
{
gboolean retval;
- gdk_threads_enter ();
-
if (_gdk_display->event_pause_count > 0)
retval = _gdk_event_queue_find_first (_gdk_display) != NULL;
else
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
_gdk_quartz_event_loop_check_pending ());
- gdk_threads_leave ();
-
return retval;
}
@@ -685,8 +677,6 @@ gdk_event_dispatch (GSource *source,
{
GdkEvent *event;
- gdk_threads_enter ();
-
_gdk_quartz_display_queue_events (_gdk_display);
event = _gdk_event_unqueue (_gdk_display);
@@ -698,8 +688,6 @@ gdk_event_dispatch (GSource *source,
gdk_event_free (event);
}
- gdk_threads_leave ();
-
return TRUE;
}
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index dfbb1f8144..521c1a3d2e 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -1732,9 +1732,7 @@ _gdk_quartz_display_queue_events (GdkDisplay *display)
g_list_free_1 (node);
gdk_event_free (event);
- gdk_threads_leave ();
[NSApp sendEvent:nsevent];
- gdk_threads_enter ();
}
_gdk_quartz_event_loop_release_event (nsevent);