assert() to help find some possible causes of #2991. Fix some confusion with GTK...
[ardour.git] / libs / ardour / midi_ui.cc
index 70be1f345d075c05ec63e1f579c17f2f70db0a1d..fb85309ee1a7e9203d288ec97b9a2cb7919354c7 100644 (file)
@@ -68,6 +68,12 @@ MidiControlUI::do_request (MidiUIRequest* req)
 
        } else if (req->type == CallSlot) {
 
+#ifndef NDEBUG
+               if (getenv ("DEBUG_THREADED_SIGNALS")) {
+                       cerr << "MIDI UI calls a slot\n";
+               }
+#endif
+
                req->the_slot ();
 
        } else if (req->type == Quit) {
@@ -89,6 +95,8 @@ MidiControlUI::change_midi_ports ()
 bool
 MidiControlUI::midi_input_handler (IOCondition ioc, MIDI::Port* port)
 {
+       DEBUG_TRACE (DEBUG::MidiIO, string_compose ("something happend on  %1\n", port->name()));
+
        if (ioc & ~IO_IN) {
                return false;
        }
@@ -147,6 +155,12 @@ MidiControlUI::thread_init ()
 {      
        struct sched_param rtparam;
 
+       char* c = new char[7];
+       strcpy (c, X_("midiUI"));
+       pthread_set_name (c);
+
+       cerr << "MIDI UI running\n";
+
        PBD::notify_gui_about_thread_creation (X_("gui"), pthread_self(), X_("MIDI"), 2048);
        SessionEvent::create_per_thread_pool (X_("MIDI I/O"), 128);