hyprland-community / hyprland-autoname-workspaces

Hyprland autoname workspaces 🪟 [maintainers=@cyrinux,@maximbaz]
ISC License
199 stars 7 forks source link

Unknown icon on app closing remaining #86

Closed cyrinux closed 1 year ago

cyrinux commented 1 year ago

Describe the bug since the last fix there is a new bug, when we close a client, we can saw on app closing the unknown icon remaining.

To Reproduce Steps to reproduce the behavior:

  1. Open a app
  2. Close the app and see the unknown icon
  3. Open another, or same app, or whatever action that trigger a refresh to see it disappear

Expected behavior This icon shouldnt appear

NTICompass commented 1 year ago

I have what I think is the same issue. I open a program that closes itself to the system tray. Something like Slack or Discord.

Whenever I close the windows (and they close to the system tray), then I get a unknown app icon stuck on that workspace.

Examples: Slack and Discord are open on workspace 2: 05 07 2023_shot_12:19:18

I closed both of them and they are in the system tray. And they are now "unknown" apps stuck forever on workspace 2. The unknown icons go away if I re-open the Slack or Discord windows. 05 07 2023_shot_12:19:26

EDIT: Looking at hyprctl clients, this might be a hyprland issue? I still see the windows there even after closing them.

Window 5613aaf73660 -> Friends - Discord:
    mapped: 0
    hidden: 0
    at: 2035,154
    size: 744,803
    workspace: 2 (2:  ²)
    floating: 0
    monitor: 1
    class: 
    title: 
    initialClass: discord
    initialTitle: Friends - Discord
    pid: 13316
    xwayland: 1
    pinned: 0
    fullscreen: 0
    fullscreenmode: 0
    fakefullscreen: 0
    grouped: 0
    swallowing: 0
NTICompass commented 1 year ago

I think I "fixed" this issue with the following config:

[exclude]
"" = "^$"
cyrinux commented 1 year ago

My last commit fix this bug I was referring, this more looks like a bug/hyprland race conditions, when we close a client there is (always?) a client remaining with empty class/title and a pid 0. So we filter now client with a negative or 0 pid.

I feel like we have another problem, we have for the moment no way to known that a client is in minimize state. So filtering on a empty class/title name is a good idea.

You should be able to use also this kind of filtering to be more specific, for eg:

[title_in_initial_class."discord"]
"^$" = ""