Bug 163176 - Unwanted scroll after the wallpaper of KDE Plasma changes and "Accent Color From Wallpaper" is enabled
Summary: Unwanted scroll after the wallpaper of KDE Plasma changes and "Accent Color F...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-View-Jumps Scrolling-PageUpDown
  Show dependency treegraph
 
Reported: 2024-09-27 08:19 UTC by Huanyu Liu
Modified: 2024-10-16 07:46 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast of the unwanted scroll with gtk3 (6.33 MB, video/mp4)
2024-10-14 11:00 UTC, Huanyu Liu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Huanyu Liu 2024-09-27 08:19:50 UTC
Description:
After the wallpaper of KDE Plasma changes (e.g. using a "Slideshow" wallpaper type), if "Accent Color From Wallpaper" is enabled, and the cursor is outside the screen, then LibreOffice Writer will do an unwanted scroll to make the cursor appear within the screen.

Steps to Reproduce:
1. Make sure you are using (a recent version of) KDE Plasma
2. Go to "System Settings → Colors & Themes → Colors", select "Accent Color From Wallpaper"
3. Go to "System Settings → Wallpaper", select "Slideshow" for wallpaper type
4. Open an arbitrary document with LO Writer, scroll the scrollbar so that the cursor is outside the screen
5. Right-click on the desktop and select "Next Wallpaper Image"

Actual Results:
LO Writer does an unwanted scroll to make the cursor appear within the screen

Expected Results:
LO Writer should leave the scrollbar where it was


Reproducible: Always


User Profile Reset: Yes

Additional Info:
System information:
Operating System: Arch Linux 
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.10.10-arch1-1 (64-bit)
Graphics Platform: Wayland

LO information:
Version: 24.8.1.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 16; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN
24.8.1-2
Calc: threaded

Maybe related to bug 135244
Comment 1 Michael Weghorn 2024-10-14 10:41:58 UTC
I can't reproduce with current development versions of both, LibreOffice and KDE Plasma (displayed as "KDE Plasma 6.3 Dev" on the bottom-right of the desktop), both self-compiled on Debian testing.

