[Summary] Mac OS specific bug fix: Increased priority of the top menu bar events
authorNikolay <MPolianovskyi@wavesglobal.com>
Wed, 13 May 2015 14:05:36 +0000 (17:05 +0300)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 29 Jun 2015 18:18:15 +0000 (14:18 -0400)
[Details] g_idle_add () which was used for this purpose used G_PRIORITY_DEFAULT_IDLE>=200 which was too low for correct main menu requests processing, like showing Mixer or Big Clock Window.

The priority was increased to G_PRIORITY_HIGH_IDLE = 100.
According to GTK manual (https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#G-PRIORITY-HIGH-IDLE:CAPS)
GTK+ uses G_PRIORITY_HIGH_IDLE + 10 = 110 for resizing operations, and G_PRIORITY_HIGH_IDLE + 20 = 120 for redrawing operations.

I assume that during record or playback on tracks there are too many redraw request which didn't give any chance for main menu request to be processed in time with old priority value.

This change must be considered as a hot fix so far.
The issue might be deeper. Will be investigated with Paul.

[Feature reviewed] AMishyn
[Reviewed by] PDavis, GZharun

libs/gtkmm2ext/gtkapplication_quartz.mm

index faefd6b6acafc7d28d53b3cae9b4423b96a45f38..5809355ad9fa9c8d0a53f396ca72a03f45bb81e0 100644 (file)
@@ -573,7 +573,9 @@ idle_call_activate (gpointer data)
 - (void) activate:(id) sender
 {
        UNUSED_PARAMETER(sender);
-       g_idle_add (idle_call_activate, gtk_menu_item);
+    // Hot Fix. Increase Priority.
+       g_idle_add_full (G_PRIORITY_HIGH_IDLE, idle_call_activate, gtk_menu_item, NULL);
+//    g_idle_add (idle_call_activate, gtk_menu_item);
 }
 @end