JakeStanger / ironbar

Customisable Wayland gtk bar written in Rust.
https://crates.io/crates/ironbar
MIT License
647 stars 58 forks source link

[Launcher] Ability to focus fullscreen apps on Hyprland #223

Open donovanglover opened 1 year ago

donovanglover commented 1 year ago

Describe the bug When a workspace has a fullscreen window, clicking on another application on the same workspace will switch to it and have focus, but won't be visible to the user.

Similarly, floating windows are hidden behind other windows that are also floating.

To Reproduce

  1. Open 2 applications
  2. Make one fullscreen
  3. Change workspaces
  4. Click the icon of the application that isn't fullscreen

Expected behavior User should see the application they clicked. Fullscreen can be disabled and bringactivetotop can be used for floating windows

System information:

Additional context

JakeStanger commented 1 year ago

I think this is related to #183. It seems to be one or more bugs (or at least unexpected behaviours) (confirmed working as expected by Vaxry) with how Hyprland handles giving window focus.

The launcher calls activate on the underlying toplevel through Wayland directly, which means it's up to the compositor to actually handle the request.

A possible workaround might be to add some kind of config option, so you can run a script when the button is clicked instead of calling wayland. I may also be able to hook into the Hyprland IPC. Ideally though, I'd rather see it fixed upstream.

donovanglover commented 1 year ago

Custom scripts could be nice since users would be able to use swapwithmaster and other dispatchers. I'd like to automatically make windows master when clicking on them.