Operating System: Debian GNU/Linux 12
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.8.0
Qt Version: 6.7.3
Kernel Version: 6.10.11-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 32 × 13th Gen Intel® Core™ i9-13900HX
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: eee9794a9287fddcabfbdc9e5c4a898e07351b78
CPU threads: 32; OS: Linux 6.10; UI render: default; VCL: qt6 (cairo+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: CL threaded
Comment 2 Michael Weghorn 2024-10-14 10:44:43 UTC
Can you please attach a screencast?

Does this also happen when using the gtk3 VCL plugin, by starting LibreOffice with environment variable SAL_USE_VCLPLUGIN=gtk3 set? (Please double-check: Does "Help" > "About LibreOffice" show "VCL: gtk3" in that case?)
Comment 3 Huanyu Liu 2024-10-14 11:00:40 UTC
Created attachment 197041 [details]
Screencast of the unwanted scroll with gtk3
Comment 4 Huanyu Liu 2024-10-14 11:01:25 UTC
(In reply to Michael Weghorn from comment #2)
> Can you please attach a screencast?
> 
> Does this also happen when using the gtk3 VCL plugin, by starting
> LibreOffice with environment variable SAL_USE_VCLPLUGIN=gtk3 set? (Please
> double-check: Does "Help" > "About LibreOffice" show "VCL: gtk3" in that
> case?)

Yes, this still happens when using the gtk3 VCL plugin. Here is a screencast of the unwanted scroll with gtk3.
Comment 5 Michael Weghorn 2024-10-14 11:54:36 UTC
(In reply to Huanyu Liu from comment #4)
> Yes, this still happens when using the gtk3 VCL plugin. Here is a screencast
> of the unwanted scroll with gtk3.

Thanks. Do you happen to have any IME (input method editor) active, like DBus or Fcitx? If so: Does disabling those make any difference?
Comment 6 Michael Weghorn 2024-10-14 11:56:32 UTC
(In reply to Michael Weghorn from comment #5)
> (In reply to Huanyu Liu from comment #4)
> > Yes, this still happens when using the gtk3 VCL plugin. Here is a screencast
> > of the unwanted scroll with gtk3.
> 
> Thanks. Do you happen to have any IME (input method editor) active, like
> DBus or Fcitx?

I mean *IBus*, not *DBus*...
Comment 7 Huanyu Liu 2024-10-14 14:39:40 UTC
(In reply to Michael Weghorn from comment #5)
> (In reply to Huanyu Liu from comment #4)
> > Yes, this still happens when using the gtk3 VCL plugin. Here is a screencast
> > of the unwanted scroll with gtk3.
> 
> Thanks. Do you happen to have any IME (input method editor) active, like
> DBus or Fcitx? If so: Does disabling those make any difference?

Yes, I am using Fcitx5 through Virtual Keyboard provided by Plasma. After disabling it and a restart, the issue still persists.

In addition to the scroll, the sidebar will also be "reset" after the wallpaper change. For example, when you are viewing "Character Styles" (the 2nd tab) of the "Styles" sidebar, after the wallpaper change, "Paragraph Styles" (the 1st tab) will be force-selected.
Comment 8 Michael Weghorn 2024-10-15 06:03:12 UTC
(In reply to Huanyu Liu from comment #7)
> Yes, I am using Fcitx5 through Virtual Keyboard provided by Plasma. After
> disabling it and a restart, the issue still persists.

If it's unrelated to IME, I'm running out of ideas, given I can't reproduce myself.

As this ticket is currently set as blocking for the Wayland meta bug tdf#100156: Does this also happen when you log into an X11 session instead of a Wayland one?
Comment 9 Huanyu Liu 2024-10-15 13:06:11 UTC
(In reply to Michael Weghorn from comment #8)
> As this ticket is currently set as blocking for the Wayland meta bug
> tdf#100156: Does this also happen when you log into an X11 session instead
> of a Wayland one?

Yes, this happens under both X11 and Wayland.

Good news: After some exploration, I've found some more information!

First, with kf6, the scroll (and the sidebar reset mentioned in comment #7) will happen whenever the accent color *changes*. That means, you can reproduce it by changing a color scheme (System Settings → Colors & Themes → Colors). However, if two color schemes happen to have identical accent colors (e.g. one color scheme is copied from the other one), then the scroll will not happen.

Second, with kf6, if you change the application style (System Settings → Colors & Themes → Application Style), the sidebar reset will happen, but the scroll will not.

Third, with gtk3, the matter a little complicated. It depends on the settings in "System Settings → Colors & Themes → Application Style → Configure GNOME/GTK Application Style... → GTK theme". Currently, I have 3 themes installed: Default, Emacs and Breeze. The issue is only reproducible with the Breeze GTK theme. Furthermore, toggling between Default and Emacs will not trigger the scroll, but toggling between Breeze and either Default or Emacs will trigger the scroll.

Fourth, in LO Writer, after positioning the cursor outside the screen, go to "Tools → Options... → LibreOffice → Application Colors" and try playing with the color settings. If you change the color of something related to Writer (e.g. Document background), then after clicking on "OK" or "Apply", the same scroll will be triggered. If you change the color of something unrelated to Writer (e.g. Grid lines for Spreadsheet), then the scroll will not be triggered.

After all these investigations, I have an idea about the cause of the scroll. By default, all color settings in LO are "Automatic", while some "Automatic" colors are related to the current system color scheme (e.g. Application background is taken from the accent color directly (kf6) or with some tint (gtk3)). Whenever the system color scheme is changed, the fourth point mentioned above will happen, thus triggering the scroll. With kf6, all themes will respect the "Accent color from xxx" settings, so the issue can be reproduced whatever your theme is. However, this is not the case with gtk3. Only those themes which respect the "Accent color from xxx" settings (e.g. Breeze) can reproduce the issue.

By the way, the behavior of automatic "Application background" color in LO seems to be inconsistent when using kf6 and gtk3. kf6 has a rich (untinted) color, while gtk3 has a tinted color. I'm not sure whether this is intentional behavior or a bug...
Comment 10 Michael Weghorn 2024-10-16 07:46:36 UTC
(In reply to Huanyu Liu from comment #9)
> Good news: After some exploration, I've found some more information!

Thanks a lot for the additional analysis.

> First, with kf6, the scroll (and the sidebar reset mentioned in comment #7)
> will happen whenever the accent color *changes*. That means, you can
> reproduce it by changing a color scheme (System Settings → Colors & Themes →
> Colors). However, if two color schemes happen to have identical accent
> colors (e.g. one color scheme is copied from the other one), then the scroll
> will not happen.

Indeed, I can reproduce the view being scrolled to where the cursor is by switching e.g. from Breeze Light to Oxygen (or vice versa).

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 34b95e12a839cbcf4818bbb0b2ce26b85999e856
CPU threads: 32; OS: Linux 6.11; UI render: default; VCL: qt6 (cairo+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded