You are not logged in.

#1 2018-08-27 08:42:38

FiveYellowMice
Member
Registered: 2016-11-26
Posts: 4

Scrolling inactive windows in KDE/KWin with mouse wheel

I want to be able to scroll on an inactive (unfocused) window while having a focused window in front, say, having a terminal at the front and a browser at the back, being able to type in the terminal and scroll in the browser without having to switch windows.

It's already the behavior on GTK-based desktop environments. But on KDE, while it still worked for many programs, like Firefox and all Qt 5 programs. But for LibreOffice and all GTK 3 programs I've tested so far, and Firefox with environment variable MOZ_USE_XINPUT2=1, they don't scroll when their windows are not focused.

The weirder thing is, if I scroll using a laptop touchpad, there's no problem, the problem only occurs when scrolling with a mouse wheel.

I have tried tweaking the settings in System Settings - Window Management - Window Behavior - Focus. I tried changing Policy to "Focus Follows Mouse" or "Focus Under Mouse" and unchecking "Click raises active window", this could be a solution although ideal, because the focus changes when I move the mouse, so I have to move the mouse back over to have focus back to the front window. Even if I accept that, this setting creates a bigger problem, I can no longer bring the window at the back to the front by clicking on it. I have no clue why checking "Click raises active window" would cause the window at the back appears to be focused (as seen on the titlebar) when I move the cursor over it, but still unable to scroll on it unless clicking on it first.

I can not find any solution on Google. Firefox seems to have a bug report for this but no solution. And there is an interesting thing that a reply on a thread about the same problem on XFCE says "KWin on KDE does that by default", but now I'm having the same problem KDE sad .

Does anyone have this problem on KDE? And is there a better workaround other than switching to another WM?

Offline

#2 2018-08-27 09:10:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,189

Re: Scrolling inactive windows in KDE/KWin with mouse wheel

If it works everywhere else but specific GTK3 programs I'm more inclined to look at GTK3 being the culprit FWIW, though I'm not on my Arch right now to confirm, I can't remember this ever not working and I don't think I changed anything on my default mouse over behaviour. Is it possible that you were using Wayland with the GTK DEs and a difference in behaviour might stem form there?

I'm going to check back tonight on which behaviour I'm seeing.

Online

#3 2018-08-27 12:51:57

seth
Member
Registered: 2012-09-03
Posts: 58,676

Re: Scrolling inactive windows in KDE/KWin with mouse wheel

export GDK_CORE_DEVICE_EVENTS=1

Scrolling in gtk3 is fundamentally broken, https://www.google.com/search?q=GDK_COR … TS+gtk+bug

Offline

#4 2018-08-29 07:58:31

FiveYellowMice
Member
Registered: 2016-11-26
Posts: 4

Re: Scrolling inactive windows in KDE/KWin with mouse wheel

Thanks, V1del and seth.

I made sure I'm using X11 on both KDE and GNOME. And I even tried using both KDE and GNOME on Wayland, but it doesn't make a difference in terms of this problem.

I read the URL seth posted, only to realize how messed up this thing is. So it's basically yet another imcompatibility between GTK3 programs and KDE. GTK3 wants to do such and KWin does another, and developers on both sided are reluctant to change how thing were done. Settings GDK_CORE_DEVICE_EVENTS=1 does work, though it breaks smooth scrolling on touchpad and makes touchscreen almost unusable for GTK3 programs. But well ¯\_(ツ)_/¯ , it's not like it's going to be easily fixed, for me personally, since I use mouse a lot more than using touchpad and touchscreen, I'll use this work around.

I really hoped I had the skill to fix the problem...

Offline

#5 2018-08-29 12:38:50

seth
Member
Registered: 2012-09-03
Posts: 58,676

Re: Scrolling inactive windows in KDE/KWin with mouse wheel

It's actually an incompatibility between gtk3 and most WMs  - https://bugzilla.gnome.org/show_bug.cgi?id=750870#c4

Offline

Board footer

Powered by FluxBB