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

[Estuary] fix loss of focus and navigation on the Home screen #13356

Merged
merged 1 commit into from
Jan 14, 2018

Conversation

Voyager1
Copy link

Description

This fixes a rare issue that seems to occur with Estuary, on the home screen.
Sometimes, when returning to the home screen, apparently no control has focus anymore and keyboard or remote control navigation doesn't work anymore. One can still "hear" the clicks but no visible response...

Motivation and Context

The issue is that some button (that is invisible), part of the TopBar, gets the focus and performs no function. Arrow keys aren't able to jump out of the topbar and the (invisible) button stays focused. The button doesn't seem to have a function either. Without mouse controls it's impossible to navigate the UI from that point on.

It's easy to reproduce this problem if you have a keyboard that has a "internet homepage" key: when in the homescreen, press the keyboard key "internet homepage" and watch the focus go away. Try to navigate, nothing works anymore.

The solution was to remove this control, because it doesn't serve any apparent function.

How Has This Been Tested?

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the Code guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my change
  • All new and existing tests passed

@Voyager1 Voyager1 added Type: Fix non-breaking change which fixes an issue v18 Leia labels Jan 13, 2018
@phil65
Copy link
Contributor

phil65 commented Jan 14, 2018

That invisible button is useful for touch control (allows going back via tapping in top-left corner)
What happens internally when pressing the "internet homepage" key?

EDIT: I guess it´s one of these two?
https://github.com/xbmc/xbmc/blob/master/system/keymaps/keyboard.xml#L120-L121

@Voyager1
Copy link
Author

Debug Print: CInputManager::HandleKey: 0 (0xf200, obc-61697) pressed, action is
Debugging leads to resolution of action ID=159 (FirstPage)
GUIBaseContainer.cpp:375 SelectItem(0)
...
the next time, the focused control is this (invisible) button and navigation using arrow keys has no effect.

@Voyager1
Copy link
Author

Voyager1 commented Jan 14, 2018

@phil65 - I think I have found a bug in Application that may be the root cause of this:
https://github.com/xbmc/xbmc/blob/master/xbmc/Application.cpp#L326
break; statement is missing which causes the setfocus to be called when that's not what we want. Putting a break there also seems to fix the issue...
I'll do some more testing and then PR that one instead...

@phil65
Copy link
Contributor

phil65 commented Jan 14, 2018

cool, thx.
If that doesnt work out, you can try adding <visible>!Window.IsActive(home)</visible> to that button control instead of removing it.

@Voyager1
Copy link
Author

@phil65 - the code fix in #13359 fixes the issue indeed, however, with mouse controls enabled, I can still reproduce the issue in the following way: Home screen, mouse click on top left corner, try navigating with cursor keys...
Then I tried to add the <visible> tag as per your suggestion, and that fixes the issue completely. I'll update this PR with that commit.

@Voyager1
Copy link
Author

@phil65 updated and tested.

@Voyager1 Voyager1 merged commit cbd6f1b into xbmc:master Jan 14, 2018
@Voyager1 Voyager1 deleted the fix_estuary_lostfocus branch January 14, 2018 13:48
@Rechi Rechi added this to the L 18.0-alpha1 milestone Jan 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Fix non-breaking change which fixes an issue v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants