WayfireWM / wayfire

A modular and extensible wayland compositor
https://wayfire.org/
MIT License
2.35k stars 174 forks source link

Incorrect workspace data in wf::view_change_workspace_signal #2369

Open marcusbritanicus opened 3 months ago

marcusbritanicus commented 3 months ago

Describe the bug The data returned by wf::view_change_workspace_signal is sometimes incorrect. This happens, for example, when we attempt to move a window using the with_win_* keybind of vswitch. I believe this happens when animations are involved. Or if you attempt to move a view between workspaces interactively, via the move plugin.

To Reproduce Steps to reproduce the behavior:

  1. Enable plugin vswitch
  2. Move a view between two workspaces
  3. The signal wf::view_change_workspace_signal contains the same value in both from and to fields. The to values is correct, and the from value contains same value as to.

Expected behavior from should contain the correct value.

Extra information When the send_win_* vswitch is used, the values returned are proper.

Screenshots or stacktrace N/A

Wayfire version git

ammen99 commented 2 months ago

I think it should be easy to set them in the plugins when they emit the signal.

marcusbritanicus commented 2 months ago

@ammen99 We already "set" them in the plugin. That's why we have a valid value. The problem is that the wrong value is being set.

https://github.com/WayfireWM/wayfire/blob/master/plugins/vswitch/vswitch.cpp#L89