-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cosmetic] suppresses gcc parenthesis warning. Thx @vdrfan
- Loading branch information
Voyager1
committed
Jun 29, 2013
1 parent
ba63695
commit c275bf3
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c275bf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a little more proper fix is to put the parentheses around the && part only (i.e. g_windowManager.GetActiveWindow() == WINDOW_DIALOG_VIDEO_OSD && (action.GetID() == ACTION_NEXT_ITEM ) instead of the rest of the || parts; because that's actually how the logic is evaluated. The two values on both sides of the && are evaluated first, then they're treated as a single value which will be OR'ed with the rest of the expression.
c275bf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then the logic would be wrong. We only want to fall into that block if the current window is full screen video, or if the current window is the video osd and one of those four actions.
c275bf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jowadmax that would be wrong. The old logic was player->OnAction only triggered by fullscreenvideo (unconditional), or by osd (with just those four actions). @t-nelson is correct, and with or without the parentheses (since logical "and" takes precedence in expression evaluation).
c275bf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Voyager1 this don't fix the issue with random channel switches on channel osd (verified in 13 alpha 5). After dialog initialization the control does not get the focus, because of an issue within the control state handling in the dialog class fixed in #2912. If the channel osd control get's the focus it works.
c275bf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case the problem was probably related to the fact that the windows (osd or fullscreen) still are getting a chance of handling the action. My first guess was that it was due to the unconditional delegation to player, now it looks as if it's because the windows in casu still go through their remaining OnAction code.
That being said, this has exposed another problem, which you obviously fixed.