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

[X11] Detect XWayland and disable screen capture support. #93072

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jun 12, 2024

  • Adds XWayland detection.
  • Adds X error handler for capture methods.

Calling XGetImage on XWayland either cause error spam, or crash app, or crash the whole Wayland session.

Fixes #91632
Fixes #88550, at least when running in single window mode (will use app legacy app window color picker), multi window mode is completely unusable on XWayand and was not tested.

@bruvzg bruvzg added this to the 4.3 milestone Jun 12, 2024
@bruvzg bruvzg requested a review from a team as a code owner June 12, 2024 07:10
@akien-mga
Copy link
Member

akien-mga commented Jun 12, 2024

Fixes #88550, at least when running in single window mode (will use app legacy app window color picker), multi window mode is completely unusable on XWayand and was not tested.

Tested on XWayland (Fedora 40 KDE on Wayland) with multi window mode, it seems to fall back to the legacy app window color picker, which seems to be a good compromise.

image

In windowed mode, the background of the window turns black:

image

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Works well and the code seems good.

@akien-mga
Copy link
Member

Tested on Wayland with the Wayland display driver, there it looks a bit better:

image

@akien-mga akien-mga requested a review from Riteo June 12, 2024 07:39
@akien-mga akien-mga merged commit 5e2bdd7 into godotengine:master Jun 12, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI elements stop working under Wayland. Eyedropper color picker not working with XWayland
2 participants