Skip to content

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

Open
ericblade wants to merge 2 commits into
webosose:masterfrom
ericblade:dev
Open

Allow configuring LSM to setup wayland screen name via WAYLAND_DISPLAY_LSM#3
ericblade wants to merge 2 commits into
webosose:masterfrom
ericblade:dev

Conversation

@ericblade

@ericblade ericblade commented Mar 15, 2024

Copy link
Copy Markdown
  • 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

CLAassistant commented Mar 15, 2024

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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