deltachat / deltachat-desktop

Email-based instant messaging for Desktop.
GNU General Public License v3.0
947 stars 169 forks source link

clicking deltachat icon in swaybar's system tray offers inconsistent behavior (and can crash app) #3989

Open dkg opened 5 months ago

dkg commented 5 months ago

I'm running deltachat-desktop under sway, with no Xwayland or X11 support on the system at all. I've launched deltachat by using electron's (chromium's) ozone backend for wayland:

deltachat-desktop --ozone-platform=wayland

When delta first starts up, it is only rendered as an icon in the system tray section of swaybar. If i click that icon, the full deltachat interface appears.

If i click it again, the deltachat interface disappears.

But if i click it a third time, deltachat closes entirely (the app appears to crash), emitting the following message to stdout or stderr:

[3179:0628/212044.664566:FATAL:wayland_toplevel_window.cc(1123)] Should not be called with kMinimized state
Trace/breakpoint trap

When the app is running but minimized, right-clicking the icon in the system tray creates a menu with three items:

if i choose "Open DeltaChat", that also causes the crash described above. "Quit" appears to close the app cleanly.

Note that the menu doesn't interact well with sway -- it wants to consume the entire screen, and it doesn't share the screen at all well with the main app itself.

I'm happy to test or diagnose things if that would be useful.

farooqkz commented 4 months ago

As a workaround for this issue, use DeltaChat with Xwayland. I've been using it for sometime and it's fine.

hpk42 commented 4 months ago

Well, dkg was describing a system setup that explicitely not uses wayland so recommending to use wayland does not help much i am afraid.

On Mon, Jul 01, 2024 at 05:23 -0700, Farooq Karimi Zadeh wrote:

As a workaround for this issue, use DeltaChat with Xwayland. I've been using it for sometime and it's fine.

-- Reply to this email directly or view it on GitHub: https://github.com/deltachat/deltachat-desktop/issues/3989#issuecomment-2200004161 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

farooqkz commented 4 months ago

@Simon-Laux There are other reports which specificly target wayland on my side. Any on your side?

farooqkz commented 4 months ago

Well, dkg was describing a system setup that explicitely not uses wayland so recommending to use wayland does not help much i am afraid. On Mon, Jul 01, 2024 at 05:23 -0700, Farooq Karimi Zadeh wrote: As a workaround for this issue, use DeltaChat with Xwayland. I've been using it for sometime and it's fine. -- Reply to this email directly or view it on GitHub: #3989 (comment) You are receiving this because you are subscribed to this thread. Message ID: @.***>

The issue is with wayland. @dkg is already using sway which indicates he is using wayland as well. The problem's with native wayland support on Electron probably. What I suggested is a temporary workaround, using xwayland, till Electron is fixed or we fix it somehow.

farooqkz commented 4 months ago

BTW the user mentioning problems on wayland is @BehdaniSohrab. mentioning him with the hope to get more feedback on wayland related issues.

behdanisohrab commented 4 months ago

BTW the user mentioning problems on wayland is @behdanisohrab. mentioning him with the hope to get more feedback on wayland related issues.

Most of the wayland issues on electron application is caused by chromium engine inside of it.

easiest way for enabling wayland support is by adding

--enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto

to the desktop file or in front of appimage file.

i would provide more information for this problem later.

dkg commented 1 week ago

yes, i'm using wayland. no, i'm not going to run XWayland on this system, for other reasons unrelated to DeltaChat. as i said in the first message, i'm launching it with --ozone-platform=wayland specifically to use the wayland backend for electron.

With deltachat desktop 1.48.0, i've tested and the same error described here is still happening, along with the same message to stderr on the third click:

[1564:1115/082245.505552:FATAL:wayland_toplevel_window.cc(1113)] Should not be called with kMinimized state
dkg commented 1 week ago

btw, i've also trid running with --enable-features=WaylandWindowDecorations as recommended by @behdanisohrab but it seems to have no effect on the behavior i'm seeing.