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

Fix scrolling direction in SongEditor due to stuck Ctrl/Shift. #5286

Merged
merged 1 commit into from Dec 23, 2019

Conversation

Cyp
Copy link
Contributor

@Cyp Cyp commented Oct 29, 2019

As far as I can tell, MainWindow::focusOutEvent never gets called no matter what I do, so clearKeyModifiers fails to be called.

@Cyp
Copy link
Contributor Author

@Cyp Cyp commented Oct 29, 2019

/home/travis/build/LMMS/lmms/include/MainWindow.h:130:22: error: ‘deprecated’ attribute directive ignored [-Werror=attributes]
Should probably be compiled with -Wno-attributes with old compilers.

@Cyp Cyp force-pushed the fix-songeditor-scrolling branch from 36bc837 to 4daf642 Compare Oct 31, 2019
@JohannesLorenz JohannesLorenz self-requested a review Dec 12, 2019
@JohannesLorenz
Copy link
Contributor

@JohannesLorenz JohannesLorenz commented Dec 12, 2019

A bit more info please: What is the issue you are fixing? What are the steps to reproduce that issue?
Edit: This info should also be in the commit message.

@JohannesLorenz
Copy link
Contributor

@JohannesLorenz JohannesLorenz commented Dec 12, 2019

Not required but it will help future readers if you split stuff into multiple commits, e.g. cleanups, override fixes, ... It's not difficult, just a git reset --soft HEAD~1, and then git add on the files you want to add (or git add -p if a file shall be splitted).

@Cyp
Copy link
Contributor Author

@Cyp Cyp commented Dec 13, 2019

It fixes that if scrolling with the mouse wheel in the Song Editor, it would often unexpectedly zoom or scroll horizontally instead of scrolling vertically, due to a stuck Ctrl/Shift state.

This was reproducible by switching away from LMMS using Ctrl+F[1-10] to change desktops, and switching back again without using Ctrl. Then LMMS would behave as if the Ctrl key was still down. Not sure how to reproduce Shift being stuck down, but it also happened sometimes somehow.

As a side effect, it should also fix a theoretical issue of it thinking Ctrl/Shift was down during the click when it was actually pressed after the click (might happen in the case of very slow computers).

Copy link
Contributor

@JohannesLorenz JohannesLorenz left a comment

Testing worked. Code and style are OK. Only left 1 comment about .gitignore.

.gitignore Outdated Show resolved Hide resolved
@JohannesLorenz
Copy link
Contributor

@JohannesLorenz JohannesLorenz commented Dec 15, 2019

I also tested the ctrl key issue, it's working. No regressions for shift and ctrl. Testing finished.

@Cyp Cyp force-pushed the fix-songeditor-scrolling branch from 4daf642 to f96b544 Compare Dec 23, 2019
@JohannesLorenz JohannesLorenz merged commit 42f7e26 into LMMS:stable-1.2 Dec 23, 2019
1 of 2 checks passed
@JohannesLorenz
Copy link
Contributor

@JohannesLorenz JohannesLorenz commented Dec 23, 2019

Thanks!

@PhysSong
Copy link
Member

@PhysSong PhysSong commented Dec 24, 2019

FYI, I'm getting a deprecation warning since Knob::getValue() uses deprecated MainWindow::isShiftPressed(). It will break CircleCI builds on master branch.

@JohannesLorenz
Copy link
Contributor

@JohannesLorenz JohannesLorenz commented Dec 26, 2019

I removed [[deprecated]] now on stable-1.2. Hopefully, this will fix the CI issues on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants