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

Allow configuring LSM to setup wayland screen name via WAYLAND_DISPLAY_LSM #3

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

Conversation

ericblade
Copy link

@ericblade ericblade commented Mar 15, 2024

  • This allows using Wayland as luna-surfacemanager's output, so lsm becomes a forwarding or nested compositor.

    You can set

XDG_RUNTIME_DIR=/path/to/output-compositor/xdg/run 
WAYLAND_DISPLAY="wayland-0" # name of display on output compositor 
WAYLAND_DISPLAY_LSM="wayland-1" # name of display for LSM apps 
WEBOS_COMPOSITOR_PLATFORM=wayland 

... then run surface-manager, and surface-manager's output will appear in the host wayland compositor. webOS apps will need to have WAYLAND_DISPLAY set to wayland-1 or they will end up directly on the host compositor, instead of inside LSM.

  • Move checkDaemonFiles into constructor, replacing the setSocketName() call, as setSocketName() would default to using WAYLAND_DISPLAY, which would then crash because the host compositor is already using that.
  • Check for null on QGuiApplication::primaryScreen() before calling name(), so that the application will crash with a proper fatal error from Qt when no screens are found

…Y_LSM

- This allows using Wayland as luna-surfacemanager's output, so lsm becomes
  a forwarding or nested compositor.

  You can set
  XDG_RUNTIME_DIR=/path/to/output-compositor/xdg/run
  WAYLAND_DISPLAY="wayland-0" # name of display on output compositor
  WAYLAND_DISPLAY_LSM="wayland-1" # name of display for LSM apps
  WEBOS_COMPOSITOR_PLATFORM=wayland
  ... then run surface-manager, and surface-manager's output will appear
  in the host wayland compositor.
  webOS apps will need to have WAYLAND_DISPLAY set to wayland-1 or they
  will end up directly on the host compositor, instead of inside LSM.

- Move checkDaemonFiles into constructor, replacing the setSocketName()
  call, as setSocketName() would default to using WAYLAND_DISPLAY, which
  would then crash because the host compositor is already using that.
- Check for null on QGuiApplication::primaryScreen() before calling name(),
  so that the application will crash with a proper fatal error from Qt when
  no screens are found
@CLAassistant
Copy link

CLAassistant commented Mar 15, 2024

CLA assistant check
All committers have signed the CLA.

@ericblade ericblade marked this pull request as draft March 15, 2024 17:23
@ericblade
Copy link
Author

Switching this to draft, as although I had it working in a test build, once I built a complete image, it no longer worked, so I'm not sure if I messed up something in this patch or if i'm missing some other piece of what I built (I think it's hardware driver related, but i'm leaving this patch as draft until i prove that out)

@ericblade ericblade marked this pull request as ready for review March 15, 2024 19:44
@ericblade
Copy link
Author

Confirming that this functions. My issue previously was with some bad mesa configuration selection.

Thank you for your consideration.

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.

2 participants