Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ctrl-click as right-click freezes control after setting to default value #10831

Closed
m0dB opened this issue Aug 28, 2022 · 10 comments
Closed

Comments

@m0dB
Copy link
Contributor

m0dB commented Aug 28, 2022

When using the trackpad on a macbook, I use ctrl-click to emulate right-click. I found that this does not work well with mixxx: The controls (I tried with cross fade slider and any filter knob, but I assume this goes for all continuous controls) do reset to their default value as expected with right-click, but afterwards the don't respond to mouse events anymore and stay fixed at the default value, until doing a proper right click (with a mouse with physical right button) or using two-fingers-emulated-right-click. After that the control functions normally again.

(As a first time user, it took me a while to realize this was the problem when I found mixxx became gradually unresponsive.)

Using Mixxx 2.3.3 on macOS Monterey.

@Swiftb0y Swiftb0y added the macos label Aug 28, 2022
@ronso0
Copy link
Member

ronso0 commented Aug 28, 2022

how do you configure Ctrl+click? is it a macOS-native setting or some 3rd-party app?

@m0dB
Copy link
Contributor Author

m0dB commented Aug 29, 2022

this is standard macOS behaviour (it's not even a settings, it can't be turned off unless by using 3rd party software).

@foss-
Copy link
Contributor

foss- commented Aug 29, 2022

macOS 12.5.1
Mixxx 2.4-alpha-1278-gcaa494bc17 (main)

Confirming issue

The issue does not happen when two-finger-tapping touchpad as secondary click or right-click. The issue however happens if CTRL+Click is used. After slider is reset to default position it is no longer movable.

@ronso0
Copy link
Member

ronso0 commented Aug 29, 2022

Alright, thanks for confirming.

So the issue seems to be that Mixxx recognizes the Ctrl keypress, then receives a Right-click but no Ctrl release event?
Are there more actions in Mixxx where Ctrl used? If so, can you confirm those actions are triggered even though you actually already released Ctrl?
For example: Ctrl+click to reset a slider/knob, (release Ctrl), click another set-off slider/knob. Is it reset?
And: say you have a (macOS-native) window next to Mixxx, if you click there is it also recognized as right-click?
What I'm trying to figure is if the Ctrl pressed state is stuck because Mixxx swallows the release event.

FWIW there are a few macOS-specific paths in src/controllers/keyboard/keyboardeventfilter.cpp

@foss-
Copy link
Contributor

foss- commented Aug 29, 2022

Ctrl-Click continues to work in other windows outside of Mixxx after reproducing the problem in Mixxx.
When triggering a stuck slider, the other sliders remain usable until used with Ctrl+Click which will also lock that UI element. Easy to reproduce using the volume and cross faders.
The issue also applies to knobs e.g. head or eq knobs. Once one knob is stuck, the rest remains usable.

Is any of the console output helpful?

