[GH-ISSUE #1404] Tray icon for FlClash (Flutter-based) fails to update #7448

Closed
opened 2026-05-23 02:54:31 +01:00 by JakeStanger · 3 comments
Owner

Originally created by @ffs-akl on GitHub (Feb 28, 2026).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1404

Describe the bug

The tray icon for FlClash (a Flutter-based VPN/Proxy client) is not displayed correctly in Ironbar's tray module. While other status bar implementations like sfwbar handle it perfectly, Ironbar shows a generic icon or a placeholder that never changes.
Crucial Observation: Dynamic Status Icons
FlClash has 3 distinct status icons representing different connection states. These icons are stored as absolute paths in the application's data directory:

State 1 /usr/lib/flclash/data/flutter_assets/assets/images/icon/status_1.png
State 2/usr/lib/flclash/data/flutter_assets/assets/images/icon/status_2.png
State 3 /usr/lib/flclash/data/flutter_assets/assets/images/icon/status_3.png

In sfwbar, the icon correctly switches between these three images in real-time. In Ironbar, it never displays the actual icon from these paths, nor does it react to state changes.

To reproduce
Steps to reproduce the behavior:

  1. Add module tray
  2. Start Flclash

Expected behavior

Ironbar should resolve the absolute file paths provided by the StatusNotifierItem (SNI) protocol and update the icon immediately when the application signals a change.
System information:

  • Distro: [Arch Linux]
  • Compositor: [Niri]
  • Ironbar version: [git ver g83e8728]

Configuration

Config
    $menu = { type = "menu"  
                       label = ""
                       label_icon = "labwc"  
                       label_icon_size = 22
                       app_icon_size = 22
                       height = 440
                       width = 200
                          center = [
                                   {
                                 type = "xdg_entry"
                                 label = "网络"
                                 icon = "applications-internet"
                                 categories = [
                                 "Network"
                                       ]
                                  }
                                  {
                                 type = "xdg_entry"
                                 label = "图像"
                                 icon = "applications-graphics"
                                  categories = [
                                  "Graphics"
                                        ]
                                   }
                                  {
                                 type = "xdg_entry"
                                 label = "媒体"
                                 icon = "applications-multimedia"
                                 categories = [
                                  "Audio"
                                  "Video"
                                  "AudioVideo"
                                       ]
                                   }
                                   {
                                  type = "xdg_entry"
                                  label = "附件"
                                  icon = "accessories"
                                  categories = [
                                        "accessories"
                                        "Core"
                                        "Legacy"
                                        "Utility"
                                              ]
                                  }
                                {
                                   type = "xdg_entry"
                                   label = "开发"
                                   icon = "applications-development"
                                   categories = [
                                       "Development"
                                        ]
                                 }
                            ]
                        end = [
                                           {  
                                          type = "custom"
                                          label = "锁屏"
                                          icon = "system-lock-screen"
                                          on_click = "hyprlock"
                                          }
                                          {  
                                          type = "custom"
                                          label = "注销"
                                          icon = "system-log-out"
                                          on_click = "~/.config/labwc/Power n"
                                          }
                                          {  
                                          type = "custom"
                                          label = "重启"
                                          icon = "system-reboot"
                                          on_click = "~/.config/labwc/Power r"
                                          }
                                          {  
                                          type = "custom"
                                          label = "关机"
                                          icon = "system-shutdown"
                                          on_click = "~/.config/labwc/Power p"
                                          }
                                  ]
                       }
    $workspaces = { type = "workspaces" }
    $launcher = { 
                             type = "launcher" 
                             favorites = ["ghostty" "chromium" "thunar" "org.gnome.TextEditor"]
                             icon_size = 18
                             truncate.mode = "end" 
                             truncate.max_length = 30 
                             }

    $sys_info = { type = "sys_info" 
                           format = ["{cpu_percent}% " ] 
                           interval.cpu = 1 
                              }
    $clipboard = { type = "clipboard" max_items = 5 truncate.mode = "end" truncate.length = 30 }
    $volume = { type = "volume" }
    $tray = { type = "tray" }
    $clock = { type = "clock"   format = "%H:%M"}
    $notifications = { type = "notifications"  show_if = "pgrep -x swaync" }

    $power_menu = {
        type = "custom"
        name = "power-menu"
        class = "power-menu"

        bar = [ { type = "button" name="power-btn" label = "󰐥" on_click = "popup:toggle" } ]

        popup = [ {
            type = "box"
            orientation = "vertical"
            widgets = [
                { type = "label" name = "header" label = "Power menu" }
                {
                    type = "box"
                    name = "buttons"
                    widgets = [
                        { type = "button" class="power-btn" label = "<span>󰐥</span>" on_click = "!shutdown now" }
                        { type = "button" class="power-btn" label = "<span>󰜉</span>" on_click = "!reboot" }
                    ]
                }
            ]
        } ]
    }
} in {
    icon_theme = "Qogir-Light"
    position = "bottom"
    height = 32
    start = [ $menu  $workspaces ]
    center = [ $launcher]
    end = [$sys_info $tray $clipboard $volume  $clock $notifications ]
}

