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

Adjust mouse and gesture handling #17548

Merged
merged 2 commits into from Mar 24, 2020
Merged

Adjust mouse and gesture handling #17548

merged 2 commits into from Mar 24, 2020

Conversation

peak3d
Copy link
Contributor

@peak3d peak3d commented Mar 23, 2020

Description

Commit 1:
This PR affects mouse and touch behaviour:

  • Don't change selected item in ListView during MouseMove and GesturePan
  • Select element on GestureEnd (could be after inertial scroll), cancel inertial scroll when start / end of list is reached
  • Fix selection on beginning / end if using Middle mouse wheel

Commit 2:

  • Adjust gesture Longpress time from 1sec > 0.5 sec
  • Reduce inertial scroll time (scroll after swipe) for low velocities
  • Take DPI into account when calculating inertial scroll values

Motivation and Context

In the last period I tested lot on android phones / and for validation on my windows laptop with touch and mouse support. Navigating with mouse felt something nervous / stressing, this PR reduces select actions to have a more relexed navigation. Beside this it will save battery live due to much less image / content change actions.

How Has This Been Tested?

Navigate inside main menu and video library with android phone / windows laptop (touch and mouse)

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

@peak3d peak3d added Type: Improvement non-breaking change which improves existing functionality Component: Input v19 Matrix labels Mar 23, 2020
@peak3d peak3d added this to the Matrix 19.0-alpha 1 milestone Mar 23, 2020
@peak3d peak3d requested a review from garbear as a code owner March 23, 2020 11:23
Copy link
Member

@garbear garbear left a comment

Choose a reason for hiding this comment

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

EDIT: sorry commented on wrong PR while reviewing #17543... when's that coffee kicking in this morning...

I'll check this out soon.

@garbear
Copy link
Member

garbear commented Mar 23, 2020

Don't change selected item in ListView during MouseMove and GesturePan

This is a welcome change, it had always annoyed me slightly.

Could you split somewhere along the bullets in the description?

@garbear
Copy link
Member

garbear commented Mar 23, 2020

Thanks for splitting. You can see how it divided up the code into disparate components: gui/, input/ and platform/. Untangling the code was helpful for me.

Left some comments. I haven't worked with touch or mouse in the GUI yet, so I'm not able to analyze the logic, but if something breaks later that's what follow up PRs are for.

@peak3d
Copy link
Contributor Author

peak3d commented Mar 23, 2020

I removed the android one - will be in a separate PR

Copy link
Member

@garbear garbear left a comment

Choose a reason for hiding this comment

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

I don't see any unresolved comments.

@peak3d
Copy link
Contributor Author

peak3d commented Mar 24, 2020

Jenkins build this please

@peak3d peak3d added the Type: Fix non-breaking change which fixes an issue label Mar 24, 2020
@peak3d peak3d force-pushed the mousetouch branch 2 times, most recently from 3d2dfbf to 918fcfc Compare March 24, 2020 16:57
@peak3d peak3d merged commit f98fe01 into xbmc:master Mar 24, 2020
@peak3d peak3d deleted the mousetouch branch March 24, 2020 21:48
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Mar 25, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Mar 26, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
@olympus123
Copy link

olympus123 commented Mar 26, 2020

I am developing my own skin which I plan to release for Kodi 19.
It is going to be a mouse... version of Embuary, but it won't be an Embuary mod, I code it from scratch based on Estuary's code.
I am using Kodi with mouse only, even on my HTPC.

This change is very welcome for Estuary for example (Estuary is using fixedlists in all list views), it works brilliantly for fixedlist containers but feels not natural for panels, at least it doesn't for me.
Is there any hope for this to be enabled/disabled in the skin code of a container?
I would love to use it for fixedlists but not for panels or normal lists.

Some screenshots of my mouse skin, I even managed to make home widgets to scroll with a mouse by using hidden containers, (the main reason I am developing this skin, mouse handling of widgets).

1

2

@olympus123
Copy link

olympus123 commented Mar 27, 2020

Some screenshots of Estuary.
In both cases I am focusing with my mouse Kodi's Media Settings.
The second screenshot seems confusing to me.

Before

3

After

4

@peak3d
Copy link
Contributor Author

peak3d commented Mar 27, 2020

I'll revert the mouse part, except the fix for middle wheel later the day

@olympus123
Copy link

olympus123 commented Mar 27, 2020

Thank you peak3d, if you find time please have a look if you can keep this behaviour for fixedlists only.
You have been right that fixedlists work so much better with your enhancements.
Keep up your amazing work.

@phunkyfish
Copy link
Contributor

phunkyfish commented Mar 29, 2020

Any luck in reverting the mouse part @peak3d? On OSX mouse can't be used to navigate left nav or tiled menus.

BTW, cursors work OK, so there is a workaround.

@peak3d peak3d mentioned this pull request Mar 29, 2020
7 tasks
Maven85 pushed a commit to Maven85/kodi that referenced this pull request May 5, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 3, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 5, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 7, 2020
* Disable MouseMove Select / fix middle wheel / stop inertial early
* Adjust gesture timing constants / respect DPI for inertial scrolling
fuzzard pushed a commit to fuzzard/xbmc that referenced this pull request Oct 30, 2020
@peak3d peak3d mentioned this pull request Oct 30, 2020
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Input Type: Fix non-breaking change which fixes an issue Type: Improvement non-breaking change which improves existing functionality v19 Matrix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants