Skip to content

Wayfire backend (based on Marcus' patch) #2314

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Wayfire backend (based on Marcus' patch) #2314

wants to merge 10 commits into from

Conversation

tsujan
Copy link
Member

@tsujan tsujan commented Jul 20, 2025

The credit goes to @marcusbritanicus for writing the core code in #2280.

Known issues that may be fixed later in other PRs:

  1. Wayfire backend #2280 (comment)
  2. I disabled "Move To Next/Previous Monitor" because it didn't work (the error message was that the method "wsets/send-view-to-wset" wasn't found). I also kept its state contingent on LXQtTaskBarBackendAction::Move, which isn't supported by this backend for now.

The credit goes to @marcusbritanicus for writing the core code in #2280.

Known issues that may be fixed later in other PRs:

 1. #2280 (comment)
 2. I disabled "Move To Next/Previous Monitor" because it didn't work (the error message was that the method "wsets/send-view-to-wset" wasn't found). I also kept its state contingent on `LXQtTaskBarBackendAction::Move`, which isn't supported by this backend for now.
@stefonarch
Copy link
Member

Finished one testing round, looks really fine now. Only things I noticed (changing afaik any available setting in taskmanager):

  1. Only on the second monitor: workspace count is off by one, e.g view is on 2, "move to 1" is greyed out, when it's on 3 "move to 2" is greyed out and so on.
  2. Task manager settings: "raise minimized on current desktop" doesn't work (as before)
  3. As mentioned: "move to monitor" used to work fine, disabled now, but showed always only "previous" and never "next".

only 3 items, there have to be more ;)

@tsujan
Copy link
Member Author

tsujan commented Jul 20, 2025

As mentioned: "move to monitor" used to work fine

It didn't here, with this message: Failed to move view to target workspace set: "{\n \"error\": \"No such method found!\",\n \"method\": \"wsets/send-view-to-wset\"\n}\n". So, for now, better safe than sorry.

@tsujan
Copy link
Member Author

tsujan commented Jul 20, 2025

BTW, I may not log into Wayfire soon, because of its new issue (crash on resuming), but will investigate all of your reported issues later. In the meanwhile, you might find more issues, but don't find too many ;)

@tsujan
Copy link
Member Author

tsujan commented Jul 21, 2025

As mentioned: "move to monitor" used to work fine

I made it enabled again. Now it's like before, except that "next" is also enabled. But as I said, it doesn't work here. If it works for you, it may be because of the wayfire version you have. SERIOUS WARNING: Don't upgrade wayfire, or you might not be able to use it with an external monitor anymore!

Only on the second monitor: workspace count is off by one

It was about a miscalculation in the core code and should be fixed now. Please check again.

I'll investigate the remaining issue the next time I feel brave to log into Wayfire ;) For now, back to the safety of kwin_wayland…

@stefonarch
Copy link
Member

stefonarch commented Jul 21, 2025

Workspace count on external monitor is fixed.
Move to next|previous monitor works fine here.

I'll use it now for some time with my user. What I found:

  • my configuration (very old) made pager not working, so started from scratch.
  • vertical workspaces as in niri (grid 1x3) and 3 finger swipe do not change the indicators on the pager, while 3x1 grid is fine ( on both screens). 2x2 and pager with 2 lines is fine too.
  • workspace isn't translated here:
immagine
  • I ignored the warning and I've no issues with wayfire+wlroots0.19 atm

@tsujan
Copy link
Member Author

tsujan commented Jul 21, 2025

Task manager settings: "raise minimized on current desktop" doesn't work (as before)

What about this? I didn't do anything about it.

workspace isn't translated here

No translatable string is added.

EDIT: Oh, yes, one string is added in the core code, without translation! I think translatable strings shouldn't be added to the core code; will deal with it later.

Workspace count on external monitor is fixed.

That was the purpose of the last commit. Thanks for confirming.

Move to next|previous monitor works fine here.

It doesn't here — Wayfire itself is to blame.

EDIT: I think it may have something to do with the cube plugin, which I've enabled. But again, my problem isn't our problem; it's Wayfire's.

@stefonarch
Copy link
Member

stefonarch commented Jul 21, 2025

Task manager settings: "raise minimized on current desktop" doesn't work (as before)

that is still broken. Another issue are doubled buttons on the taskbar, usually for firefox or thunderbird at login. And some greyish overlay color is added to screenshots here...
immagine

New default config, with only small changes, cube is enabled. But I suspect older configs can create issues.

But a really nice achievement overall @marcusbritanicus @tsujan !

@tsujan
Copy link
Member Author

tsujan commented Jul 21, 2025

that is still broken.

Good to know. I don't like magic.

