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

Mouse wheel over notification area icon #637

Open
emoacht opened this issue Nov 10, 2024 · 4 comments
Open

Mouse wheel over notification area icon #637

emoacht opened this issue Nov 10, 2024 · 4 comments

Comments

@emoacht
Copy link
Owner

emoacht commented Nov 10, 2024

Regarding the request to change the brightness by mouse wheel over the notification area icon, as I explained in #174, the implementation by global hook is very inefficient and thus not desirable.

Instead, I added a function to capture mouse wheel over the notification area icon by another approach in 4d7d956
In this implementation, when the mouse cursor enters the rectangle of notification area icon, a semi-transparent window will overlay the icon and receive mouse events. The management of that window is a little tricky and I need to test it for a while.

You can test this function by /iconwheel command-line option.

@duncansmart
Copy link

Great idea with the overlay window. However, the scrolling only affects one window when the sliders window is not showing, even though the unison checkboxes are selected for both monitors. The scrolling does work as expected if the sliders window is first displayed and then the mouse is scrolled over the NotifyIcon.

@duncansmart
Copy link

Also, I set the Window background to Argb(100, 255, 0, 0) and inflated iconRect (iconRect.Inflate(0, 20)) so i can see the behaviour:

image

You can occasionally see the MouseLeave logic is unreliable: here my mouse has moved off to the right and the window is still visible:
image

... OK fine but that also means that the task bar window (which is likely topmost too) can sometimes position itself over our window e.g. if I click the taskbar to the left-hand side of the notification area, the task bar goes back on top, which blocks the mouse input - our window is unaware it's no longer on top so doesn't try to activate/reposition itself:
image

Here you can see the overlay window has gone behind the task bar, hence the mouse messages from the cursor won't reach it:
image

@emoacht
Copy link
Owner Author

emoacht commented Nov 12, 2024

Thank you for the feedback.
Probably fixed by 712c1aa and e531e47

@duncansmart
Copy link

  • ✅ The icon mouse wheel option is very stable now
  • 🤔 No improvement on the unison option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants