How to show a window without activating it

I’ve a PopupMenu in my App where I can select a display in a Multi Monitor Setup. Now I want to show something like an OSD floating on the selected display when hovering the PopupMenu, so the user knows, which display has been selected.

I created a transparent Plain Box window to achieve this, which will be moved to the display. But when I Show() it, it always gets activated and steals the focus from the main window. My workaround is to reactivate the main window directly after showing the OSD. But that seems more like a hack, and I can still activate the OSD window by clicking it. I want something like the audio volume or eject OSD in macOS.

What is OSD ?

On-screen display.

1 Like

You could change the OSD window visible property instead and toggle it visible/not visible when you are hovering the popupmenu. That will free up the activate event for you.

1 Like