Closed marcusbritanicus closed 3 months ago
Great job!
I can test it only under labwc, wayfire and kwin_wayland — and currently I'm using it under labwc. It works as well as your previous PR here.
The rest of this comment isn't related to the whole work but three specific issues that I encountered with both old and new PRs. I emphasize that I'm talking about lxqt-panel under labwc.
First, when I minimize a single window by pressing its minimize button, its task button remains activated. I "fixed" that by adding m_pendingState.activated = false;
to case ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_STATE_MINIMIZED:
inside LXQtTaskbarWlrootsWindow::zwlr_foreign_toplevel_handle_v1_state
.
Second, unlike in KWin, under labwc we have two separate task buttons for a window and its child dialog. That causes some inconsistensies. For example, if a single window and its child dialog is opened, opening a second window will correctly make their task buttons inactive, but if the second window disappears, the task button of the child dialog of the first window might not be activated, i.e., we might have the logically impossible case of an active window with no active task button.
I "fixed" the second problem by removing QHash<WId, WId> transients;
and its related codes. In other words, I removed the concept of "transiency".
There is also an issue about multiple activated task buttons. I circumvented it by a workaround in most cases, but there are still rare cases of it. Sorry, I forgot how I reproduced it in the first place.
As colorpicker plugin doesn't work yet I'd say to leave this for a separate PR.
Oh, certainly! Even if it worked, it should be moved to a separate PR.
If the changes to colorpicker are reversed, we could merge this. Then, fixes and other probable changes could be made in separate PRs.
@stefonarch, @marcusbritanicus, @gfgit Do you agree with a single merge, or do you prefer three separate commits for https://github.com/lxqt/lxqt-panel/pull/2043, https://github.com/lxqt/lxqt-panel/pull/2075 and a rebased version of this PR?
Do you agree with a single merge, or do you prefer three separate commits ....
I'm fine with everything, maybe easier to just merge this. Anyway - a nice piece of work of you both!
It's fine either way
I am fine either way, as well.
I noticed only now that "minimize-restore" is broken here on all wayland compositors. I was quite sure I saw it working though. It minimizes but doesn't restore,
I noticed only now that "minimize-restore" is broken here on all wayland compositors.
I see no problem in labwc.
@marcusbritanicus Now that there's no objection to a single merge, would you please remove the changes to colorpicker and rebase to the current master?
@tsujan Please check if I have done it correctly.
Edit: After struggling with it a couple of minutes, I just copied the contents of colorpicker.cpp/colorpicker.h from lxqt-panel/master and committed those changes.
I noticed only now that "minimize-restore" is broken here on all wayland compositors.
I see no problem in labwc.
Sure? I mean the item in the button menu in the taskbar. I rechecked the several packages I've and in wlroots it's working only in the very first package "wlroots-taskbar", while in kwin there are some more versions where it's working.
I just tested with both Wayfire and labwc. I have noticed problems on both.
I just tested with both Wayfire and labwc. I have noticed problems on both.
The problem @stefonarch described? Why don't I see it here then?!
EDIT: There's a small possibility that one of my personal workarounds has "fixed" it (→ https://github.com/lxqt/lxqt-panel/pull/2088#issuecomment-2310831103)
@tsujan Please check if I have done it correctly.
I will. Thanks!
Let's not complicate it more than it is. I'm going to merge this, and if it changes anything that it shouldn't touch in the master branch, I'll fix that as soon as possible. Then problems in the new features could be reported and fixed in separate PRs.
Any objection?
OK, I did my checks. Everything is fine: the master branch isn't touched where it shouldn't :)
@gfgit, @marcusbritanicus, @stefonarch Thank you so much for doing the hard jobs of coding and testing!
Now we can proceed on a solid basis, fix the issues in the new features, and probably add more features. I hope more git users will test it under Wayland.
Requires
2075
2043
New Features
Two new features have been implemented (a) backend chooser (b) wlroots plugin
Backend chooser
Based on
XDG_CURRENT_DESKTOP
andXDG_SESSION_TYPE
decides the best plugin to use. The selection is done based on the backend score returned by each plugin. If the user has a preference for particular plugin for a particular compositor, that needs to be defined in panel.conf, under[General]
asNotes:
wfipc
plugin is not loadable/does not exist, the panel will attempt to load a suitable plugin (Log entry will be made).<platform>:<plugin>
, the panel searches forlibwmbackend_<plugin>.so
file inLXQTPANEL_PLUGIN_PATH
. If the filename is different, specify the name only:<platform>:libmy_amazing_plugin.so
wlroots backend
This is the plugin for all compositors that support wlr_foreign_toplevel_management protocol. The backend score for
<platform> == wlroots
is 50, where as, the backend score for all platforms that support this protocol (wayfire, sway, hyprland, labwc and river) is 30. The reason for lowered score is so that platform-specific plugins can be developed for these, which provide a much better support. Currently, wlroot backend supports the following "features":Both wayland and wlroots do not provide native (via protocols) support for workspaces.