Ulauncher / Ulauncher

Feature rich application Launcher for Linux
https://ulauncher.io
Other
3.63k stars 191 forks source link

Launcher not closing after opening application #1381

Closed DADA30000 closed 4 months ago

DADA30000 commented 4 months ago

Environment

Hyprland, NixOS 24.05

Bug description

I'm using 6.0.0-beta10, in release notes it was said that this problem was fixed, but it's not fixed. When I'm opening an app through ulauncher, ulauncher is not being closed afterwards

Log output

Extension Terminal Runner has not yet been updated to support API v3.0. Running in compatibility mode, which may not be fully functional.
2024-04-25 18:43:37,157 ℹ️  INFO Ulauncher version 6.0.0-beta10 main.main:53
2024-04-25 18:43:37,157 ℹ️  INFO Extension API version 3.0 main.main:54
2024-04-25 18:43:37,157 ℹ️  INFO GTK+ 3.24.39 main.main:55
2024-04-25 18:43:37,157 ℹ️  INFO PyGObject+ 3.46.0 main.main:56
2024-04-25 18:43:37,158 ℹ️  INFO Desktop: HYPRLAND (WAYLAND) on NixOS 24.05 (Uakari) main.main:58
2024-04-25 18:43:37,158 ⚠️  WARNING 

╔═════════════════════════════════════════════════════════════════════════════╗
║                  YOU ARE RUNNING A PRE-RELEASE of ULAUNCHER.                ║
║ Please do not report extension API support warnings to extension developers ║
║ We are still in the process of developing and documenting these features    ║
╚═════════════════════════════════════════════════════════════════════════════╝

 main.main:60
2024-04-25 18:43:37,162 ℹ️  INFO Layer shell: Yes main.main:71
2024-04-25 18:43:37,163 ℹ️  INFO X11 backend: No main.main:72
2024-04-25 18:43:37,163 ℹ️  INFO Migrating /home/l0lk3k/.config/ulauncher/ext_preferences/com.github.lighttigerxiv.ulauncher-terminal-runner-extension.json to /home/l0lk3k/.config/ulauncher/ext_preferences/com.github.lighttigerxiv.ulauncher-terminal-runner-extension.json migrate._migrate_file:50
2024-04-25 18:43:37,229 ℹ️  DEBUG Screen RGBA visual: <__gi__.GdkWaylandVisual object at 0x7f6b0245a980 (GdkWaylandVisual at 0xde70f0)> UlauncherWindow.position_window:256
2024-04-25 18:43:37,229 ℹ️  DEBUG Screen is composited: True UlauncherWindow.position_window:257
2024-04-25 18:43:37,275 ℹ️  DEBUG render 6 results UlauncherWindow.show_results:354
2024-04-25 18:43:37,329 ℹ️  DEBUG Screen RGBA visual: <__gi__.GdkWaylandVisual object at 0x7f6b0247c0c0 (GdkWaylandVisual at 0xde70f0)> UlauncherWindow.position_window:256
2024-04-25 18:43:37,329 ℹ️  DEBUG Screen is composited: True UlauncherWindow.position_window:257
2024-04-25 18:43:37,345 ℹ️  DEBUG render 6 results UlauncherWindow.show_results:354
2024-04-25 18:43:37,319 ℹ️  DEBUG Send message with keys "{'ext_id', 'type'}" Client.send:83
2024-04-25 18:43:37,347 ℹ️  DEBUG Received data of 116 bytes framer._ingest_data:103
2024-04-25 18:43:37,347 ℹ️  DEBUG Received message with keys "{'type', 'ext_id'}" framer._ingest_data:121
2024-04-25 18:43:37,349 ℹ️  DEBUG Send event dict to "com.github.lighttigerxiv.ulauncher-terminal-runner-extension" ExtensionSocketController._send_event:51
2024-04-25 18:43:37,349 ℹ️  INFO Extension "com.github.lighttigerxiv.ulauncher-terminal-runner-extension" connected ExtensionSocketController.__init__:46
2024-04-25 18:43:37,320 ℹ️  DEBUG Sent 116 bytes framer._write_done:154
2024-04-25 18:43:37,350 ℹ️  DEBUG Sent 120 bytes framer._write_done:154
2024-04-25 18:43:37,350 ℹ️  DEBUG Received data of 120 bytes framer._ingest_data:103
2024-04-25 18:43:37,350 ℹ️  DEBUG Received message with keys "{'type', 'args'}" framer._ingest_data:121
2024-04-25 18:43:37,350 ℹ️  DEBUG Incoming event dict Client.on_message:58
2024-04-25 18:43:37,350 ℹ️  DEBUG com.github.lighttigerxiv.ulauncher-terminal-runner-extension: No listeners for event PreferencesEvent extension.trigger_event:91
2024-04-25 18:43:38,776 ℹ️  INFO Will run command in preferred terminal (kitty) launch_app.launch_app:40
2024-04-25 18:43:38,777 ℹ️  INFO Run application btop++ (btop) Exec ['kitty', 'btop'] launch_app.launch_app:50

