Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

bug: (Hyprland) `wlr/taskbar` doesn't update correctly when moving active window to another screen with `movetoworkspace`

Open radu-corbu opened this issue 1 year ago • 1 comments

Bug Report

Description

I have a dual monitor setup. When I open a window on one screen and I move it to my second screen by using keybinds, the wlr/taskbar module still displays the window icon on the original screen.

In ~/.config/hypr/hyprland.conf, the keybind I use for moving is, e.g.: bind = $mainMod SHIFT, 2, movetoworkspace, 2 (where workspace 2 is on the second screen)

If I manually drag the window to the second screen, this behavior does not happen. Manually dragging the window also corrects the issue, even if I don't move the window to another screen/workspace.

Steps to Reproduce

  1. In Hyprland, have the wlr/taskbar module in your waybar config
  2. Open any window on one of the screens
  3. Use a keybind shortcut involving movetoworkspace to move the window to another screen
  4. Look at your taskbar on the original screen, compared to the screen you moved the app to

Expected Behavior

When I move the active window to another screen using the movetoworkspace dispatcher in Hyprland, I expect the taskbar to update its icons on both screens.

Actual Behavior

The window icon stays on the screen it was moved from and doesn't show up in the screen it was moved to.

Screenshots

240307_11h01m20s_screenshot

Environment

  • Distro: Arch
  • Linux version (uname -a output): 6.7.8-zen1-1-zen
  • WM: Hyprland v0.35.0
  • Waybar version: v0.9.24

radu-corbu avatar Mar 07 '24 09:03 radu-corbu

I am having the same behavior on my setup, also using the same config. Using the move to workspace, swapwindow, and movewindow keybinds also don't work properly with wlr/taskbar on my machine, but dragging it does. Also, after moving a window to a monitor and back puts the icon on the other monitor. If there's anything you'd like me to do to diagnose this, or if you've solved it, let me know

Environment

  • Distro: Arch
  • Kernel: 6.9.0-zen1-1zen (has persisted for many versions)
  • Waybar version: v0.10.3 (has persisted for many versions)

Nilabb avatar May 18 '24 11:05 Nilabb

Can you confirm whether this is still happening with recent Hyprland (e.g. 0.41.2)?

wlr/taskbar depends on the wayland events being triggered. The module then doesn't do much magic with it. I have not looked into it in detail, so this is just a hunch: I think it's more likely that the issue is in Hyprland rather than wlr/taskbar.

If the issue still occurs, a debug log might help. But I can try and have a closer look. as well.

RobertMueller2 avatar Jul 01 '24 10:07 RobertMueller2

Can you confirm whether this is still happening with recent Hyprland (e.g. 0.41.2)?

wlr/taskbar depends on the wayland events being triggered. The module then doesn't do much magic with it. I have not looked into it in detail, so this is just a hunch: I think it's more likely that the issue is in Hyprland rather than wlr/taskbar.

If the issue still occurs, a debug log might help. But I can try and have a closer look. as well.

I can confirm, this does still persist in new versions of hyprland, including hyprland 0.41.2. If you want, I can try swap out the hyprland from the arch repos with hyprland-git to see if this issue still persists and send some debug info

Nilabb avatar Jul 02 '24 12:07 Nilabb

Thanks for taking the time to confirm, that should be recent enough to justify further investigation ;)

RobertMueller2 avatar Jul 02 '24 14:07 RobertMueller2

I've logged into Hyprland, and I can no longer reproduce this.

I'm using movetoworkspace, and the icon of the moved window is on the correct bar.

Hyprland: cc98594c3aed0b542e03818371a4636f549f80e1 Waybar: b26ab1f982c06ce48e96f3e4da8cde034296eb1d

RobertMueller2 avatar Jul 07 '24 09:07 RobertMueller2

I can still repro this on hyprland: eb97d949 waybar: 0d02f6877d88551ea2be0cd151c1e6354e208b1c

cuddleplush avatar Sep 15 '24 17:09 cuddleplush

I'm facing the same issue, almost as long as I use waybar. for years.

in addition: very often apps are not shown at all in wlr/taskbar, they are just missing . even when I move them to different workspaces with movetoworkspace the bar doesn't update.

that's why I'm used to reload waybar a lot. that fixes the taskbar.

e.g. hyprland:

bind = ALT,W, exec, killall waybar && waybar &

Arch hyprland 0.44.1-2 waybar 0.11.0-3

thanks guys for your great work, very appreciated!_

p.s.: rewrite option for taskbar also never worked. basically wlr/taskbar always felt very bugged, but unavoidable.

nevaforget avatar Nov 08 '24 08:11 nevaforget

+1 I am also having this issue. I can also confirm that manual dragging with the mouse does correct it as well.

Looking at my key-binds here are the relevant hyprland commands that are being called when moving the window to different workspaces.

# Move active window
bind = $mainMod SHIFT, h, movewindoworgroup, l
bind = $mainMod SHIFT, l, movewindoworgroup, r
bind = $mainMod SHIFT, k, movewindoworgroup, u
bind = $mainMod SHIFT, j, movewindoworgroup, d

# Move active window to specific workspace
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3  

# Move active window with mouse
bindm = Alt, mouse:272, movewindow
bindm = Alt, mouse:273, resizewindow

BaktashGorgani avatar Nov 09 '24 21:11 BaktashGorgani

same issue on latest version as well. hope this get fixed soon

isshin1 avatar Dec 26 '24 19:12 isshin1

I can reproduce the same issue with:

1. waybar 0.11.0-4
2. hyprland 0.46.2-4

minhducck avatar Dec 27 '24 07:12 minhducck