Messages being dispatched only when mouse is moving

I don’t know whether this is a Linux specific issue or not, but it seems pretty major.

I have a small app which uses a background thread for midi playback, and a regular DialogWindow with some play, pause buttons and a slider for seeking.

The playback thread is a ChangeBroadcaster which sends messages a few times a second to signal playback progress. When the message is received, the UI queries the current position from the playback thread to update the seeking slider.

However, none of the UI messages are being triggered, and the UI is not being updated, unless I continuously move the mouse pointer over the window. Some debug printf’s confirm that messages are not being processed otherwise.

Any ideas?

you’re calling message thread stuff from some thread other than the message thread, perhaps?

I have tried to decouple the playback thread from the UI thread as much as I could figure out, hence using ActionBroadcaster and ChangeBroadcaster etc. When called from the playback thread, these should broadcast the message asynchronously on the UI thread, right?

The UI thread however does call some methods which modify values in the playback thread class while playback is running, but I properly used ReadWriteLock for it.

The source is here (browse online) if anyone wants to take a look.

My playback engine class derives from Thread as protected and a public method wraps this->startThread() to start playback. Is this bad design?

Sorry about these (apparently) basic questions :smiley: