Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes taskbar icon jitters and instacloses. #8

Open
Martenfur opened this issue Sep 16, 2021 · 2 comments
Open

Sometimes taskbar icon jitters and instacloses. #8

Martenfur opened this issue Sep 16, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@Martenfur
Copy link
Owner

This happens every time every first launch. On icon right click, the context menu appears in the wrong place and instantly disappears.

@Martenfur Martenfur added the bug Something isn't working label Sep 16, 2021
@Martenfur
Copy link
Owner Author

Seems to have something to do with window not being focusable. Not sure how to fix it.

@alfish2000
Copy link
Contributor

I've spent some time on the topic yesterday.
But I could not find a solution till now.
I've found some equal behaviors with message boxes insta-closing when there is no main UI thread.
After insta-closing, the next message boxes are working:
https://stackoverflow.com/questions/28017576/wpf-taskbaricon-contextmenu

I can reproduce it also with:

  1. left-click tray icon (main window is hidden)
  2. left-click tray icon again (main window is shown again)
  3. right-click tray icon (the context menu is shown shortly and insta-closes again)
  4. right-click tray icon again (the context menu is shown and stays)
    goto 1.

It "feels" like it could be related.

And you are right, if the "WS_EX_NOACTIVATE" part is disabled, the problem is gone.
But then the main window is stealing the focus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants