mimbrero / whatsapp-desktop-linux

Unofficial WhatsApp Linux client built with Electron.
https://flathub.org/apps/details/io.github.mimbrero.WhatsAppDesktop
MIT License
78 stars 20 forks source link

Wayland support? #56

Open jr1991-g opened 4 months ago

jr1991-g commented 4 months ago

Hey. Been using this since it was released. Enabling Wayland socket on Flatseal and running the application with flatpak run io.github.mimbrero.WhatsAppDesktop --enable-features=UseOzonePlatform --ozone-platform=wayland makes it run on Wayland fine, except for these two noticeable bugs.

  1. No window decoration (might be gnome known CSD policy, don't if KDE handles this better) and naturally no resizing.
  2. Minimizing and restoring from tray completely crash the application. This is what the console says.
    flatpak run io.github.mimbrero.WhatsAppDesktop --enable-features=UseOzonePlatform --ozone-platform=wayland
    [3:0215/155108.936036:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No existe el fichero o el directorio
    [3:0215/155108.936222:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No existe el fichero o el directorio
    [50:0215/155109.057605:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is egl, ANGLE is 
    [3:0215/155340.010884:ERROR:wayland_event_watcher.cc(36)] libwayland: wl_surface@32: error 0: gtk_shell::get_gtk_surface already requested
    /app/bin/whatsapp-desktop-linux: línea 3:     3 `trap' para punto de parada/seguimiento (`core' generado) zypak-wrapper.sh /app/whatsapp-desktop-linux/whatsapp-desktop-linux "$@"

    Now that Wayland is getting to be the default session in prominent distros and DE, it could be a good idea to patch this application to fully support Wayland. Is it possible to do this? Would it require a new electron version? I apologize if I sound unpolite or demanding, my english is a bit rough.

Thanks

mirenradia commented 4 months ago

FWIW, I don't have either bug on KDE Plasma 5.27.10 when running under Wayland (using the same flags and enabling the Wayland socket using Flatseal).

azvyae commented 3 months ago

Running on wayland works, but it crashes after i hid the app then tried to show the app through the appindicator.

Edit: After some troubleshootings, I found out that the crash happened because of duplicate request? Of the GTK window, i'm not really sure:

/usr/bin/flatpak run --branch=stable --socket=wayland --arch=x86_64 --command=whatsapp-desktop-linux io.github.mimbrero.WhatsAppDesktop --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer --ozone-platform-hint=auto --use-tray-icon
[3:0406/234201.343462:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Tidak ada berkas atau direktori seperti itu
[3:0406/234201.343499:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Tidak ada berkas atau direktori seperti itu
[45:0406/234201.370523:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is egl, ANGLE is 
[3:0406/234211.760259:ERROR:wayland_event_watcher.cc(36)] libwayland: wl_surface@35: error 0: gtk_shell::get_gtk_surface already requested

/app/bin/whatsapp-desktop-linux: baris 3:     3 Jejak/titik-putus jebakan (core didump) zypak-wrapper.sh /app/whatsapp-desktop-linux/whatsapp-desktop-linux "$@

The core problem exist because of get_gtk_surface function.

Solution:

Nevermind, i just updated the electron version to the minimum version of 23, and the problem is vanished, and also fully supported for wayland (in terms of using proper window decoration)