Display image (frame) without taking focus away from other programs

I want to display an image (using a frame) without having it take focus away
from anywhere, including if it the current focus was not on my application.

I've seen some answers that use the function SetFocus to give focus back to
where it was within the app (for instance another frame), but that doesn't
work if the "original" focus was somewhere else.

When I close the frame the focus is returned to where it was, and thats what
I want to happen.. without having to close the frame. Is there any "drop
focus" funtion I can use? I've searched on wxpython documents but couldnt
find anything

note: I'm using the stay_on_top style to make sure the frame is visible,
even without having focus

Actual results so far, if focus is on program A when I start my program and
my frame pops up, it will not change focus, but if I click on the frame (to
interact with it) it gets focus and when it closes the focus will go back to
A, but then, next time the frame pops up it will steal focus from A and keep
doing it until I click somewhere on program A *while* my image/frame is
active (if I go to A after theframe is gone then focus will still change
next time the frame pops up

(hope that wasnt too confusing)

···

--
Sent from: http://wxpython-users.1045709.n5.nabble.com/

Any ideas?

Also, if this sounds pretty much impossible for whatever reason let me know :smiley:

···

On Thursday, 4 April 2019 16:08:25 UTC+1, Pedro Sequeira wrote:

I want to display an image (using a frame) without having it take focus away

from anywhere, including if it the current focus was not on my application.

I’ve seen some answers that use the function SetFocus to give focus back to

where it was within the app (for instance another frame), but that doesn’t

work if the “original” focus was somewhere else.

When I close the frame the focus is returned to where it was, and thats what

I want to happen… without having to close the frame. Is there any "drop

focus" funtion I can use? I’ve searched on wxpython documents but couldnt

find anything

note: I’m using the stay_on_top style to make sure the frame is visible,

even without having focus

Actual results so far, if focus is on program A when I start my program and

my frame pops up, it will not change focus, but if I click on the frame (to

interact with it) it gets focus and when it closes the focus will go back to

A, but then, next time the frame pops up it will steal focus from A and keep

doing it until I click somewhere on program A while my image/frame is

active (if I go to A after theframe is gone then focus will still change

next time the frame pops up

(hope that wasnt too confusing)

Sent from: http://wxpython-users.1045709.n5.nabble.com/