This repository was archived by the owner on Dec 10, 2024. It is now read-only.
File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ export class AppEvents {
281
281
this . tray . setToolTip ( app . getName ( ) ) ;
282
282
this . setTray ( false ) ;
283
283
284
- this . tray . on ( "double-click" , ( ) => {
284
+ this . tray . on ( "double-click" , ( ) => { // supports windows and mac only
285
285
if ( utils . getWindow ( ) ) {
286
286
if ( utils . getWindow ( ) . isVisible ( ) ) {
287
287
utils . getWindow ( ) . focus ( ) ;
@@ -291,6 +291,16 @@ export class AppEvents {
291
291
}
292
292
} ) ;
293
293
294
+ this . tray . on ( "click" , ( ) => {
295
+ if ( utils . getWindow ( ) && process . platform === "linux" ) { // use single click to open when double doesn't work
296
+ if ( utils . getWindow ( ) . isVisible ( ) ) {
297
+ utils . getWindow ( ) . focus ( ) ;
298
+ } else {
299
+ utils . getWindow ( ) . show ( ) ;
300
+ }
301
+ }
302
+ } ) ;
303
+
294
304
utils . getWindow ( ) . on ( "show" , ( ) => {
295
305
this . setTray ( true ) ;
296
306
} ) ;
Original file line number Diff line number Diff line change @@ -73,6 +73,10 @@ export default class mpris {
73
73
player . on ( "volume" , ( volume : string ) => {
74
74
renderer . executeJavaScript ( `app.mk.volume = ${ parseFloat ( volume ) } ` ) ;
75
75
} ) ;
76
+ player . on ( "raise" , ( ) => {
77
+ mpris . utils . getWindow ( ) . show ( ) ;
78
+ mpris . utils . getWindow ( ) . focus ( ) ;
79
+ } ) ;
76
80
77
81
mpris . utils . getIPCMain ( ) . on ( "mpris:playbackTimeDidChange" , ( event : any , time : number ) => {
78
82
player . getPosition = ( ) => time ;
You can’t perform that action at this time.
0 commit comments