Regression: rev 3862 causes no scrolling on an unfocused gtk3 window with usb mouse

Bug #1330198 reported by Doug McMahon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Medium
Christopher Townsend
compiz (Ubuntu)
Fix Released
Medium
Christopher Townsend

Bug Description

Was fixed/working in compiz (1:0.9.11+14.04.20140423-0ubuntu1, broken in compiz (1:0.9.11+14.10.20140606-0ubuntu1 (revision 3862

Test case: (here
Have a laptop with usb mouse
Open 2 scroll-able nautilus or gedit windows
Mouse over & try to scroll in the unfocused window

What happens: nothing

Do not have a desktop machine to see if it affects usb mouse there

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: compiz 1:0.9.11+14.10.20140606-0ubuntu2
ProcVersionSignature: Ubuntu 3.15.0-5.10-generic 3.15.0-rc8
Uname: Linux 3.15.0-5-generic x86_64
.tmp.unity.support.test.0:

ApportVersion: 2.14.3-0ubuntu1
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity
Date: Sun Jun 15 10:18:29 2014
DistUpgraded: Fresh install
DistroCodename: utopic
DistroVariant: ubuntu
GraphicsCard:
 Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:3801]
 NVIDIA Corporation GK107M [GeForce GT 755M] [10de:0fcd] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:3801]
InstallationDate: Installed on 2014-05-28 (17 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20140520)
MachineType: LENOVO 20217
PackageArchitecture: all
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.15.0-5-generic.efi.signed root=UUID=a6d824a1-9cb2-4aad-9241-7b563a3dbdd0 ro quiet splash
SourcePackage: compiz
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/18/2013
dmi.bios.vendor: LENOVO
dmi.bios.version: 74CN44WW(V3.05)
dmi.board.asset.tag: No Asset Tag
dmi.board.name: VIQY0Y1
dmi.board.vendor: LENOVO
dmi.board.version: 31900058STD
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo IdeaPad Y510P
dmi.modalias: dmi:bvnLENOVO:bvr74CN44WW(V3.05):bd09/18/2013:svnLENOVO:pn20217:pvrLenovoIdeaPadY510P:rvnLENOVO:rnVIQY0Y1:rvr31900058STD:cvnLENOVO:ct10:cvrLenovoIdeaPadY510P:
dmi.product.name: 20217
dmi.product.version: Lenovo IdeaPad Y510P
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:0.9.11+14.10.20140606-0ubuntu2
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.54-1
version.libgl1-mesa-dri: libgl1-mesa-dri 10.1.3-0ubuntu1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.1.3-0ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.15.1-0ubuntu5
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.8.2-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.3.0-1ubuntu4
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.910-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.10-1ubuntu2
xserver.bootTime: Sun Jun 15 10:17:47 2014
xserver.configfile: default
xserver.errors:
 Failed to load module "nvidia" (module does not exist, 0)
 Failed to load module "nvidia" (module does not exist, 0)
 NOUVEAU(G0): Failed to initialise context object: 2D_NVC0 (0)
 NOUVEAU(G0): Error initialising acceleration. Falling back to NoAccel
xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:
 product id 729
 vendor LGD
xserver.version: 2:1.15.1-0ubuntu5

Related branches

Revision history for this message
Doug McMahon (mc3man) wrote :
Revision history for this message
Doug McMahon (mc3man) wrote :
Revision history for this message
Doug McMahon (mc3man) wrote :

Nah, wasn't commit 3864

Revision history for this message
Doug McMahon (mc3man) wrote :

Was revision 3862 that breaks here

summary: - Regression: no scrolling on an unfocused gtk3 window with usb mouse
+ Regression: rev 3862 causes no scrolling on an unfocused gtk3 window
+ with usb mouse
description: updated
Revision history for this message
Christopher Townsend (townsend) wrote :

Geez, why does this have to be so hard to fix this Gtk scrolling, yet, not break every other possible wheel mouse binding someone may do in some Compiz plugin?????

Thanks for the report and narrowing down the commit. I'll take a look.

Changed in compiz (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Christopher Townsend (townsend)
Revision history for this message
Christopher Townsend (townsend) wrote :

Hmm, I'm thinking something has changed in Gtk for Utopic that breaks this fix. My reasoning is that the next pending Compiz SRU for 14.04 has this fix in it and unfocused scrolling works.

I'll get a Utopic system up and running and see what happens there.

Revision history for this message
Christopher Townsend (townsend) wrote :

Well, it works with my laptop and USB mouse on Utopic, so I guess it's not Gtk. Maybe different USB mice use different masks in X????

I'll have to think about this and do some research.

Revision history for this message
Christopher Townsend (townsend) wrote :

@Doug,

Do you have any other Compiz functions bound to your scroll wheel? I've tried three different USB mice on this machine and they all work, so I'm wondering if it's some functionality tripping this up.

Revision history for this message
Doug McMahon (mc3man) wrote :

Is there a build up for 14.04 that includes this? (ie. the pending SRU) that I can try?
Asking because I did previously try .9.11+14.10.20140606-0ubuntu1 source in trusty & there was no scrolling in an unfocused gtk3 window with the usb mouse (- touchpad did work if I enabled

Mouse here is logitech as in screen & also see the same with a corded logitech usb mouse (no idea how to produce info on..

(Ot maybe -
Does your usb mouse/laptop see this bug?
https://bugs.launchpad.net/ubuntu/+source/unity-settings-daemon/+bug/1283863

Revision history for this message
Doug McMahon (mc3man) wrote :

Yes - the typical for desktop-based viewport switching, 5 (next) & 4 (prev
Though if I disable the bindings scrolling still fails on unfocused

Maybe it's 1 corner case (the bug fix) to another (my hardware lenovo Y510P?

Revision history for this message
Christopher Townsend (townsend) wrote :

@Doug,

The pending Compiz SRU packages can be found in ppa:ci-train-ppa-service/landing-010. 2 of the 3 mice I've tried are Logitechs as well. Not really sure what's going here unless you have some scroll wheel binding that I'm unaware of.

Regarding the touchpad re-activation, it works in the greeter, but then doesn't work after log in. I even moved the cursor around and clicked on things in the greeter.

Revision history for this message
Doug McMahon (mc3man) wrote :

When I get home tonight I'll try the SRU in a new 14.04 install or live session

If you don't see the re-enabling from 'touchpad -disabled' on reboot then there may be some hardware diffs that can affect usb mice, ect.
The greeter always has touchpad -enabled but on this laptop & my prior lenovo (y580p), the user setting of touchpad -disabled is/was always reset to -enabled on reboot/login
(- well, sorta, - that bug migrated from reset at some point during the course of a day or 2 to the current always reset on fresh boot/login

Revision history for this message
Christopher Townsend (townsend) wrote :

Ok, then this is probably hardware specific. I had to trial and error to find that the Mod2Mask is the correct keymask bit to set to keep things in check, but it seems there are corner cases like yours.

Honestly, I don't know of an easy way to figure this is than to just recompile Compiz and change that line in the revision you point out changing the keymask bit to one of these:
ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, and Mod5Mask or an inclusive OR of those masks

Revision history for this message
Doug McMahon (mc3man) wrote :

If you have any ideas on which one(s) *may* work I'll rebuild here & test.
Or possibly leave as is & see what shakes out when the SRU releases.
From my singular perspective I can revert or edit the change for myself, maybe there are only a few who will be affected

(- I never really looked at the bug this particular commit was fixing which I guess any new change would have to consider., no sense fixing a if it breaks b, then fixing b & hope to not break a, ect., ect.

Revision history for this message
Christopher Townsend (townsend) wrote :

I really don't have any idea which masks to try. What this fix is trying to do is allow bindings of the scroll wheel + modifier for users who want to use something like Alt+scroll up/down to raise/lower windows, so I need to keep some modifiers with the scroll wheel grabbed for this.

It's not clear what the ModXMask masks really bind to. This just seems like really fragile code that I'm forced to muck with because Gtk developers wanted to fix another issue and left window managers holding the bag.

I'll keep looking at this. Maybe I can add some of the ModXMasks to the exclusive OR and not break things.

Revision history for this message
Doug McMahon (mc3man) wrote :

As best I can see -
Using 0.9.11+14.10.20140606-0ubuntu2 with rev 3862 reverted on 14.04 & 14.10
Totally unaffected by what's mentioned in the other bug report, both the current SRU test case & the orig. description.
(with either the wireless mouse or wired one (- Logitech USB-PS/2 Optical Mouse

I can:
lower windows with alt+button6
scroll on Desktop with alt+buttons5/4
scroll unfocused

At the end of the day if a total fix isn't possible & my type hardware is odd man out no big deal, I'll ppa it for users likewise affected..

Revision history for this message
Doug McMahon (mc3man) wrote :

Plus - Those affected like myself can scroll unfocused with the touchpad Or scroll unfocused with cursor on scrollbar thumb.
(so there are alternatives when using current 0.9.11+14.10.20140606-0ubuntu2

Revision history for this message
Christopher Townsend (townsend) wrote :

Hi Doug,

I think I figured out the problem. It seems Mod2Mask maps to NumLock. If I have NumLock turned on on my keyboard, then unfocused scrolling doesn't work. Do you have NumLock turned on and if so, could you try turning it off and see if it begins to work? If you don't have it turned on, then well, uh, not sure what's going on with your machine.

Thanks!

Revision history for this message
Doug McMahon (mc3man) wrote :

That seems to be the issue though on this lenovo seems to be opposite...
So if I hit numlock key - the light on case comes on, then scrolling in unfocused works. If I then hit numlock again - the light goes off, no scrolling

I guess this means numlock on - scroll works, numlock off - no scrolling.

The default here on a fresh install would be light off (numlock off

Revision history for this message
Christopher Townsend (townsend) wrote :

  Thanks for confirming! Sorry, you're right, I had it backwards. NumLock on, scrolling works.

So now the questions are (not asking you, just putting these thoughts somewhere):

1. Why do Gtk apps care about having NumLock ungrabbed?
2. Why does ungrabbing any other modifier in conjunction with NumLock not allow unfocused scrolling?
3. When NumLock is ungrabbed, why does turning off NumLock not allow unfocused scrolling?
4. Why does ungrabbing buttons with AnyModifier work for scrolling regardless? This should be similar to point 2 above, but it works - it just breaks using a modifier with the vertical scroll wheel.

Revision history for this message
Christopher Townsend (townsend) wrote :

I'm pretty sure we've identified a proper fix that should make everyone happy. We'll work on getting that into Utopic. I'll have to pull rev. 3862 out of the pending Trusty SRU and work on getting this in the next SRU.

Revision history for this message
Doug McMahon (mc3man) wrote :

Great - though I guess I should mention, though probably elsewhere..

Concerning this pending 14.04 compiz SRU, - *if* there is a unity SRU the same as the current in 14.10 (7.2.0+14.10.20140607-0ubuntu1, then it will expose this bug in 14.04 which I can reproduce easily, at least with nautilus
(- seems odd that trusty in 14.10 is lower versioned

https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1327624

Changed in compiz (Ubuntu):
status: New → In Progress
Changed in compiz:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Christopher Townsend (townsend)
milestone: none → 0.9.12.0
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.11+14.10.20140707-0ubuntu1

---------------
compiz (1:0.9.11+14.10.20140707-0ubuntu1) utopic; urgency=low

  [ Chris Townsend ]
  * Release version 0.9.11
  * Bump VERSION to 0.9.12
  * Add more button ungrab keymasks, so unfocused Gtk window scrolling
    will work when NumLock is off and CapsLock is on and any combination
    thereof. (LP: #1330198)
  * Remove the need to check the viewport we are painting the maximized
    window in while in Expo mode and only scale maximized windows that
    are not being dragged. Fixes a regression caused in r3868. (LP:
    #1333277)

  [ Alberts Muktupāvels ]
  * This is some preparation work to port gtk-window-decorator to gtk+-
    3.0. Changed gtk_object_destroy to gtk_widget_destory. Removed
    support for old metacity versions. Removed support for old wnck
    versions. .
 -- Ubuntu daily release <email address hidden> Mon, 07 Jul 2014 11:42:19 +0000

Changed in compiz (Ubuntu):
status: In Progress → Fix Released
Changed in compiz:
status: In Progress → Fix Committed
Stephen M. Webb (bregma)
Changed in compiz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.