Another issue are doubled buttons

Some views may not be removed correctly in the core code. But since I can't reproduce it, we might have a long series of Q&A about it.

@stefonarch
Copy link
Member

Another issue are doubled buttons

Some views may not be removed correctly in the core code. But since I can't reproduce it, we might have a long series of Q&A about it.

It's at login only, I think some race

@stefonarch stefonarch moved this to In progress in LXQt 2.3 Release Jul 22, 2025
@stefonarch stefonarch moved this to In Progress in Wayland Support Jul 22, 2025
@stefonarch
Copy link
Member

stefonarch commented Jul 22, 2025

There's an inconsistency in workspace/desktop:We could rename all "Desktop" to "Workspace" here:
screenshot-6cc999fe

Edit: Under x11 it's overall "desktop" and we use it everywhere ("desktop switcher" and so on). So better use "Desktop x" in source here instead of "Workspace x".. or we change all occurrencies....

@tsujan
Copy link
Member Author

tsujan commented Jul 22, 2025

That "Workspace" shouldn't exist in the core code, and I'll remove it. We translate "Desktop &%1" in the front-end code.

@isf63
Copy link
Contributor

isf63 commented Jul 22, 2025

Just an uniformed question: does Wayfire add protocols beyond Wayland plus wlroots? I had concern with WL protocols being a never-ending process, but it seems that there is basically a lot of convergence.

From what I remember WL backends are fast to compile. Maybe I'm overestimating the complexity of WL by being so used to X11.

@stefonarch
Copy link
Member

stefonarch commented Jul 22, 2025

It looks they have 3 custom protocols, probably for their own shell (wf-shell). I've to see why the screenshots with screengrab include the overlay color...

immagine

with grim&slurp:
immagine

@tsujan
Copy link
Member Author

tsujan commented Jul 22, 2025

does Wayfire add protocols beyond Wayland plus wlroots?

Each backend has its own code but it brings no extra dependency. The wlroots backend is generic and can be used with many Wayland compositors. The backend is automatically selected by the code, but it can be enforced by the user too.

I've to see why the screenshots with screengrab include the overlay color...

Blame Wayfire. You don't have the problem of moving to next/previous desktop, and I don't have the problem of overlay rectangle :P

@tsujan
Copy link
Member Author

tsujan commented Jul 22, 2025

@stefonarch
Fixed the translatable string and raising minimized on current desktop. Please check them.

I'm not sure that the issue about vertical workspaces is in our code but will investigate it later.

EDIT: BTW, the panel crashed on one occasion after I changed the setting for raising on current desktop, but the backtrace showed that the crash wasn't caused by lxqt-panel itself.

EDIT1: Oh, I forgot the issue about double task buttons. So, 2 issues have remained.

@stefonarch
Copy link
Member

Ok, maybe we have a hint, now the icons are 3 not 2 anymore at login :)
immagine

"Raise on current desktop" is working now.
I think the grid thing (2x2 working, 1x3) not is in the IPC part but that's a wild guess. Will test more layouts.

@tsujan
Copy link
Member Author

tsujan commented Jul 22, 2025

Starting Q&A: What are the titles of those redundant task buttons and also that of the correct one?

@tsujan
Copy link
Member Author

tsujan commented Jul 22, 2025

I added a safeguard against invalid windows now. Does it make a difference?

@stefonarch
Copy link
Member

stefonarch commented Jul 22, 2025

No, I got 3 thunderbirds now.
But I tracked it down: it's the window rules and that's why on my testuser no doubled icon can be seen. I cleared all now and have none, readded some and now telegram has 2 icons...

@tsujan
Copy link
Member Author

tsujan commented Jul 22, 2025

OK, in that case, I can do nothing about it.

As for the 3-finger swipe, does it happen without swiping, e.g., by using shortcut?

@tsujan
Copy link
Member Author

tsujan commented Jul 22, 2025

You didn't answer my question about the titles of the repeated task-buttons.

@stefonarch
Copy link
Member

stefonarch commented Jul 22, 2025

You didn't answer my question about the titles of the repeated task-buttons.

You didn't watch the video?

Oh, it wasn't posted for some reason... inizio=start

icons.mp4

@tsujan
Copy link
Member Author

tsujan commented Jul 22, 2025

OK, good progress for one day. I think we're near the point where Wayfire issues start.

@tsujan
Copy link
Member Author

tsujan commented Jul 22, 2025

The issue about column workspaces should be fixed now.

… if raising on current desktop isn't chosen.
@tsujan
Copy link
Member Author

tsujan commented Jul 23, 2025

I also found and fixed another issue:

