This service will be undergoing disruptive maintenance at 7:00PM UTC, 2020-01-18. It is expected to last approximately one hour.
Bug 1226465 - GTK applications (sometimes?) do not scroll correctly, lacks focus?
Summary: GTK applications (sometimes?) do not scroll correctly, lacks focus?
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: kwin
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Vrátil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1226761 1230942 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-29 21:54 UTC by Germano Massullo
Modified: 2018-10-19 09:22 UTC (History)
29 users (show)

Fixed In Version: kde-settings-22-11.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-08 19:51:18 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
GNOME Bugzilla 737726 Normal RESOLVED Mouse wheel scroll doesn't work if not focused 2020-01-07 15:38:30 UTC
GNOME Bugzilla 750870 Normal RESOLVED gtk3 does apparently ignore replayed events? 2020-01-07 15:38:30 UTC
KDE Software Compilation 348270 None None None Never

Description Germano Massullo 2015-05-29 21:54:46 UTC
Description of problem:
Plasma 5.3 Kf 5.10: I noticed that many times if you try to use mouse-scroll-wheel on GTK applications, the scrolling will not work until you click on the application or you manually use the scrollbar.
One example? Firefox

Comment 1 Daniel Vrátil 2015-06-01 09:02:01 UTC
I can reproduce this with Firefox, which is Gtk3 (in F22), but it works fine with Gimp (Gtk2), so it might be some sort of Gtk3 issue.

Comment 2 Daniel Vrátil 2015-06-01 09:03:12 UTC
Update: with Firefox the scrolling sometimes does not work even when the window has focus. Might be related, might be some Firefox-specific glitch.

Comment 3 Daniel Vrátil 2015-06-01 09:08:44 UTC
*** Bug 1226761 has been marked as a duplicate of this bug. ***

Comment 4 Germano Massullo 2015-06-01 10:31:58 UTC
Notified upstream developers too.

Comment 5 Kevin Kofler 2015-06-01 12:26:04 UTC
Firefox is not really GTK+, it's XUL, GTK+ 3 is only used for rendering.

Comment 6 Tomas Kopecek 2015-06-02 07:38:27 UTC
Some additional info: When wheel in firefox stops working for me, scrolling still works with pushed middle button.

Comment 7 Tomas Kopecek 2015-06-02 07:39:45 UTC
Ok, now it just reverted to original behaviour - resizing. So not 100% deterministic.

