fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
25.14k stars 1.4k forks source link

On MacOS SysTray menu does not show when clicked on an active space in second monitor #5223

Open udelledo opened 3 weeks ago

udelledo commented 3 weeks ago

Checklist

Describe the bug

The basic sample application found on the documentation when running on a MacOS shows the systray menu on when the systray icon is clicked in a Desktop window, it doesn't show anything when it's clicked with a space active

How to reproduce

  1. Run the sample systray application
  2. Get to a space on a second monitor (full window application)
  3. click on the systray icon
  4. The menu does not show

Screenshots

No response

Example code

package main

import (
    "fyne.io/fyne/v2"
    "fyne.io/fyne/v2/app"
    "fyne.io/fyne/v2/driver/desktop"
    "fyne.io/fyne/v2/widget"
)

func main() {
    a := app.New()
    w := a.NewWindow("SysTray")

    if desk, ok := a.(desktop.App); ok {
        m := fyne.NewMenu("MyApp",
            fyne.NewMenuItem("Show", func() {
                w.Show()
            }))
        desk.SetSystemTrayMenu(m)
    }

    w.SetContent(widget.NewLabel("Fyne System Tray"))
    w.SetCloseIntercept(func() {
        w.Hide()
    })
    w.ShowAndRun()
}

Fyne version

2.5.1

Go compiler version

1.23.2

Operating system and version

Mac OS 14.5

Additional Information

No response

andydotxyz commented 3 weeks ago

I cannot replicate this when the primary monitor is the fullscreen app - do you see that too? I will go find another monitor to plug in.

udelledo commented 3 weeks ago

Yes, I noticed that on the primary monitory it does not happen, but I also just noticed that the fyne app is not the only one that is showing this behavior. Cisco any connect is behaving the same, but Outlook or Oracle content are working correctly.