-
Notifications
You must be signed in to change notification settings - Fork 22
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
Betterbird not minimize to tray #377
Comments
How is this installed? Minimise to tray on Wayland: Issue #279. |
installed betterbird-bin from aur. minimize to tray was working with 115.18.0-bb36 |
AUR got fixed this morning, better to report their issues at their repo. The minimise to try is a bit of a mystery since there are reports that 115 worked, or didn't work, but mostly not working on Wayland. Run the test from #279 (comment) in Firefox to see that the Mozilla platform fails to deliver the necessary event. |
Thanks a lot |
The original report is from here: |
just restored a snapshot before update to 128.5.0esr-bb18. 115.18.0-bb36 minimize to tray and restores from tray just fine. 115.18.0-bb36 was my last installed and working version until i updated to 128.5.0esr-bb18 last Thursday |
Can you run the JS we indicated in the error console to compare? |
will do. keep you posted |
There is a sizemodechange received in 115.18.0-bb36 while in 128.5.0esr-bb18 there is not |
Thanks for testing. So the million-dollar question is: Why do you get the event in 115, when all the reporters of those other tickets don't? It's even described here https://bugzilla.mozilla.org/show_bug.cgi?id=1872790#c0. OK, they tried FF 121, but apparently it already didn't work in FF 115 ESR and certainly not in BB 115. Have you got any special settings/prefs? Maybe hardware acceleration turned off? Or asking the other way around: Can you make it fail in 115 by turning some screw? |
most settings are default, changed basic stuff like search engine, dictionaries, chat account offline, minimizetotray and startminimized true funny thing is i do get a sizemodechange received in 128.5 when i restore down and back to maximize. in 115 i can change settings all i want, it minimizes to tray no matter what. the only difference i can think of is the window class name but i suppose this has nothing to do with it. |
You're saying: minimise doesn't create the event, but switching from maximised to "normal window" and back does. And switching from minimised to "normal" does what? So maybe this observation is a starting point. Just for your info: minimise to tray works by programmatically hiding the window on the minimise event. Hiding the window also removes the "taskbar button" (in quotes, since the nomenclature varies widely, this is actually Windows-speak). |
nothing...no sizemodechange received
if there is anything more i can do please let me know , i´m happy to help. i guess there will be no ongoing support for 115 anymore? so downgrading would be no option for me? |
115 goes "end of life" in January 2025. We'll prioritise the issue, but
no promises made, since this is all Mozilla platform code (and apparently
they have no interest in fixing it).
|
Please run this binary from the console
Binary: www.betterbird.eu/downloads2/betterbird-128.5.0esr-bb18-resize-debug.en-US.linux-x86_64.tar.bz2 For the record, the code has many "evil" quirks, so hopefully we can work out what it going wrong: As far as I can see, it's the same in 115: |
You've got to read some of the tickets referenced in the Mozilla code: That's all very confusing, to the layman it sounds like they dropped support for iconified/minimised "things" in Wayland, at least for GTK3. |
i get nsWindow::OnWindowStateEvent for 0x7496d103fb60 changed 0x80 new_window_state 0x4 when i minimize from maximize i get nsWindow::OnWindowStateEvent for 0x7496d103fb60 changed 0x80 new_window_state 0x4 when i restore down from maximize |
EDIT: Struck out incorrect statement. The issue is that |
Europe/Berlin |
Sorry, the previous comment wasn't right. We can't fix it. There key is here:
So Wayland does not report "iconified/minimised". And that was my understanding. However, you claim it works in 115. I'll make you a 115 version with debug and we'll see. |
nsWindow::OnWindowStateEvent for 0x71c3ae29a060 changed 0x80 new_window_state 0x84 nsWindow::OnWindowStateEvent for 0x71c3ae29a060 changed 0x1 new_window_state 0x7 minimized to tray is working |
Yes, it is working, as you can see However, you are not running Wayland! - see |
How is this even possible... Do you have any explanation? it minimize to tray, ans as you can see i´m running in wayland mode |
It's not running Wayland. The Mozilla code to detect Wayland hasn't changed in years, and besides, the event doesn't fire when it is really running Wayland. Start BB with This is a bug in Linux, not even the Mozilla folks will be able to implement a workaround. For BB, Linux represents 98% of the problems and 2% of the income, which translates to a total loss 👎. |
You are right. starting with GDK_BACKEND=x11 minimize, starting with GDK_BACKEND=wayland does not Thank you for pointing that out.....mystery solved |
More reading: |
Try this: So the hack is to fire the event when this application button is clicked: It won't work if you use the system's title bar and click the system's minimise button, but it should work if you hide the system title bar and use BB's instead: Please submit the debug output here. Please also test no "minimising to tray" but "minimising to taskbar". |
minimize to tray from fullscreen works pretty nice nsWindow::OnWindowStateEvent for 0x7968eb937660 changed 0x80 new_window_state 0x4 nsWindow::OnWindowStateEvent for 0x7968eb937660 changed 0x1 new_window_state 0x5 minimize to taskbar: nsWindow::OnWindowStateEvent for 0x7968eb937660 changed 0x80 new_window_state 0x4 minimize to tray from "window mode" also works nsWindow::OnWindowStateEvent for 0x786e7c7cdb60 changed 0x80 new_window_state 0x15480 but when i restore into window mode i get:
leaving betterbird to not respond to any inputs |
I don't understand what "window mode" is meant to mean. Getting the window position was part of our hack attempts, so here's a version without that call that wasn't useful: |
by window mode i mean the window has any size other then maximize/fullscreen minimize to tray and taskbar and restore from tray and taskbar works fine as long as the size of the window is maximize startminimized true also works any other window size freezes when restored |
There seems to exist too much confusing nomenclature. So lets settle for one set of nomenclature.
So discarding "fullscreen", we have:
And there are the reverse operations from the minimise state back to maximised or normal.
So what works and what doesn't? I'm not sure that I've interpreted your comments correctly. What I read is that 1-3 work, also 5-6. 7 is the normal operation, that should work, too, or maybe it doesn't since in it's current state (before we applied the tweak), there was never any minimised window since the event never arrived. So I don't know how Mozilla code will react now. So please state the number that work. Anyway, looks like we will have to setup an environment with Wayland to develop and test on. |
Screencast_20241202_182636.mp4
|
Hmm, we have more confusion now. If I read the previous paragraph correctly, all 8 cases work, but restoring from minimised to normal (cases 7. and 8.) cause graphic anomalies. Wow, gotta love Linux and Wayland!! So the little hack that we dispatch the necessary event when the minimise button is clicked, works. I don't understand why case 7. "Minimised (taskbar) -> Normal" would be any different with or without the hack, since when you restore a window to normal that was just minised to to the tray, such effects don't happen. Lastly, saying that all cases work contradicts previous statement: "any other window size freezes when restored". This earlier statement "leaving betterbird to not respond to any inputs" was referring to an earlier binary, but appears to be the same as the first statement we quoted which relates to the latest build. Please clarify. |
Same build as the one you had, but with the debugging output removed: This is the only change we made: I've posted the same binary to Issue #374 and Issue #279 for more feedback. In general, what is the advantage of using Wayland given that it appears to trigger a plethora of bugs in Mozilla code, see: https://bugzilla.mozilla.org/show_bug.cgi?id=635134, there are 114 open bugs linked to this meta-bug. |
i try to be more precise: case 1, 2, 3, 4, 5, 6, 7, 8 works case 8 works with graphical glitches as shown in the video. all buttons are still functional. if i click the mouse offset as shown in the video i can maximize, minimize and close the window. Screencast_20241202_202242.mp4this footage covers all cases |
[Parent 732050, Main Thread] WARNING: gdk_window_get_position: assertion 'GDK_IS_WINDOW (window)' failed: 'glib warning', file /home/betterbird/build128/mozilla-esr128/toolkit/xre/nsSigHandlers.cpp:187 (eu.betterbird.Betterbird:732050): Gdk-CRITICAL **: 20:35:41.752: gdk_window_get_position: assertion 'GDK_IS_WINDOW (window)' failed |
Thanks for the video. So all cases work, and only case 8: "Minimised (no taskbar, tray only) -> Normal" has graphic anomalies. Have you seen the shadow in your video? The buttons actually respond to the shadow position, not the final position, I've drawn a red rectangle where the shadow controls would be: BB code doesn't call So case 8. is the case where BB makes the window visible again before restoring it. And that causes the anomaly. Does the anomaly go away when moving the window, so it's redrawn? |
no, it does not go away when moving the window EDITED to fix quote. |
#279 (comment) states "works just fine". We're not denying the issue, however, there are so many variations in Linux, so a graphic glitch is not a surprise. That said, here's a version that suppresses the faulty call, if we covered the code in question: Please run in the console and report the output. |
console output is:
would it be possible to only allow to restore from tray to maximize? then there would not be graphical glitches even if i restore down from maximize state afterwards |
Thanks for testing. According to the console output, all is working as designed. The GDK error is not issued any more?
That's not really desired since it would take away more than 50% of the use cases, I assume that most people will use a "normal" non-maximised view. We will ship this now-repaired niche feature in the next release and see how many people report errors. As I wrote, the user in the other ticket stated "works just fine". |
Build updated: We're not going to post further updates, just use the latest "latest". |
I'm using EndeavourOS with KDE Plasma 6 and Wayland. Just wanted to come back to Betterbird and installed 128.6.0esr-bb20 from AUR. I also got this issue. I'm not using a maximized window on my 34" monitor. After minimizing to tray and reopen Betterbird from there, I can see the same behavior shown in the video in #377 (comment). I looked for this issue here and am a bit surprised that this issue is closed already ... Is there any fix for this behavior? Or are you on a fix for this? It would be more than great to get this fixed. |
Hello.
after the update to 128.5.0esr-bb18 betterbird no longer minimize to tray, instead minimize to the task bar.
Also instead of the betterbird icon it shows the wayland icon, which i could fix in renaming the desktop file name to "betterbird" in the application settings (window rules)
Operating System: CachyOS Linux
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.12.1-2-cachyos (64-bit)
Graphics Platform: Wayland
The text was updated successfully, but these errors were encountered: