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

[feat] Listening events for tray icons #8584

Closed
DWHengr opened this issue Jan 11, 2024 · 2 comments · Fixed by #9777
Closed

[feat] Listening events for tray icons #8584

DWHengr opened this issue Jan 11, 2024 · 2 comments · Fixed by #9777

Comments

@DWHengr
Copy link

DWHengr commented Jan 11, 2024

Describe the problem

Listening events for tray icons, such as mouse entry/leave, etc. And return to the position of the mouse and the position of the system tray.

Describe the solution you'd like

pub enum SystemTrayEvent {
    Entry {
        tray_id: String,
        position: PhysicalPosition<f64>,
        size: PhysicalSize<f64>,
    },
    Leave {
        tray_id: String,
        position: PhysicalPosition<f64>,
        size: PhysicalSize<f64>,
    }
}

Alternatives considered

No response

Additional context

No response

@DWHengr
Copy link
Author

DWHengr commented May 9, 2024

Is there any way to achieve similar functionality in the v1 version?

@DWHengr
Copy link
Author

DWHengr commented May 9, 2024

Similar to the "mouse-leave" and "mouse-enter" events in electronjs.

amrbashir added a commit that referenced this issue May 14, 2024
amrbashir added a commit that referenced this issue May 14, 2024
lucasfernog added a commit that referenced this issue May 24, 2024
* feat(tray): add `enter`, `move` and `leave` events

closes #8584

* update api example

* check button state [skip ci]

* fix enum [skip ci]

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant