MacOS - Window re-opening on app switch

Hi, I wonder if anyone else has experienced this behaviour on MacOS.

My application creates a number of simple windows that operate as transparent drag event receivers - each window is just a Frame with a FileDropTarget. These windows are shown and hidden in response to events from a companion application. Normally all windows are hidden - in use, the application calls Frame.Show() and .Hide() to put up the window and catch the drag events. This all works fine except for one issue.

After one of these windows has been “used” (shown, hidden and received drag events), then subsequently, if the user switches to the application (by clicking its icon in the Dock, or Cmd-Tabbing to it, the window(s) that were used are re-displayed and won’t go away. Frame.IsShown() returns False, but the window is still present and can no longer be hidden. No exceptions are thrown that I can see.

None of these windows is App.TopWindow - there’s another window for that, but it does not get into this state.

Any help appreciated.

MacOS 10.15.4, wxPython 4.0.7.post2, Python 3.8.2

If you’re still having this problem then please make a runnable, small as possible, sample application that demonstrates the problem.

Hi Robin,
Thanks for the followup; I have a workaround for now; I added an ActivateEvent handler that does a quick Show/Hide on any window that might potentially be in that state whenever the app is deactivated, so my app is ok for the moment - doing that puts the window back in sync with its Python state. It definitely requires a drag event to put the window into this state, and it’s not a missed paint event; the window is actually drawing and is clickable, but IsShown() is False. Very weird. I’ll try to put together a little sample app when I get some time, it seems like a bug that could manifest in other ways.
Thanks again,
Kevin Morris