-
-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WLR Workspace manager implementation #805
WLR Workspace manager implementation #805
Conversation
auto WorkspaceGroup::handle_output_enter(wl_output *output) -> void { | ||
spdlog::debug("Output {} assigned to {} group", (void *)output, id_); | ||
for (auto &workspace : workspaces_) { | ||
workspace->show(); | ||
} | ||
output_ = output; | ||
} | ||
|
||
auto WorkspaceGroup::handle_output_leave() -> void { | ||
spdlog::debug("Output {} remove from {} group", (void *)output_, id_); | ||
output_ = nullptr; | ||
for (auto &workspace : workspaces_) { | ||
workspace->hide(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have multiple outputs you will get this message multiple times. You probably want to do this differently here. You can have a look in the taskbar module, how I handled output_{enter,leave} there. Something similar might also make sense for the workspaces (in combination with an option for all_outputs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Check only equality with the current output since compositor assign outputs to group by self. So all_output parameter isn't actual for wlr_workspaces.
Add removing buttons Adjust handling multiple outputs.
@l3nkz |
Sorry! I already looked through your other changes when you pushed the commit and they look good to me now. I have nothing to complain. Your work is a good basis to continue with further enhancements. However, I couldn't test it yet. I am currently not running a self-built wayfire on my machine. I will test it as soon as possible, if @Alexays considers it necessary. |
Code LGTM, once conflicts have been resolved. |
I will try to make some tests in the next days. Unfortunately not before Monday I think. |
I tested the module yesterday evening with my setup at home (single monitor) and today with my setup at work (multi-monitor) and it looks good to me so far. Four things that I recognized, but which are not a show-killer right now:
In total, I think the module is great! I am looking forward to use this in my production system! |
…pace-manager-implementation
@l3nkz
|
I think you can update the PR and merge, in that way we'll avoid merge conflicts in the future. |
I've updated PR accordingly to latest version of protocol.
What fixed:
What added:
As a next step I'll update sway PR with implementation, but this module can be considered as completed. |
Thanks a lot! |
I've also added documentation on wiki: https://github.com/Alexays/Waybar/wiki/Module:-Workspaces |
You shouldn't merge this PR at this point, because the protocol hasn't been finalized yet. Waybar may break because of a protocol adjustment. https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/40#note_1167835 |
I think all of us, that worked on the module (@Alexays, @Anakael and me) are aware of the fact, that the protocol isn't stable yet and that we have to adapt the implementation ones the protocol gets finalized. Maybe we can mark the module as experimental, might not work with your WM in the wiki and in the manpages? |
|
I've added note about it on page. |
It will break the whole Waybar, and it will disconnect the whole Wayland connection with a protocol error. The copy of the protocol doesn't prevent that. You can daily use this WIP work by building the unmerged PR. |
@Anakael We should add an experimental flag to enable some modules on Waybar, e.g. this one. |
Ok, I will add. |
Great to see you are still working on this and finished it for the waybar side! Am I right to assume this won't work on sway at the moment because sway is missing the implementation? |
Yes, master is missing of this implementation because protocol is not merged. |
Hey, sorry to bother you with a noob question, but can you maybe explain why is this needed and what is the different between this and |
But as for now this module should be used only for testing purposes. |
This is implementation of wlr_workspaces protocol from https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/40
Sway compositor implementation: swaywm/sway#5597
Wayfile compositor implementation: WayfireWM/wayfire#647
Many options comparing sway/workspaces was omitted like disable-*.
Let me know if they was usefull. By the rest it is drop-in replacement of sway/workspaces.
Scrolling will be introduced in next PRs.
P.S.
Not sure if it works correctly with multiple outputs.