Communication guidelines

Ulauncher v6

friday commented 4 months ago

What's the output of ulauncher --version?

friday commented 4 months ago

Or actually nvm I guess it says 6.0.0-beta10 in the log.

I can't reproduce this in my environment so help would be appreciated. Does it only happen with terminal apps?

Supreeeme commented 4 months ago

This is happening to me as well with every app on Ubuntu 22.04 LTS (also on beta10). Checking with WAYLAND_DEBUG I don't see any calls to zwlr_layer_surface_v1.destroy().

friday commented 4 months ago

Thanks @Supreeeme! This gives me a pretty good idea of how this was caused and probably how to fix it.

friday commented 4 months ago

I think bce7010478dddaf9d6867b428e700d8aa96a8258 may have broken it, but I'm not sure. Could you test if this works in v6.0.0-beta6 but not v6.0.0-beta7?

DADA30000 commented 4 months ago

I think bce7010 may have broken it, but I'm not sure. Could you test if this works in v6.0.0-beta6 but not v6.0.0-beta7?

idk how to do this with flakes

i0dk1 commented 4 months ago

Just specify the rev @DADA30000

https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake#examples

friday commented 4 months ago

The intended behavior for Ulauncher is to hide the window when you lose focus, but also to hide it when you launch an app. Both have to fail for Ulauncher to stay open.

For me, the former never failed before, but shortly after the other issue was raised I managed to replicate it with multiple monitors for one specific app. Since I was not at home and did not have time to work on Ulauncher when this happened I could only put a few minutes on it. I made it work for that situation, and found that I had to return True instead of False in one location, so I figured I probably messed the semantics up in the refactoring PR that introduced this. However that wasn't the case, and instead I got it wrong in the hotfix, but with the hotfix + the focus out behavior it would work for me 100% of the time.

Now I managed to test it some more and reverted the former hotfix in 3efdc942. I tried to replicate the issue but haven't been able to (not for lacking monitors to test with).

So please test again with the v6 branch.

Also @Thanatermesis can you confirm if it works for you too now or if the issue was reintroduced/never fixed for you?

friday commented 4 months ago

And I'd like to understand why this doesn't seem to trigger for wlr-users?

https://github.com/Ulauncher/Ulauncher/blob/3efdc9425c75fb13031be8c5d323d03e290ab611/ulauncher/ui/windows/UlauncherWindow.py#L131-L133

friday commented 4 months ago

Latest release includes the new changes: https://github.com/Ulauncher/Ulauncher/releases/tag/v6.0.0-beta11

friday commented 4 months ago

I'll close the issue. But if you still get the problem after updating, write a comment.

DADA30000 commented 4 months ago

yep, now it works as it should be

Thanatermesis commented 4 months ago

I can confirm it works on my side too