Console Output
debug	14:23:36.258325+0200	WindowServer		DHML:  P9 Wating for slide, ZInstability=0.000000, TimeInstability=0.171154 (from dtstart=0.045000s)
debug	14:23:36.258470+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f807685d6a0 event:11 sender:0x1000007c8 eventDelta:0x16b9070 deltaMS:0x5d9e3c displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x5947fbbb493
debug	14:23:36.261820+0200	WindowServer	[DEBUG] - On display 0x1b567475, surface is not detached, CoreDisplay is detached (0x00000000), DetachCode = 0
debug	14:23:36.267916+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f806c2c9ae0 event:11 sender:0x1000007c8 eventDelta:0x1fc024e deltaMS:0x5d9e45 displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x594804c2671
debug	14:23:36.269184+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f807683d360 event:6 sender:0x1000007c8 eventDelta:0x21008ba deltaMS:0x5d9e47 displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x59480602cdd
debug	14:23:36.269280+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f80768bdc10 event:11 sender:0x1000007c8 eventDelta:0x20fca24 deltaMS:0x5d9e47 displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x594805fee47
debug	14:23:36.279191+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f8074faf5e0 event:6 sender:0x1000007c8 eventDelta:0x2a88c32 deltaMS:0x5d9e51 displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x59480f8b055
debug	14:23:36.279284+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f8072d7adf0 event:11 sender:0x1000007c8 eventDelta:0x2a84e48 deltaMS:0x5d9e51 displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x59480f8726b
debug	14:23:36.281001+0200	Console	found no value for key NSFineScrollDelta in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.281174+0200	Console	found no value for key NSWindowScrollWheelEventShouldApplyTwitterWorkaround in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.281270+0200	Console	found no value for key NSScrollViewShouldDoResponsiveScrolling in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.281327+0200	Console	found no value for key NSScrollViewResponsiveScrollingOptInLogToConsole in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.281353+0200	Console	found no value for key NSScrollingBehaviorConcurrentEnabled in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.281377+0200	Console	found no value for key NSSmoothScrollWheel in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.281405+0200	Console	found no value for key NSOverlayScrollerRolloverLogicDebug in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.281558+0200	Console	found no value for key NSEventSuppressBeginEndGesture in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.290668+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f807688e500 event:6 sender:0x1000007c8 eventDelta:0x3573d27 deltaMS:0x5d9e5c displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x59481a7614a
debug	14:23:36.290842+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f80768bdc10 event:11 sender:0x1000007c8 eventDelta:0x356b400 deltaMS:0x5d9e5c displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x59481a6d823
debug	14:23:36.294497+0200	WindowServer	[DEBUG] - On display 0x1b567475, surface is not detached, CoreDisplay is detached (0x00000000), DetachCode = 0
debug	14:23:36.297631+0200	Console	found no value for key NSEventFractionScrollingDeltasEnabled in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.297718+0200	Console	found no value for key NSScrollingBehaviorDebugEnabled in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.297812+0200	Console	found no value for key NSScrollingSingleBounceIfSwipeForwardable in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.297868+0200	Console	found no value for key NSScrollingBehaviorDebugEnabled in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.297909+0200	Console	found no value for key NSScrollVelocityFilterDebugEnabled in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.297957+0200	Console	found no value for key NSScrollingBehaviorDebugEnabled in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.297991+0200	Console	found no value for key NSScrollViewRubberbandStiffness in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.298083+0200	Console	found no value for key NSScrollViewLiveNotificationDebugEnabled in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.298136+0200	Console	found no value for key NSScrollingBehaviorDebugEnabled in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.298178+0200	Console	found no value for key NSScrollingBehaviorDebugEnabled in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.298214+0200	Console	found no value for key NSScrollingConcurrentVBLMonitorUsesWorkInterval in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.303325+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f8074fbca80 event:6 sender:0x1000007c8 eventDelta:0x4182bea deltaMS:0x5d9e69 displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x5948268500d
debug	14:23:36.303580+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f8072d7adf0 event:11 sender:0x1000007c8 eventDelta:0x4178dac deltaMS:0x5d9e69 displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x5948267b1cf
debug	14:23:36.311505+0200	Console	found no value for key NSScrollViewLogAllEvents in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.311602+0200	Console	found no value for key NSScrollingBehaviorDebugStateChanges in CFPrefsSearchListSource<0x6000012e2b80> (Domain: com.apple.Console, Container: (null))
debug	14:23:36.313051+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f8074f56bf0 event:6 sender:0x1000007c8 eventDelta:0x4acebd4 deltaMS:0x5d9e72 displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x59482fd0ff7
debug	14:23:36.313183+0200	WindowServer	displayStateFilter policy:1 declareActivity:0 result:0x7f8072d7adf0 event:11 sender:0x1000007c8 eventDelta:0x4ac86c6 deltaMS:0x5d9e73 displayState:2 prevTimeStamp:0x5947e502423 eventTime:0x59482fcaae9
debug	14:23:36.322304+0200	mixxx	_CSCheckFix(11325124,org.mixxx.mixxx/2.4.0)=NOT-APPLIED
debug	14:23:36.322428+0200	mixxx	_CSCheckFix(11325124,org.mixxx.mixxx/2.4.0)=NOT-APPLIED
debug	14:23:36.322571+0200	mixxx	_CSCheckFix(11325124,org.mixxx.mixxx/2.4.0)=NOT-APPLIED

@ronso0
Copy link
Member

ronso0 commented Aug 29, 2022

Thanksfor clarifying.
So only the slider that was reset is affected. That should simplify the fix IMO.

Is any of the console output helpful?

Not really if I don't know how logged lines relate to Mixxx input.

@ronso0
Copy link
Member

ronso0 commented Aug 29, 2022

Please test the build of #10838
See https://github.com/mixxxdj/mixxx/wiki/Testing (even though this is a very low-risk PR, backup your user data!)

@ronso0
Copy link
Member

ronso0 commented Aug 29, 2022

Hmm the issue seems to be that Ctrl+click doesn't emit a mouse button release event.
Looking at the handler classes
https://github.com/mixxxdj/mixxx/blob/2.3/src/widget/slidereventhandler.h
https://github.com/mixxxdj/mixxx/blob/2.3/src/widget/knobeventhandler.h
there is no special right-click functionality (like right button drag or such), just the single click to reset the control.
Thus we don't need to to track the button state with mousePressEvent and mouseReleaseEvent -- we could simply use contextMenuEvent to reset the control.

Working on it...

@ronso0
Copy link
Member

ronso0 commented Aug 29, 2022

#10839 contains the new fix to test.

@daschuer
Copy link
Member

fixed by #10869

@daschuer daschuer added the bug label Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants