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 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.

@JohannesLorenz
Copy link
Contributor

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

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 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

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

@JohannesLorenz JohannesLorenz merged commit 42f7e26 into LMMS:stable-1.2 Dec 23, 2019
@JohannesLorenz
Copy link
Contributor

Thanks!

@PhysSong
Copy link
Member

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

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.

3 participants