[vlc-devel] [PATCH 1/7] player: No need to pass the item to vlc_player_input_RestoreMlStates

Pierre Lamot pierre at videolabs.io
Wed Jan 22 15:58:00 CET 2020


On 2020-01-22 14:12, Alexandre Janniaux wrote:
> Hi,
> 
> It seems this patchset breaks keyboard focus handling after leaving
> the player to get back to the browsing views. I'm not sure from where
> it comes though.

Hi,

yes, thanks for noticing

this was caused by the player forcing the focus to the control buttons 
when the dialog notify the notification
that it hides itself (wich was systematically raised when the media was 
stopping)

this can be fixed by sending the signal only when the dialog actually 
have the active focus.

I'll send an updated version to Hugo.

> Regards,
> --
> Alexandre Janniaux
> Videolabs
> 
> On Tue, Jan 21, 2020 at 04:17:58PM +0100, Hugo Beauzée-Luyssen wrote:
>> As it's already contained in the player input
>> ---
>>  src/player/input.c    | 2 +-
>>  src/player/medialib.c | 4 ++--
>>  src/player/player.h   | 3 +--
>>  3 files changed, 4 insertions(+), 5 deletions(-)
>> 
>> diff --git a/src/player/input.c b/src/player/input.c
>> index a4d8407e24..26e669007b 100644
>> --- a/src/player/input.c
>> +++ b/src/player/input.c
>> @@ -889,7 +889,7 @@ vlc_player_input_New(vlc_player_t *player, 
>> input_item_t *item)
>>          return NULL;
>>      }
>> 
>> -    vlc_player_input_RestoreMlStates(input, item);
>> +    vlc_player_input_RestoreMlStates(input);
>> 
>>      /* Initial sub/audio delay */
>>      const vlc_tick_t cat_delays[DATA_ES] = {
>> diff --git a/src/player/medialib.c b/src/player/medialib.c
>> index 27f51b6970..722f27bcd8 100644
>> --- a/src/player/medialib.c
>> +++ b/src/player/medialib.c
>> @@ -27,8 +27,7 @@
>>  #include "misc/variables.h"
>> 
>>  void
>> -vlc_player_input_RestoreMlStates(struct vlc_player_input* input,
>> -                                 const input_item_t* item)
>> +vlc_player_input_RestoreMlStates(struct vlc_player_input* input)
>>  {
>>      vlc_player_t* player = input->player;
>>      vlc_player_assert_locked(player);
>> @@ -36,6 +35,7 @@ vlc_player_input_RestoreMlStates(struct 
>> vlc_player_input* input,
>>      vlc_medialibrary_t* ml = vlc_ml_instance_get(input->player);
>>      if (!ml)
>>          return;
>> +    input_item_t* item = input_GetItem(input->thread);
>>      vlc_ml_media_t* media = vlc_ml_get_media_by_mrl( ml, 
>> item->psz_uri);
>>      if (!media || media->i_type != VLC_ML_MEDIA_TYPE_VIDEO)
>>          return;
>> diff --git a/src/player/player.h b/src/player/player.h
>> index 2bdda0c926..386fed1c5b 100644
>> --- a/src/player/player.h
>> +++ b/src/player/player.h
>> @@ -491,8 +491,7 @@ vlc_player_osd_Program(vlc_player_t *player, const 
>> char *name);
>>   */
>> 
>>  void
>> -vlc_player_input_RestoreMlStates(struct vlc_player_input* input,
>> -                                 const input_item_t* item);
>> +vlc_player_input_RestoreMlStates(struct vlc_player_input* input);
>> 
>>  void
>>  vlc_player_UpdateMLStates(vlc_player_t *player, struct 
>> vlc_player_input* input);
>> --
>> 2.20.1
>> 
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list