Bug 158994 - Update notification bubble at wrong position (Wayland)
Summary: Update notification bubble at wrong position (Wayland)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Wayland KDE, KF5 GTK3 Updates
  Show dependency treegraph
 
Reported: 2024-01-03 02:58 UTC by Dan Dascalescu
Modified: 2025-02-10 07:52 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot (320.32 KB, image/png)
2024-01-03 02:58 UTC, Dan Dascalescu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Dascalescu 2024-01-03 02:58:53 UTC
Created attachment 191721 [details]
screenshot

The "LibreOffice update available" notification appears as some sort of a tooltip in the middle of the screen, without controls to hide or move it. It also appears to be stealing focus.

I expected it to appear as a toast, or some other UI affordance with clear close/dismiss controls.
Comment 1 Stéphane Guillou (stragu) 2024-01-20 00:39:44 UTC
Thanks for the report.
Can you please paste here the version info copied from Help > About LibreOffice?
This might be the same issue as reported in bug 157521.
Comment 2 Dan Dascalescu 2024-01-20 13:13:00 UTC
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
Comment 3 QA Administrators 2024-01-21 03:14:08 UTC Comment hidden (obsolete)
Comment 4 Stéphane Guillou (stragu) 2024-01-25 06:36:27 UTC
Please paste here the full information copied from Help > About LibreOffice (there's a button to copy it).
Thank you!
Comment 5 Dan Dascalescu 2024-01-25 20:40:18 UTC
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 20; OS: Linux 6.6; UI render: default; VCL: kf5 (cairo+wayland)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 Stéphane Guillou (stragu) 2024-01-26 04:49:52 UTC
(Please don't set you own reports to "new", this is a task for a second contributor to confirm the issue on their end.)

Thanks for the version info.

I was able to reproduce it as well with:

Version: 7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+wayland)
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Although the bubble was placed over the left third of the toolbars.

Not reproduced with kf5 (cairo+xcb): the bubble at the correct position, pointing to the top right corner of the window (although there is no icon that denotes an update is available).

Let's keep bug 157521 separated, as this is kf5 + Wayland-specific.
Comment 7 Michael Weghorn 2025-02-08 12:13:14 UTC
The current approach of using a standalone window (class BubbleWindow, declared in vcl/inc/bubblewindow.hxx ) doesn't work on Wayland, because it's not possible to position a window at an arbitrary location there.
As a consequence, the window simply shows up at the centre of the existing LO window. For gtk3, it additionally looks very odd and has a window frame.

Screenshots:
* gtk3: attachment 199068 [details] from bug 157521
* kf5: attachment 199069 [details] from bug 157521

I think a different approach is needed (at least for these 2 VCL plugins). Some potential approaches might be:

* replace both, the button in the menubar and the "bubble window" by a completely different solution (e.g. an info bar or a dialog, but that might be more disruptive than the current solution - at least if it works correctly)
* Leave the button in the menubar and show the text in a tooltip for that button instead of the custom "bubble window".

CC'ing the UX team, as this can't be fixed without a redesign, IIUC.


Following are sample steps to reproduce.

# Prerequisites:

* Wayland session on Linux
* an official TDF build of LibreOffice (that has the update check enabled, e.g. 25.2.0 downloaded from the TDF website)

# Sammple steps to reproduce:

1) download the LanguageTool extension [1], version 6.3 (not the latest version!), direct link: [2]
2) start LibreOffice
3) install the extension: "Tools" -> "Extension" -> "Add", select the file downloaded in step 1, select "Only for me"
4) restart LibreOffice, open Writer
5) wait until a notification shows up that extension updates are available (takes ~30 seconds in my setup)

# Actual result:

* A button shows up in the menu bar (OK)
* a "bubble" shows up with this message: "Updates for extensions are available. Click the icon for more information."
* That bubble is misplaced, in the middle of the LibreOffice window

Screenshots will be attached.

# Expected result:

The bubble should be located right below the menubar button, pointing to it because that button is the "icon" that should be clicked to get more information.

# More information

It works fine with the "gen" VCL plugin (which runs on XWayland, not native Wayland)


Version: 25.2.0.3 (X86_64) / LibreOffice Community
Build ID: e1cf4a87eb02d755bce1a01209907ea5ddc8f069
CPU threads: 32; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: CL threaded

Version: 25.2.0.3 (X86_64) / LibreOffice Community
Build ID: e1cf4a87eb02d755bce1a01209907ea5ddc8f069
CPU threads: 32; OS: Linux 6.12; UI render: default; VCL: kf5 (cairo+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: CL threaded


[1] https://extensions.libreoffice.org/en/extensions/show/languagetool
[2] https://extensions.libreoffice.org/assets/downloads/3710/1697301266/LanguageTool-6.3.oxt
Comment 8 Michael Weghorn 2025-02-08 12:57:10 UTC
(In reply to Michael Weghorn from comment #7)
> # Sammple steps to reproduce:
> 
> 1) download the LanguageTool extension [1], version 6.3 (not the latest
> version!), direct link: [2]
> 2) start LibreOffice
> 3) install the extension: "Tools" -> "Extension" -> "Add", select the file
> downloaded in step 1, select "Only for me"
> 4) restart LibreOffice, open Writer
> 5) wait until a notification shows up that extension updates are available
> (takes ~30 seconds in my setup)

Alternatively, for a development build:

1) apply demo change https://gerrit.libreoffice.org/c/core/+/106922 (in order for the update notification to show up without any further preconditions)
2) build with autogen options `--enable-online-update --with-privacy-policy-url=https://www.example.org/privacy.html`
3) start Writer and wait until the notification shows up (~15-30 seconds)

(Tested with master as of 74a1f82aebdd9cc05244f7313ff4d06261f3087a + the above-mentioned Gerrit change)
Comment 9 Buovjaga 2025-02-08 18:45:20 UTC
(In reply to Michael Weghorn from comment #7)
> The current approach of using a standalone window (class BubbleWindow,
> declared in vcl/inc/bubblewindow.hxx ) doesn't work on Wayland, because it's
> not possible to position a window at an arbitrary location there.

It seems ratifying and implementing this protocol would solve it, right? https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/264
Comment 10 Michael Weghorn 2025-02-08 20:49:31 UTC
(In reply to Buovjaga from comment #9)
> It seems ratifying and implementing this protocol would solve it, right?
> https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/264

Yes, from how I understand it.

I think the question whether a different approach for the update notification makes more sense is still valid in any case, also discussed in tdf#138392.
Comment 11 Heiko Tietze 2025-02-10 07:52:58 UTC
(In reply to Michael Weghorn from comment #7)
> * replace both, the button in the menubar and the "bubble window" by ... an info bar

I don't see a reason why the update info should be presented other than via the infobar. It is an "actionable information" and the bubble some kind of "contextual tip". The only question to me is what kind of infobar it should be: blue=info, yellow=warning, red=danger, or green=success. Perhaps depending on the age of the installed version.