When raising a minimized window on another desktop (by clicking its task button), and provided that minimized windows weren't supposed to be raised on the current desktop, Wayfire didn't switch to the desktop of the window, although it announced that the window was focused. This behavior was not only counter-intuitive (how can a focused window be on another desktop?!) but also a usability issue and could result in two checked task buttons.

@stefonarch
Copy link
Member

Confirmed, both fixed. I noticed that last issue but couldn't nail it down.
I tried master panel and on the general wlroots backend there are no doubled icons.

My testuser collected some coredumps but probably it was wayfire crashing (repeatable with ctrl+win+left and ctrl+down) and taking the panel down, they come in couples.

#0  0x000073e413940f10 in QWidget::screen() const () at /usr/lib/libQt6Widgets.so.6
#1  0x00005d166bd52260 in ??? ()
#2  0x00005d166bd468fa in ??? ()
#3  0x00005d166bd48b0c in ??? ()
#4  0x00005d166bcf19d5 in ??? ()
#5  0x00005d166bcf2ab4 in Plugin::loadLib(ILXQtPanelPluginLibrary const*) ()
#6  0x00005d166bcf7859 in Plugin::Plugin(LXQt::PluginInfo const&, LXQt::Settings*, QString const&, LXQtPanel*) ()
#7  0x00005d166bcd9dee in ??? ()
#8  0x00005d166bcdb764 in LXQtPanel::loadPlugins() ()
#9  0x00005d166bcdc914 in LXQtPanel::LXQtPanel(QString const&, LXQt::Settings*, QWidget*) ()
#10 0x00005d166bcee69a in ??? ()
#11 0x00005d166bcef82f in ??? ()
#12 0x00005d166bcce36d in ??? ()
#13 0x000073e4120376b5 in ??? () at /usr/lib/libc.so.6
#14 0x000073e412037769 in __libc_start_main () at /usr/lib/libc.so.6
#15 0x00005d166bcce9f5 in _start ()

@tsujan
Copy link
Member Author

tsujan commented Jul 23, 2025

probably it was wayfire crashing

Yes, that or problems Wayfire currently has with wlroots-0.19, which can be the same thing.

@tsujan
Copy link
Member Author

tsujan commented Jul 23, 2025

Auto-hiding on overlapping was possible by completing the method LXQtTaskbarWayfireBackend::isAreaOverlapped; I made it work. With it, I'm motivated to stay longer in Wayfire and test this PR more.

@stefonarch
Copy link
Member

Afaik that's only in kwin possible until now no?

@tsujan
Copy link
Member Author

tsujan commented Jul 23, 2025

Yes. Wayfire will have the best support after kwin_wayland.

@tsujan
Copy link
Member Author

tsujan commented Jul 23, 2025

BTW, Wayfire's built-in show-desktop isn't practical — for example, all windows are restored on opening a new window or switching desktop. It's possible to make it work like in wlroots and kwin_wayland backends, but I prefer not to change it in this PR.

@marcusbritanicus
Copy link
Contributor

all windows are restored on opening a new window or switching desktop.

This is how Plasma also works. Show desktop should be better called as "Preview Desktop" or "Desktop Peek" - it's not and should not be a minimize-all function.

Here is the problem: when you are previewing the desktop, if a new window opens, and the rest remain minimized, the question then arises, when should they be restored? You might say when the user clicks the button again. In such a case, consider this: what happens if user has opened 5 more windows, and then presses the "Show Desktop" button hoping that desktop will be shown and the previously opened windows show up, and some other windows grabs the keyboard?

These issues will also persist when we switch desktops. The current behaviour is to avoid all these potentially complicated cases.

@isf63
Copy link
Contributor

isf63 commented Jul 24, 2025

Can confirm this is the behavior of kwin_x11 and kwin_wayland. It is annoying to me, "minimize all" is simpler than "preview desktop" IMO.

@stefonarch
Copy link
Member

I noticed that the double or triple icons not only happen at every login, but also sometimes after poweroff displays, usually thunderbird.

@tsujan
Copy link
Member Author

tsujan commented Jul 24, 2025

the question then arises, when should they be restored?

When show-desktop is pressed again, unless the user restores some of them himself.

The user may show desktop to work only with it and another window that he opens afterward. Restoring previous windows on opening another window will ruin everything. After all, he only opens a window!

… hoping that desktop will be shown…

Then he'll realize that he showed desktop before and could press show-desktop button once more. Not a real problem.

@tsujan
Copy link
Member Author

tsujan commented Jul 24, 2025

Anyway, I won't touch Wayfire's show-desktop method in this PR.

@tsujan
Copy link
Member Author

tsujan commented Jul 25, 2025

I thinks this PR is ready to be merged. @stefonarch, what do you think? If you approve, I'll merge it tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants