ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > PopUp Wisdom

PopUp Wisdom Love

<< < (3/6) > >>

However, a subsequent hotkey invocation leads to focus being stolen here.
--- End quote ---

does this problem only occur when triggering via hotkey (as opposed to timer?)
-mouser (December 01, 2013, 07:44 PM)
--- End quote ---

It happens with both (I added a comment to the post above too).

The key here to observing focus not being stolen seems to be to get the Options dialog up first (without any quote showing), clicking on the "OK" button and then either waiting for a quote to appear or using the hotkey.  After one quote dialog appears, subsequent appearances of quote dialogs appear to steal focus consistently (until the options dialog box is brought up with a quote dialog showing and then the "OK" button being clicked.)

FWIW, the testing is being done on a system where PopupWisdom had never been installed before.

If you would indulge me, I'd love to get a simple reproducible use case, as simple as possible.

If we uncheck that option to set focus, then exit program.
Then restart program, with it appearing in tray.

Then open up notepad, and give it focus.

Now show a popup quote.  Does popup wisdom steal focus?
If yes, then to confirm, we mean that the foreground focus leaves notepad, and if we type the letters don't appear in notepad.

You can see what i'm trying to get at here -- the simplest reproducible steps to demonstrate the problem -- because i'm not able to reproduce it given what i've read so far and i can't tell if we are just doing different things or meaning different things, etc.

If we uncheck that option to set focus, then exit program.
Then restart program, with it appearing in tray.

Then open up notepad, and give it focus.

Now show a popup quote.  Does popup wisdom steal focus?
-mouser (December 01, 2013, 08:17 PM)
--- End quote ---

No (IMHO this is similar to what I described before), and then if I click the OK button to dismiss the quote, Notepad ends up with focus (I see a flickering of it).  Now if I invoke the hotkey to show a quote, focus is stolen by the quote dialog.

FWIW, I did follow your steps :)

Reproduced similar results using Windows 7 Pro (as guest OS of VirtualBox).

Ok, i managed to reproduce this on Windows 7 (not on xp).  Insidious.
Doesn't happen unless you first click on the Ok button.
Thank you bill gates.

Now i have to try to figure out how on earth this combination of events could lead to this behavior.

Thank you for your patience.

Ok, would you mind trying the newest beta i just uploaded?

I think it now makes sense what's happening.

My code ensures that the quote window does not "actively" steal focus from the window that had it at the time of triggering a quote.

But what happens when you click on a button on the quote form, is that you yourself bring the quote window to the foreground, which has no ill effect, BUT, when that currently-foregrounded window is hidden, what happens is that Windows itself (at least on win7), says "ok, our previously foregrounded window just disappeared, i will remember to bring it back to foreground the next time it appears."

So essentially, it's windows trying to be smart by, on its own, resetting the focus to the quote window in this scenario (where it was foregrounded right before it was last hidden).

There may be a better workaround, but what i've done in the latest version to try to fix this is, right before hiding the quote window, i send the foreground focus off it.  That way when it shows itself the next time, windows doesn't try to fix it.

Let me know if it works.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version