Skip to content
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

Initial Window Manager backend plugin infrastructure #2075

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

Conversation

gfgit
Copy link
Member

@gfgit gfgit commented Jul 9, 2024

Hello,
This is a possible Window Manager backend managing code and plugin infrastructure.

  • ILXQtTaskbarAbstractBackend becomes ILXQtAbstractWMInterface
  • Every backend is contructed by a ILXQtWMBackendLibrary subclass factory
  • Backends are installed in ${PLUGIN_DIR}/backend folder

We could put CMake code in a macro like it's done for panel plugins

@gfgit gfgit mentioned this pull request Jul 9, 2024
@marcusbritanicus
Copy link
Contributor

I'm copying this comment from #2043 so that it does not get lost.

We want to let user develop an independent plugin for an exotic WM and it will be selected in some way at runtime.

That sounds too ambitious to me, especially because Wayland WMs come and go and there's no guarantee that they're shell-compatible, but if you and @marcusbritanicus could execute this plan with a reasonable amount of code and without extra dependencies, who am I to disagree? ;)

I think Qt first checks QT_QPA_PLATFORM, then it checks XDG_SESSION_TYPE and something else. As far as I have seen, LXQt does not use env vars for most works.

We can use a mix of hard-coded values (majority) and plugin settings.

  • The X11/Wayland detection will be hard-coded.
  • On the wayland side, support form Plasma will be hard coded. The plasma protocol is complete, custom plugins will not add any value.
  • The compositor detection will be hard-coded - we will respect XDG_CURRENT_DESKTOP.
  • For a support compositor, we will load the plugin designed by us.
    For now, the only DE support we can provide is wayfire. Eventually, we might be able to add support for sway and Hyprland as well.
  • If any user wants to use their plugin, they can override it using a setting in the plugins.
TaskBarBackendOverrides = Wayfire:my-wayfire-plugin, Hyprland:some-other-plugin, sway:wlroots, generic:my-wlroots-plugin
  • Fallback will be the generic wlroots plugin, until wayland protocols are ready.

- Fix X11 backend to return zero score on non-X11 platforms
Copy link
Contributor

@marcusbritanicus marcusbritanicus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the first few things I have looked at thus far. I will review a bit more later this week.

PS: I don't think any of my comments are visible. So please ignore this. Sorry for the spam.

@stefonarch
Copy link
Member

Afaik the comments are visible only to the author until "Finish your review" is clicked.

@marcusbritanicus
Copy link
Contributor

I thought so. I had added a few comments, and yesterday I did the "Finish your review" only to notice later that my comments had gone missing. I perhaps did something wrong.

@knm100
Copy link

knm100 commented Aug 13, 2024

Will it be done in September?

If preferred backend is set try it first.
Do not set preferred backend automatically. It must be user choice.
Copy link
Contributor

@marcusbritanicus marcusbritanicus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be my main request. It would be nice if we made this change.

panel/backends/ilxqtabstractwmiface.h Outdated Show resolved Hide resolved
@marcusbritanicus
Copy link
Contributor

Will it be done in September?

@knm100 If you wish to test, you can use this: https://github.com/LXQt-Marcus-Fork/lxqt-panel/tree/wlroots_backend_patched

@knm100
Copy link

knm100 commented Aug 20, 2024

Will it be done in September?

@knm100 If you wish to test, you can use this: https://github.com/LXQt-Marcus-Fork/lxqt-panel/tree/wlroots_backend_patched

Thank you, I will try this branch

- Split XDG_CURRENT_DESKTOP
- Skip LXQTPANEL_PLUGIN_PATH if empty
libwmbackend_<platform>.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants