Skip to content

Rework wayland logic by using ELECTRON_OZONE_PLATFORM_HINT environment variable #607

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

Merged
merged 3 commits into from
Jul 5, 2024

Conversation

xduugu
Copy link
Contributor

@xduugu xduugu commented Feb 13, 2024

No description provided.

@flathubbot
Copy link
Contributor

Started test build 99593

@flathubbot
Copy link
Contributor

Build 99593 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/82384/org.signal.Signal.flatpakref

@flathubbot
Copy link
Contributor

Started test build 99839

@flathubbot
Copy link
Contributor

Started test build 99846

@flathubbot
Copy link
Contributor

Build 99839 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/82634/org.signal.Signal.flatpakref

@flathubbot
Copy link
Contributor

Build 99846 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/82641/org.signal.Signal.flatpakref

@flathubbot
Copy link
Contributor

Started test build 101697

@flathubbot
Copy link
Contributor

Build 101697 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/84486/org.signal.Signal.flatpakref

@flathubbot
Copy link
Contributor

Started test build 103056

@xduugu
Copy link
Contributor Author

xduugu commented Feb 26, 2024

Rebased against master

@flathubbot
Copy link
Contributor

Build 103056 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/85839/org.signal.Signal.flatpakref

@pm4rcin
Copy link
Contributor

pm4rcin commented Jul 3, 2024

@bermeitinger-b it would be great to merge this after rebase since it would allow setting global env variable for flatpak apps that people on wayland could use until chrome enables it by default.

@bermeitinger-b
Copy link
Collaborator

Thanks. Could you rebase again?

I guess that it should also be able to remove both x11 and wayland sockets and use x11 as fallback. We tried this a while back and electron was not working.

@pm4rcin
Copy link
Contributor

pm4rcin commented Jul 4, 2024

If @xduugu won't rebase it for a few days I'll create a PR.

xduugu added 3 commits July 4, 2024 22:08
Window decorations on wayland are enabled by default since electron v28 [1].

[1] electron/electron#39582
This uses the new environment variable `ELECTRON_OZONE_PLATFORM_HINT` [1],
which is available since electron v28 [2].

[1] https://www.electronjs.org/docs/latest/api/environment-variables#electron_ozone_platform_hint-linux
[2] electron/electron#39792
Prefer electron's new environment variable `ELECTRON_OZONE_PLATFORM_HINT`
instead.
@xduugu
Copy link
Contributor Author

xduugu commented Jul 4, 2024

Rebased again, @bermeitinger-b.

@bermeitinger-b
Copy link
Collaborator

bot, build

@flathubbot
Copy link
Contributor

Queued test build for org.signal.Signal.

@flathubbot
Copy link
Contributor

Started test build 132570

@flathubbot
Copy link
Contributor

Build 132570 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/115575/org.signal.Signal.flatpakref

@bermeitinger-b
Copy link
Collaborator

Do we need to expose the variable in the yml file?

@pm4rcin
Copy link
Contributor

pm4rcin commented Jul 5, 2024

Do we need to expose the variable in the yml file?

I don't think so since IMO it's supposed to be global override for all Electron apps by default. If someone changes flatseal permissions he probably understands what he does.

@bermeitinger-b
Copy link
Collaborator

Thank you.

Would have been a good choice to use the beta branch. But let's see what happens.

@bermeitinger-b bermeitinger-b merged commit 11cc6bb into flathub:master Jul 5, 2024
@pm4rcin
Copy link
Contributor

pm4rcin commented Jul 5, 2024

@bermeitinger-b we forgot to try adding fallback-x11 to make linter happy. But someone on X11 would have to test.

@bermeitinger-b
Copy link
Collaborator

We can try another PR for this. X11 never had any problem with any setting. It always was Wayland.

@pm4rcin
Copy link
Contributor

pm4rcin commented Jul 5, 2024

We can try another PR for this. X11 never had any problem with any setting. It always was Wayland.

Good to know, I didn't remember that from a few months ago. I'll create PR soon.

@pm4rcin
Copy link
Contributor

pm4rcin commented Jul 5, 2024

@bermeitinger-b from what I can see it was related to input methods not working with wayland. I've tried checking the upstream electron issue on this and I feel like it's probably not ready yet. There were some successes on Chrome but I don't think it will work with electron. Should we try anyway?

@bermeitinger-b
Copy link
Collaborator

From the past tries, when we made the linter happy, numerous issues with Wayland arose. From my understanding, the fallback to Xwayland let's it run.
I tried in a Fedora VM and could remove the X11 socket, however, this small test might not be sufficient for every case out there.

How about a PR and we'll wait for merging?

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