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

GUI Notifications issue when debug logging is OFF #14583

Closed
piejanssens opened this issue Oct 11, 2018 · 13 comments
Closed

GUI Notifications issue when debug logging is OFF #14583

piejanssens opened this issue Oct 11, 2018 · 13 comments
Assignees
Labels
Milestone

Comments

@piejanssens
Copy link

I originally noticed an issue with the notifications when I was switching subtitles. I would expect to see the next subitlte language notification to appear immediatly on screen and be allowed to switch languages faster than the notifications appear and dissappear on screen. This is currently not the case.

I did a test with a key map that shows a very odd difference between debug logging ON and debug logging OFF.

When debug logging is OFF and you trigger multiple notifications in close succession it only shows the first (and sometimes the second), but not the others. When debug logging is turned ON the latest notification will be shown immediately and it cancels the previous one. This latest behavior is what I expect and also the only behavior that works for circulating through subtitle languages.

To Reproduce

Steps to reproduce the behavior:
Using latest Kodi Nightly e78d2d4:

  1. Set keymap for testing
<keymap>
	<global>
		<keyboard>
			<F1>Notification(Testing,#1)</F1>
			<F2>Notification(Testing,#2)</F2>
			<F3>Notification(Testing,#3)</F3>
			<F4>Notification(Testing,#4)</F4>
			<F5>Notification(Testing,#5)</F5>
		</keyboard>
	</global>
</keymap>
  1. Open Kodi
  2. Press 'F1', 'F2', 'F3', ... one after the other
  3. You can only see the first notification message
  4. Switch debug logging on
  5. Press 'F1', 'F2', 'F3', ... one after the other
  6. You can see the latest notification each time

I also have the impression that the reaction time of pressing the Fn key and the notification being shown on screen should be less to make it feel more responsive.

Debuglog

!!! This issue does not occur when debug logging is on!!!
The debuglog can be found here: kodi.log

@DaVukovic
Copy link
Member

DaVukovic commented Oct 11, 2018

I see the same behaviour on Linux (Ubuntu) as well. Just to mention that it's not a Windows-only problem.

@piejanssens
Copy link
Author

This issue does not occur on macOS.
So far it's confirmed on Windows and Linux (Ubuntu/OSMC).
I can't belief this hasn't been raised more often as it's really annoying not being able to see what language you are selecting when pressing 'next subtitle' and cycling through.

@YisraelV
Copy link

@piejanssens @DaVukovic are you sure it would be correct for the new notification to hide the previous one? what if they come from different sources? In other apps usually notifications stack in some way next to each other.

@piejanssens
Copy link
Author

piejanssens commented Dec 12, 2018

In case of subtitles the only correct scenario is that you see the language you switch to immediately. Right now I'm completely lost as soon as I press next subtitle, next subtitle I have no visual feedback and need to wait for the subtitle to appear on screen to see if it's the language I'm looking for or not.

One possible implementation would be to distinguish between notifications that are triggered by user input (these would go to the front of the queue and replace other notification of this type in case there is still one on screen) vs other (these queue up, each with their own screen time to shine).

@yol
Copy link
Member

yol commented Dec 19, 2018

@piejanssens How do you switch subtitles?

I can reproduce with the keymap example. But not with subtitles. When I press l to cycle through the subtitle streams, the notification always appears instantly regardless of debug setting.

@piejanssens
Copy link
Author

@pkerling I'm using a Harmony Hub connected via BT.
I'll test with a keyboard pressing l and report back.

@yol
Copy link
Member

yol commented Dec 19, 2018

nvm I think I have the issue, toasts have a queue and all but the redraw is missing when the text is short, so you see the first message all the time

@piejanssens
Copy link
Author

Awesome! I hope the fix is not to complicated.

yol pushed a commit that referenced this issue Dec 20, 2018
When the label text is updated but there is only one text and it is so
short that it does not scroll, `MarkDirtyRegion()` is never called.
The old text will then stay there and not get updated.

Fixes #14583
@yol
Copy link
Member

yol commented Dec 20, 2018

@piejanssens Please test #15097

@yol yol self-assigned this Dec 20, 2018
@piejanssens
Copy link
Author

@pkerling Happy to test, but where do I download the bins?
Couldn't find it in http://mirrors.kodi.tv/test-builds/ or Perkins

@yol
Copy link
Member

yol commented Dec 20, 2018

@piejanssens should be there now

@piejanssens
Copy link
Author

Fix is good.

@DaVukovic
Copy link
Member

@pkerling

I can confirm that the issue is fixed with your PR.

@yol yol added the Resolution: Fixed issue was resolved by a code change label Apr 30, 2020
@yol yol added this to the Leia 18.0-rc4 milestone Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants