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: add middle click event to tray #39926

Merged
merged 2 commits into from
Sep 27, 2023

Merge branch 'main' into feat_add_middle_click_event_to_tray

c9f414f
Select commit
Failed to load commit list.
Merged

feat: add middle click event to tray #39926

Merge branch 'main' into feat_add_middle_click_event_to_tray
c9f414f
Select commit
Failed to load commit list.
Electron Archaeologist / Artifact Comparison completed Sep 27, 2023 in 54s

Changes Detected

Looks like the electron.d.ts file changed.

--- a/electron.old.d.ts
+++ b/electron.new.d.ts
@@ -10467,6 +10467,36 @@ declare namespace Electron {
                                        * the dropped text string.
                                        */
                                       text: string) => void): this;
+    /**
+     * Emitted when the tray icon is middle clicked.
+     *
+     * @platform win32
+     */
+    on(event: 'middle-click', listener: (event: KeyboardEvent,
+                                         /**
+                                          * The bounds of tray icon.
+                                          */
+                                         bounds: Rectangle) => void): this;
+    off(event: 'middle-click', listener: (event: KeyboardEvent,
+                                         /**
+                                          * The bounds of tray icon.
+                                          */
+                                         bounds: Rectangle) => void): this;
+    once(event: 'middle-click', listener: (event: KeyboardEvent,
+                                         /**
+                                          * The bounds of tray icon.
+                                          */
+                                         bounds: Rectangle) => void): this;
+    addListener(event: 'middle-click', listener: (event: KeyboardEvent,
+                                         /**
+                                          * The bounds of tray icon.
+                                          */
+                                         bounds: Rectangle) => void): this;
+    removeListener(event: 'middle-click', listener: (event: KeyboardEvent,
+                                         /**
+                                          * The bounds of tray icon.
+                                          */
+                                         bounds: Rectangle) => void): this;
     /**
      * Emitted when the mouse clicks the tray icon.
      *