Bug 139609 - on wheel scroll duplicate scroll events delivered after an opengl transition or video played with gtk3 on X
Summary: on wheel scroll duplicate scroll events delivered after an opengl transition ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+ Master
Hardware: All Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.2.0 target:7.1.1
Keywords:
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2021-01-14 14:14 UTC by Heiko Tietze
Modified: 2021-01-28 00:26 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Impress scrolling problem (2.17 MB, video/mp4)
2021-01-15 00:38 UTC, Muhammad Rivan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2021-01-14 14:14:29 UTC
Sometimes it happens that wheel-scrolling one control makes another scrolling as well. For example in Impress the Slides pane when scrolling the interaction list, or the slide canvas when scrolling the Gallery. Happens not always but replicable. Haven't seen it under kf5.
Comment 1 Muhammad Rivan 2021-01-15 00:38:33 UTC
Created attachment 168891 [details]
Impress scrolling problem

> Muhammad Rivan, [14.01.21 21:14]
> I think we got to make sure that we don't use the same GtkAdjustment-s in our GtkScrollbar widgets (or the similar widgets)
> 
> Heiko Tietze, [14.01.21 21:15]
> Don't think the adjustment applies to scrolling.
> 
> Muhammad Rivan, [15.01.21 07:31]
> [In reply to Heiko Tietze]
> [ GIF ]
> You're right, Sir. When I scroll the transition pane with the scrollbar instead of my touchpad, the slides pane just stays in place. So I can tell that the problem is not the GtkAdjustment-s or value bindings
> 
> Muhammad Rivan, [15.01.21 07:31]
> [In reply to Muhammad Rivan]
> Will forward to Bugzilla
Comment 2 Michael Weghorn 2021-01-15 07:45:45 UTC
Setting to NEW according to comment 1.

I couldn't reproduce the issue with the steps shown in the video from comment 1 in a quick test using a presentation consisting of many empty slides in a Plasma X11 session on Debian testing (libgtk-3-0:amd64 3.24.24-1).
(There was some flickering from time to time in the slide transition sidebar when clicking around and scrolling when using the gtk3 VCL plugin, though.)

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 2d69acfde50cb0e06a9a057939078fd102d371a3
CPU threads: 12; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 3 Caolán McNamara 2021-01-16 15:14:56 UTC
Steps to reproduce are a little vague, can be tighten up what the problem is ?
Comment 4 Heiko Tietze 2021-01-18 12:34:16 UTC
(In reply to Caolán McNamara from comment #3)
> Steps to reproduce are a little vague, can be tighten up...

Unfortunately it's a bit unclear when exactly this happens. Sometimes it works, sometimes not. Maybe after switching from one control to another?
Comment 5 Muhammad Rivan 2021-01-19 02:54:31 UTC
I'm trying to find out the exact way to reproduce it
Comment 6 Muhammad Rivan 2021-01-22 09:01:27 UTC
How to reproduce:
- Create some slides, at least 15
- Change a slide transition to any the heavy one (3D, OpenGL related)
- Click the slide pane
- Scroll the transition pane
- The slide pane will also scroll


So the problem is related to computer performance. It's kinda like Cyberpunk 2077 problem
Comment 7 Caolán McNamara 2021-01-25 15:20:01 UTC
comment #6 is indeed reproducible! Great work on that. I don't see it under wayland, but under X, yes launching one of the opengl transitions, doing the click on slide panel and return to sidebar with mouse and scroll wheel scrolls both, and there also then seems to be a lot of flicker
Comment 8 Caolán McNamara 2021-01-25 17:37:31 UTC
it seems to be the GDK_WINDOW_XID call, which is a define for gdk_x11_window_get_xid, to the a window handle (which we end up not using) and that triggers the problem
Comment 9 Commit Notification 2021-01-27 09:19:39 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/df788fcc308bbf8950ad8a22a1f8290681b64f0d

tdf#139609 avoid fetching unnecessary xid under gtk3

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Caolán McNamara 2021-01-27 09:49:41 UTC
looks good in master, I'll prep a 7-1 backport too
Comment 11 Commit Notification 2021-01-27 12:40:30 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/ac9789dbb36f45dcc1caf7dd2951353b1574c8ea

tdf#139609 avoid fetching unnecessary xid under gtk3

It will be available in 7.1.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Muhammad Rivan 2021-01-28 00:26:40 UTC
Thank you so much, Caolan!