Comment 8 Martin Stransky 2015-06-04 07:54:59 UTC
(In reply to Kevin Kofler from comment #5)
> Firefox is not really GTK+, it's XUL, GTK+ 3 is only used for rendering.

No, it's Gtk3 application and process scroll events from Gtk event loop.

Comment 9 Elia Devito 2015-06-08 09:07:51 UTC
related to https://bugzilla.redhat.com/show_bug.cgi?id=983834 ?

Comment 10 Jean-Christophe Baptiste 2015-06-09 09:31:48 UTC
Notified upstreem but they think it is Fedora specific.
https://bugs.kde.org/show_bug.cgi?id=348270

Comment 11 Martin Klapetek 2015-06-09 09:37:45 UTC
Fedora specific or not, it's not a KDE bug really. We (KDE) can't just selectively block inputs to GTK only apps (well technically I guess we could but I'm certain that kwin does not).

It looks more like broken event processing in GTK and with that there's no reason why that should be a KDE report; especially given that the comments in bug 983834 (from comment #9) suggests it's actually a Gnome issue.

Comment 12 Rex Dieter 2015-06-09 09:50:17 UTC
Triaging to gtk3 (as suggested)

Comment 13 Martin Stransky 2015-06-09 09:51:58 UTC
Please test other Gtk3 apps (evince, gedit, epiphany). It may also be a bug in Firefox.

Comment 14 Martin Klapetek 2015-06-09 09:58:52 UTC
Quoting Dan Vratil from the KDE report:

"This does not affect only FireFox, I can reproduce with GEdit too [...] it's not triggered only by notifications stealing focus from the window, I can reproduce even when I move the focus manually to another window".

Comment 15 Rex Dieter 2015-06-12 14:24:17 UTC
*** Bug 1230942 has been marked as a duplicate of this bug. ***

Comment 16 Rex Dieter 2015-06-12 14:40:35 UTC
dvratil tested with openbox, and problem is not present there, so now we suspect kwin, reassigning.

Comment 17 Rex Dieter 2015-06-12 17:14:18 UTC
More upstream references, this time gtk3:

https://bugzilla.gnome.org/show_bug.cgi?id=737726
https://bugzilla.gnome.org/show_bug.cgi?id=750870

Comment 18 Matthias Clasen 2015-06-12 18:32:59 UTC
Suggestion from Carlos for diagnosis: please test if this problem disappears with GDK_CORE_DEVICE_EVENTS=1 in the environment

Comment 19 Elia Devito 2015-06-12 19:41:30 UTC
I have tested firefox with GDK_CORE_DEVICE_EVENTS=1 and the problem disappears

Comment 20 Rex Dieter 2015-06-13 15:00:10 UTC
From, https://bugs.kde.org/show_bug.cgi?id=348270#c26 , we can certainly implement this workaround in plasma/kwin:

kwrite ~/.config/plasma-workspace/env/gtk3-scrolling.sh
----------------- snip --------------
GDK_CORE_DEVICE_EVENTS=1
export GDK_CORE_DEVICE_EVENTS
----------------- /snip --------------

Comment 21 Markus S. 2015-06-16 03:05:20 UTC
I downloaded Firefox from mozilla.org (i.e. it should be a GTK 2 application) and the issue is the same.

Comment 22 Fedora Update System 2015-06-17 14:16:11 UTC
kde-settings-22-11.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/kde-settings-22-11.fc22

Comment 23 David H. Gutteridge 2015-06-17 22:51:24 UTC
Since applying the update referenced in comment 22 this morning, I haven't encountered any problems during regular use of GTK3 applications, so it seems to work around the issue.

Comment 24 Germano Massullo 2015-06-20 16:14:21 UTC
(In reply to Fedora Update System from comment #22)
> kde-settings-22-11.fc22 has been submitted as an update for Fedora 22.
> https://admin.fedoraproject.org/updates/kde-settings-22-11.fc22
I have just given a -1 karma point because I am still experiencing the problem: in Firefox, even if the window is active, sometimes I can manage to scroll the page only after clicking once on the webpage

Comment 25 Germano Massullo 2015-06-20 16:16:43 UTC
(In reply to Germano Massullo from comment #24)
> (In reply to Fedora Update System from comment #22)
> > kde-settings-22-11.fc22 has been submitted as an update for Fedora 22.
> > https://admin.fedoraproject.org/updates/kde-settings-22-11.fc22
> I have just given a -1 karma point because I am still experiencing the
> problem: in Firefox, even if the window is active, sometimes I can manage to
> scroll the page only after clicking once on the webpage

My mistake, please ignore comment #24.
Yesterday I was updating the package to the testing version but repositories had troubles so the update has not been completed. Today I have forgotten that (so I did the test on the old bugged version)

Comment 26 Fedora Update System 2015-06-21 00:06:15 UTC
Package kde-settings-22-11.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kde-settings-22-11.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10192/kde-settings-22-11.fc22
then log in and leave karma (feedback).

Comment 27 Fedora Update System 2015-06-22 10:36:39 UTC
kde-settings-22-11.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 28 Elia Devito 2015-07-14 23:45:43 UTC
fixed in gtk3 (3.16.5-1.fc22)

the workaround referenced in comment 20 are not required yet

Comment 29 Fedora Update System 2015-09-28 15:32:39 UTC
kde-settings-22-12.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-f3467dc630

Comment 30 David H. Gutteridge 2015-09-30 01:41:47 UTC
With kde-settings-22-12.fc22, the problem has returned, so the removal of the workaround seems premature, unless there's some other dependency that's supposed to be pulled in that hasn't been in my case.

Comment 31 Rex Dieter 2015-09-30 01:46:06 UTC
David, what version of gtk3 are you testing with?  (it's supposed to be fixed)

rpm -q gtk3

Comment 32 David H. Gutteridge 2015-09-30 01:51:26 UTC
I have gtk3-3.16.7-1.fc22.x86_64 installed. If this is related to the upstream bug I'll link below, the change in question was reverted by Gnome.

https://bugzilla.gnome.org/show_bug.cgi?id=750994

Comment 33 David H. Gutteridge 2015-09-30 01:54:13 UTC
Hmm, the Gnome bug referenced in comment 32 may pertain more to bug 1226706, I'm not sure.

Comment 34 Fedora Update System 2015-10-02 03:48:32 UTC
kde-settings-22-12.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update kde-settings'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-f3467dc630

Comment 35 Fedora Update System 2015-10-03 21:12:46 UTC
kde-settings-22-12.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 36 Race 2015-10-05 11:39:04 UTC
Good day. After this update I had a problem with the mouse wheel. example in firefox 41.0.1. Temporary downgrade to 22-7

Comment 37 Nick Cross 2015-10-06 10:27:32 UTC
@Race : Same for me ; with all updates applied today and a reboot mouse scrolling is problematic in firefox (and for that matter it seems to cause focus issues with the keyboard as well).

Comment 38 Rex Dieter 2015-10-06 15:26:46 UTC
Confirmed the workaround does still seem to be needed, will put it back asap

Comment 39 Fedora Update System 2015-10-07 16:25:57 UTC
kde-settings-22-14.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update kde-settings'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-a02471b8c6

Comment 40 Fedora Update System 2015-10-07 16:27:47 UTC
kde-settings-23-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update kde-settings'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-1528230139

Comment 41 David H. Gutteridge 2015-10-07 20:59:10 UTC
I tested kde-settings-22-14.fc22 and it didn't resolve the problem for me. Steps to reproduce the issue in Firefox are very simple for me:

(1) Open Firefox and do something in it. Observe the scroll wheel works.
(2) Click on the time in the Plasma panel to bring up the calendar, then minimize it by clicking on the time again. (It's important that you click on the time to minimize, rather than elsewhere on the screen, or this is less reproducible for some reason.)
(3) Go back to Firefox and note the scroll wheel no longer works.
(4) Go into another application and use the scroll wheel in it. Observe it works fine.
(5) Go back to Firefox and note the scroll wheel works again.

Comment 42 Rex Dieter 2015-10-07 21:33:12 UTC
It works for me.  did you restart your session after updating kde-settings?

Though, if you installed plasma-5.4.2 from -testing, you'll have to also get plasma-workspace-5.4.2-4 (or newer) to fix a regression in startkde not importing environment variables properly,
https://bodhi.fedoraproject.org/updates/FEDORA-2015-6b26456127

To rule all that out, you can re-test by running firefox as:

GDK_CORE_DEVICE_EVENTS=1 firefox

Comment 43 David H. Gutteridge 2015-10-07 22:04:07 UTC
I'd installed all the plasma-5.4.2 packages in testing as of a few days ago. It's news to me I needed to update to plasma-workspace-5.4.2-4 in relation to this issue, I had 5.4.2-1 installed. With 5.4.2-4 installed, I can't replicate the issue using the existing test cases I'd noted, so it indeed appears fixed. I will test further and advise if I find an issue (but I can't imagine how I could), and will revise karma in Bodhi otherwise.

Comment 44 David H. Gutteridge 2015-10-08 01:28:50 UTC
Confirming the updated package works for me, my Bodhi input has been amended accordingly.

Comment 45 Fedora Update System 2015-10-08 19:51:13 UTC
kde-settings-22-14.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 46 Fedora Update System 2015-10-09 06:14:50 UTC
kde-settings-23-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 47 Sinan H 2018-07-15 22:56:45 UTC
With a current GTK3 as of 2018/07, this fix breaks GTK's xinput2 pathway, hence nukes all gestures and touch control for GTK3 applications on plasma, including firefox. 

I'd suggest to unset GDK_CORE_DEVICE_EVENTS as this workaround isn't used anymore on any other DE/WM, and bars GTK applications to access xinput2. 

Relevant thread: https://lists.fedoraproject.org/archives/list/kde@lists.fedoraproject.org/thread/OIYKLSEWALYOBUB6KSDWRIFMOFXSSGCU/

Comment 48 Rex Dieter 2018-07-16 04:37:50 UTC
If we do that, the original bug reported here will resurface.  So I guess we have to make a choice which is worse.

Comment 49 Sinan H 2018-07-16 08:00:48 UTC
The original workaround is to cover for a GTK3 bug, but their devs chose to live with it instead of fixing it proper. And not to enforce GDK_CORE_DEVICE_EVENTS to keep xinput2 features. 
https://bugzilla.gnome.org/show_bug.cgi?id=750994#c8

This fix breaks (gtk3-)touch functionality on equipped devices, and I had a hard time to track this to here. I feel that it should be opt-in, not default.

Comment 50 dhardy 2018-10-19 09:15:40 UTC
Ah, found it!

> hence nukes all gestures and touch control for GTK3 applications on plasma, including firefox. 

Yes, this breaks touch support in GTK apps. For anyone with a touchscreen device using Firefox/GTK on Plasma, this is much a bigger problem than mouse wheel events / touchpad scrolling not scrolling the region directly under the cursor (which in any case seems to be broken in GNOME itself).

Short version: please un-break Firefox on Plasma.


Note You need to log in before you can comment on or make changes to this bug.