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

fix for window not being shown with wayland in same cases by switching to the 'did-finish-load' event instead of 'ready-to-show' #7078

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alangecker
Copy link

@alangecker alangecker commented Nov 10, 2024

First time contributor checklist:

Contributor checklist:

  • My contribution is not related to translations.
  • My commits are in nice logical chunks with good commit messages
  • My changes are rebased on the latest main branch
  • A npm run ready run passes successfully (more about tests here)
  • My changes are ready to be shipped to users

related issues:

Description

on some setups signal is never shown due to electrons ready-to-show event is not firing.

I've found that people use did-finish-load instead due to (probably) this bug (electron/electron#25253 (comment)).

After a deep rabbit hole into electron and the chromium source code I could not determine why this event is not fired, but both events should be more or less equal from their timing in our case, so it is a workaround, but can be used permanently.

https://www.electronjs.org/docs/latest/api/browser-window

Using the ready-to-show event

This event is usually emitted after the did-finish-load event, but for pages with many remote resources, it may be emitted before the did-finish-load event.

setup with which I could reproduce the issue and verify the fix

  • latest main (git checkout v7.35.0-alpha.1)
  • electron v33.1.0
  • node v20.18.0
  • Sway Desktop (wayland/wlroots-based)
  • ELECTRON_OZONE_PLATFORM_HINT=auto environment variable

… to the 'did-finish-load' event instead of 'ready-to-show'

related issues:
signalapp#6368
signalapp#6740
signalapp#6966
electron/electron#25253 (comment)

After a deep rabbit hole into electron and the chromium source code I could not determine why this event is not fired, but both events should be more or less equal from their timing in our case:

https://www.electronjs.org/docs/latest/api/browser-window
> ### Using the `ready-to-show` event
> This event is usually emitted after the did-finish-load event, but for pages with many remote resources, it may be emitted before the did-finish-load event.
@mbienkowsk
Copy link

would love to see this merged, currently can't launch the app without xwayland where it's pixelated

@trevor-signal trevor-signal self-assigned this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants