floem icon indicating copy to clipboard operation
floem copied to clipboard

Inter-window messages sent to a view via `ViewId.update_state()` are broken

Open timboudreau opened this issue 9 months ago • 4 comments

This one I'm not sure how to solve: If I have a view in a popup window, and it sends a message to the view that created it in the main application window, the message is delivered (and the message may close the popup!) - but the view does not process the message until some OS-level event like waving the mouse over the main window causes it to wake up and process messages in its queue.

Here is a gist with a complete, runnable example demonstrating the problem - I'd recommend just copy/pasting it and running it (instructions on exactly what to do will be in the main window) - it's big as bug demos go, but I figured it would help to have something that shows the utility of this sort of thing.

I get the optimization I think is being attempted here - if the window is not active, have it be completely quiet. In general, that's a good thing - but this is a little too aggressive. If it's intended to remain that way, then there needs to be some way for a caller to flag a message as urgent or at least a way to bang on its event loop and force some messages through.

timboudreau avatar May 25 '24 08:05 timboudreau