BuddiesOfBudgie / budgie-desktop

Budgie Desktop is a familiar, modern desktop environment.
https://buddiesofbudgie.org
GNU General Public License v2.0
928 stars 47 forks source link

Port TabSwitcher, Show Desktop & Workspace applets over to libxfce4windowing #485

Closed JoshStrobl closed 10 months ago

JoshStrobl commented 10 months ago

This PR ports the following features over to libxfce4windowing from using libwnck directly:

Info

TabSwitcher

To facilitate tab switcher port and cleanup, considerable amounts of the code was gutted or rewritten, for example wm no longer does any sort of cur_tabs tracking. That is left up to TabSwitcher.

Instead of rebuilding tabswitcher contents every single time we invoke it, we allow it to handle its own state and handle changes based on libxfce4windowing events. Windows are added / removed automatically, workspace handling is done to support show-all-windows function and workspace swapping, and we leverage sort with our recency list and filter to know when to hide items.

Show Desktop applet

This code implements feature parity with Show Desktop without separately recording any window states. Instead, we just increment over all our stacked windows on the screen and set the minimization state for each window based off the widget toggled state, which gets updated on the screen window_opened and window state changed events.

Workspaces Applet

Nothing really special to note here about the port. I will however highlight a known issue with Workspace Applet port, which is that windows may not report correct icon. While this is corrected in TabSwitcher with use of AppSystem, I'm going to refrain from duplicating this code into the Workspace applet as I have to then address some issues with AppSystem instantiation triggering segfaults that may otherwise not exist once we centralize it with @EbonJaeger's Windowing namespace / class in his IconTasklist branch, and don't think it's worth adding in more code that'll need to be cleaned up for what is effectively an issue end users won't experience in final release all consumers of similar logic will have been cleaned up by then.


Testing Notes

Be sure to reboot to ensure you are using correct budgie-wm, budgie-daemon, budgie-panel.

JoshStrobl commented 10 months ago

@EbonJaeger I addressed your feedback on the idea of sub-classing GtkFlowBoxChild in b08f5fe :+1: Ready for another round of feedback! :grin:

JoshStrobl commented 10 months ago

Known issue with Workspace Applet port: Windows may not report correct icon. While this is corrected in TabSwitcher with use of AppSysstem, I'm going to refrain from duplicating this code into the Workspace applet as I have to then address some issues with AppSystem instantiation triggering segfaults that may otherwise not exist once we centralize it with @EbonJaeger's Windowing namespace / class in his IconTasklist branch, and don't think it's worth adding in more code that'll need to be cleaned up for what is effectively an issue end users won't experience in final release all consumers of similar logic will have been cleaned up by then.

Going to add this to OP as well.