Styles

 window   {
         background-color:  alpha(@theme_bg_color, 0.6) ;
    }
  button {
         background-color:  alpha(@theme_bg_color, 0.0);
         padding: 0px 1px 0px 1px;
         margin: 1px 6px 1px 1px;
         border-radius: 0px;
  }
  button:hover, button:active {
    background-color: alpha(@theme_bg_color, 0.4);
}

  
  popover  {
        background-color:  alpha(@theme_bg_color, 0.0);
  }
  
  popover contents  {
            background-color:  @theme_bg_color;
   }
  
  calendar  {
              background-color:  alpha(@theme_bg_color, 0.6) ;
    }
  /*menu*/
  .menu {
       }
  .popup-menu .main {
        }       
   .popup-menu .main .category {
            padding: 5px 1px 5px 1px;
            margin: 1px;
    }
  .popup-menu .main .category:hover {
          background-color: alpha(#353535,0.4);
          border-radius: 6px; 
    }
    .popup-menu .main .category.open {
          font-size: 16px;
          font-weight: 900;
          color: alpha(#353535,0.6); 
    }
    
 /* --- launcher --- */
/*  .launcher  .item {
            padding: 0px 1px 0px 1px;
            margin: 1px 6px 1px 1px;
            border-radius: 0;
  }  */
  .launcher .item + .item {
    margin-left: 8px;
    margin-right: 8px;
  }

  .launcher .item.open {
            border-bottom: 1px solid blue;
  }

  .launcher .item.focused {
          border-bottom: 1px solid green;
   }

.launcher .item.urgent {
          border-bottom: 1px solid red;
 }
 
 /*sys-info */
 .sysinfo {
          margin-right: 8px;
  }
 .sysinfo .item {
 }
 /* --- volume --- */
.volume .source {
    
}
.popup-volume .device-box {
    
}

/* --- clock --- */
.clock {
        padding: 1px;
        margin:  1px;
}

.popup-clock .calendar-clock {
}

Additional context

output message form terminal 2026-02-28T02:26:58.819242Z INFO system_tray::dbus::status_notifier_watcher: 141: new item: :1.439/StatusNotifierItem 2026-02-28T02:26:58.821329Z INFO system_tray::dbus::status_notifier_watcher: 137: new item: :1.363/org/ayatana/NotificationItem/nm_applet (duplicate) 2026-02-28T02:27:32.711049Z WARN system_tray::client: 469: org.freedesktop.DBus.Error.InvalidArgs: No such property 'IconPixmap' 2026-02-28T02:27:32.711226Z WARN system_tray::client: 469: org.freedesktop.DBus.Error.InvalidArgs: No such property 'IconPixmap' 2026-02-28T02:27:38.708938Z WARN system_tray::client: 469: org.freedesktop.DBus.Error.InvalidArgs: No such property 'IconPixmap'
**Screenshots** Image
Originally created by @ffs-akl on GitHub (Feb 28, 2026). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1404 **Describe the bug** <!-- A clear and concise description of what the bug is. --> The tray icon for FlClash (a Flutter-based VPN/Proxy client) is not displayed correctly in Ironbar's tray module. While other status bar implementations like sfwbar handle it perfectly, Ironbar shows a generic icon or a placeholder that never changes. Crucial Observation: Dynamic Status Icons FlClash has 3 distinct status icons representing different connection states. These icons are stored as absolute paths in the application's data directory: ``` State 1 /usr/lib/flclash/data/flutter_assets/assets/images/icon/status_1.png State 2/usr/lib/flclash/data/flutter_assets/assets/images/icon/status_2.png State 3 /usr/lib/flclash/data/flutter_assets/assets/images/icon/status_3.png ``` In sfwbar, the icon correctly switches between these three images in real-time. In Ironbar, it never displays the actual icon from these paths, nor does it react to state changes. **To reproduce** Steps to reproduce the behavior: 1. Add module `tray` 2. Start Flclash **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Ironbar should resolve the absolute file paths provided by the StatusNotifierItem (SNI) protocol and update the icon immediately when the application signals a change. **System information:** - Distro: [Arch Linux] - Compositor: [Niri] - Ironbar version: [git ver g83e8728] **Configuration** <!-- Share your bar configuration and stylesheet as applicable: --> <details><summary>Config</summary> ```let { $menu = { type = "menu" label = "" label_icon = "labwc" label_icon_size = 22 app_icon_size = 22 height = 440 width = 200 center = [ { type = "xdg_entry" label = "网络" icon = "applications-internet" categories = [ "Network" ] } { type = "xdg_entry" label = "图像" icon = "applications-graphics" categories = [ "Graphics" ] } { type = "xdg_entry" label = "媒体" icon = "applications-multimedia" categories = [ "Audio" "Video" "AudioVideo" ] } { type = "xdg_entry" label = "附件" icon = "accessories" categories = [ "accessories" "Core" "Legacy" "Utility" ] } { type = "xdg_entry" label = "开发" icon = "applications-development" categories = [ "Development" ] } ] end = [ { type = "custom" label = "锁屏" icon = "system-lock-screen" on_click = "hyprlock" } { type = "custom" label = "注销" icon = "system-log-out" on_click = "~/.config/labwc/Power n" } { type = "custom" label = "重启" icon = "system-reboot" on_click = "~/.config/labwc/Power r" } { type = "custom" label = "关机" icon = "system-shutdown" on_click = "~/.config/labwc/Power p" } ] } $workspaces = { type = "workspaces" } $launcher = { type = "launcher" favorites = ["ghostty" "chromium" "thunar" "org.gnome.TextEditor"] icon_size = 18 truncate.mode = "end" truncate.max_length = 30 } $sys_info = { type = "sys_info" format = ["{cpu_percent}% " ] interval.cpu = 1 } $clipboard = { type = "clipboard" max_items = 5 truncate.mode = "end" truncate.length = 30 } $volume = { type = "volume" } $tray = { type = "tray" } $clock = { type = "clock" format = "%H:%M"} $notifications = { type = "notifications" show_if = "pgrep -x swaync" } $power_menu = { type = "custom" name = "power-menu" class = "power-menu" bar = [ { type = "button" name="power-btn" label = "󰐥" on_click = "popup:toggle" } ] popup = [ { type = "box" orientation = "vertical" widgets = [ { type = "label" name = "header" label = "Power menu" } { type = "box" name = "buttons" widgets = [ { type = "button" class="power-btn" label = "<span>󰐥</span>" on_click = "!shutdown now" } { type = "button" class="power-btn" label = "<span>󰜉</span>" on_click = "!reboot" } ] } ] } ] } } in { icon_theme = "Qogir-Light" position = "bottom" height = 32 start = [ $menu $workspaces ] center = [ $launcher] end = [$sys_info $tray $clipboard $volume $clock $notifications ] } ``` </details> <details><summary>Styles</summary> ``` window { background-color: alpha(@theme_bg_color, 0.6) ; } button { background-color: alpha(@theme_bg_color, 0.0); padding: 0px 1px 0px 1px; margin: 1px 6px 1px 1px; border-radius: 0px; } button:hover, button:active { background-color: alpha(@theme_bg_color, 0.4); } popover { background-color: alpha(@theme_bg_color, 0.0); } popover contents { background-color: @theme_bg_color; } calendar { background-color: alpha(@theme_bg_color, 0.6) ; } /*menu*/ .menu { } .popup-menu .main { } .popup-menu .main .category { padding: 5px 1px 5px 1px; margin: 1px; } .popup-menu .main .category:hover { background-color: alpha(#353535,0.4); border-radius: 6px; } .popup-menu .main .category.open { font-size: 16px; font-weight: 900; color: alpha(#353535,0.6); } /* --- launcher --- */ /* .launcher .item { padding: 0px 1px 0px 1px; margin: 1px 6px 1px 1px; border-radius: 0; } */ .launcher .item + .item { margin-left: 8px; margin-right: 8px; } .launcher .item.open { border-bottom: 1px solid blue; } .launcher .item.focused { border-bottom: 1px solid green; } .launcher .item.urgent { border-bottom: 1px solid red; } /*sys-info */ .sysinfo { margin-right: 8px; } .sysinfo .item { } /* --- volume --- */ .volume .source { } .popup-volume .device-box { } /* --- clock --- */ .clock { padding: 1px; margin: 1px; } .popup-clock .calendar-clock { } ``` </details> **Additional context** <details> <summary>output message form terminal</summary> <!-- Add any other context about the problem here. --> 2026-02-28T02:26:58.819242Z INFO system_tray::dbus::status_notifier_watcher: 141: new item: :1.439/StatusNotifierItem 2026-02-28T02:26:58.821329Z INFO system_tray::dbus::status_notifier_watcher: 137: new item: :1.363/org/ayatana/NotificationItem/nm_applet (duplicate) 2026-02-28T02:27:32.711049Z WARN system_tray::client: 469: org.freedesktop.DBus.Error.InvalidArgs: No such property 'IconPixmap' 2026-02-28T02:27:32.711226Z WARN system_tray::client: 469: org.freedesktop.DBus.Error.InvalidArgs: No such property 'IconPixmap' 2026-02-28T02:27:38.708938Z WARN system_tray::client: 469: org.freedesktop.DBus.Error.InvalidArgs: No such property 'IconPixmap' </details> **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> <img width="553" height="127" alt="Image" src="https://github.com/user-attachments/assets/54dc460a-f97a-450a-9374-a2635ca38180" />
Author
Owner

@JakeStanger commented on GitHub (Apr 14, 2026):

Could you see if the latest commit fixes this please? I've just merged #1221 which improves support of image handling for the tray so that it now goes through the central system.

<!-- gh-comment-id:4247053706 --> @JakeStanger commented on GitHub (Apr 14, 2026): Could you see if the latest commit fixes this please? I've just merged #1221 which improves support of image handling for the tray so that it now goes through the central system.
Author
Owner

@ffs-akl commented on GitHub (Apr 16, 2026):

in git ver a59bb56,I did some further testing and confirmed that the issue is specifically about the dynamic update of IconPixmap.

Here is the behavior I observed:

Initial Load is Fine: When ironbar starts, it correctly grabs and displays the current tray icon from FLClash (e.g., status_1).

Dynamic Update Fails: When FLClash changes its state (e.g., from status_1 to status_2), the icon in ironbar immediately turns into a "missing-image" (circle-slash) placeholder.

Logs confirm the failure: Every time the icon tries to update, ironbar throws:
WARN system_tray::client: org.freedesktop.DBus.Error.InvalidArgs: No such property “IconPixmap”

Proof of Initialization Success: If I restart ironbar after the icon has already changed to status_2, it will correctly display status_2 upon startup. But as soon as it switches back to status_1, it breaks again.

It seems ironbar can fetch the pixmap during the initial scan but fails to do so during an incremental update.

https://github.com/user-attachments/assets/d8476f50-0cc9-40ea-80e7-3a65c8ef5a8b

<!-- gh-comment-id:4261477050 --> @ffs-akl commented on GitHub (Apr 16, 2026): in git ver` a59bb56`,I did some further testing and confirmed that the issue is specifically about the dynamic update of IconPixmap. Here is the behavior I observed: Initial Load is Fine: When ironbar starts, it correctly grabs and displays the current tray icon from FLClash (e.g., status_1). Dynamic Update Fails: When FLClash changes its state (e.g., from status_1 to status_2), the icon in ironbar immediately turns into a "missing-image" (circle-slash) placeholder. Logs confirm the failure: Every time the icon tries to update, ironbar throws: WARN system_tray::client: org.freedesktop.DBus.Error.InvalidArgs: No such property “IconPixmap” Proof of Initialization Success: If I restart ironbar after the icon has already changed to status_2, it will correctly display status_2 upon startup. But as soon as it switches back to status_1, it breaks again. It seems ironbar can fetch the pixmap during the initial scan but fails to do so during an incremental update. https://github.com/user-attachments/assets/d8476f50-0cc9-40ea-80e7-3a65c8ef5a8b
Author
Owner

@JakeStanger commented on GitHub (May 8, 2026):

This was such a weird issue in the end. It doesn't help that FLClash doesn't implement a spec-compliant icon tray (nothing does, awful spec, blah blah), but basically the pixmap warning was not the issue (and that'll continue to get logged until they fix their tray).

Ironbar was properly receiving the icon path, properly rendering it and loading it into the image, and then...effectively throwing it away. There was a call to GTK to set the icon on the tray icon button, which it turns out rips out the widget tree and sticks its own in.

The only reason I'd not spotted it before is because every other tray icon either sends a pixmap or an icon name rather than a file path (like the spec says you should...), so GTK handled the icons fine.

Fix incoming shortly!

<!-- gh-comment-id:4410271905 --> @JakeStanger commented on GitHub (May 8, 2026): This was such a weird issue in the end. It doesn't help that FLClash doesn't implement a spec-compliant icon tray (nothing does, awful spec, blah blah), but basically the pixmap warning was not the issue (and that'll continue to get logged until they fix their tray). Ironbar was properly receiving the icon path, properly rendering it and loading it into the image, and then...effectively throwing it away. There was a call to GTK to set the icon on the tray icon button, which it turns out rips out the widget tree and sticks its own in. The only reason I'd not spotted it before is because every other tray icon either sends a pixmap or an icon name rather than a file path (like the spec says you should...), so GTK handled the icons fine. Fix incoming shortly!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#7448
No description provided.