fyne-io / fyne

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

On MacOs systray tooltip does not show when full window app is active #5282

Closed udelledo closed 1 day ago

udelledo commented 1 week ago

Checklist

Describe the bug

I have configured my fyne app to show a tooltip using the systray.SetTooltip("tooltip") method. I can correctly see the tooltip when I hover on the sytray icon when the systray bar is shown on a Desktop window (on both monitors in my dual monitor setup), however when I hover on the icon in a space (full windowed app), the tooltip is not shown

How to reproduce

  1. Start the fyne app
  2. while a desktop pane is active hover on the icon: the tooltip is shown
  3. maximize an app
  4. while on the scene with the maximized app hover on the app icon: the tooltip is not shown

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"
        "fyne.io/systray"
)

func main() {
    a := app.New()
    w := a.NewWindow("SysTray")
        a.Lifecycle().SetOnStarted(func() {
          systray.SetTooltip("test tooltip")
        })
    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.7.1

Additional Information

No response

andydotxyz commented 1 day ago

I have checked this out and you're right. However all the other apps I have installed have the same restriction (Dropbox, Docker etc).

I think this may be a "feature" of macOS...

udelledo commented 1 day ago

Jetbrains Toolbox doesn't have this behavior, and shows the tooltip even on full screen, so I don't think it's a restriction on MacOs side, but definitely it looks like they expect something different to be set, because also in my case, many other apps do not show the tooltip.

image