mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
44 stars 46 forks source link

mpris: Use namespace instead of a whitelist for player names #318

Closed rbuj closed 4 years ago

rbuj commented 4 years ago

Closes #317

paravoid commented 4 years ago

Wow, that was fast. Thanks so much!

This addresses #300 too, right?

rbuj commented 4 years ago

Wow, that was fast. Thanks so much!

This addresses #300 too, right?

Yes.

VirtualBox_11 Fedora Rawhide_16_04_2020_12_25_04

sc0w commented 4 years ago

New warnings:

msd-mpris-manager.c:306:64: warning: passing argument 3 of 'bus_watch_namespace' from incompatible pointer type [-Wincompatible-pointer-types]
  306 |                                                                mp_name_appeared,
      |                                                                ^~~~~~~~~~~~~~~~
      |                                                                |
      |                                                                void (*)(GDBusConnection *, const gchar *, const gchar *, MsdMprisManager *) {aka void (*)(struct _GDBusConnection *, const char *, const char *, struct <anonymous> *)}
In file included from msd-mpris-manager.c:47:
bus-watch-namespace.h:27:68: note: expected 'GBusNameAppearedCallback' {aka 'void (*)(struct _GDBusConnection *, const char *, const char *, void *)'} but argument is of type 'void (*)(GDBusConnection *, const gchar *, const gchar *, MsdMprisManager *)' {aka 'void (*)(struct _GDBusConnection *, const char *, const char *, struct <anonymous> *)'}
   27 |                                          GBusNameAppearedCallback  appeared_handler,
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

msd-mpris-manager.c:307:64: warning: passing argument 4 of 'bus_watch_namespace' from incompatible pointer type [-Wincompatible-pointer-types]
  307 |                                                                mp_name_vanished,
      |                                                                ^~~~~~~~~~~~~~~~
      |                                                                |
      |                                                                void (*)(GDBusConnection *, const gchar *, MsdMprisManager *) {aka void (*)(struct _GDBusConnection *, const char *, struct <anonymous> *)}
In file included from msd-mpris-manager.c:47:
bus-watch-namespace.h:28:68: note: expected 'GBusNameVanishedCallback' {aka 'void (*)(struct _GDBusConnection *, const char *, void *)'} but argument is of type 'void (*)(GDBusConnection *, const gchar *, MsdMprisManager *)' {aka 'void (*)(struct _GDBusConnection *, const char *, struct <anonymous> *)'}
   28 |                                          GBusNameVanishedCallback  vanished_handler,
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
rbuj commented 4 years ago

@sc0w I think it's fixed now.

raveit65 commented 4 years ago

Same with using terminal commands

[rave@mother ~]$ echo KeyStrPress XF86AudioStop KeyStrRelease XF86AudioStop | xmacroplay $DISPLAY
XTest for server ":0" is version 2.2.

KeyStrPress: XF86AudioStop
KeyStrRelease: XF86AudioStop
Unknown tag: XF86AudioStop
xmacroplay: pointer and keyboard released. 
[rave@mother ~]$ echo KeyStrPress XF86AudioPlay KeyStrRelease XF86AudioPlay | xmacroplay $DISPLAY
XTest for server ":0" is version 2.2.

KeyStrPress: XF86AudioPlay
KeyStrRelease: XF86AudioPlay
Unknown tag: XF86AudioPlay
xmacroplay: pointer and keyboard released. 
[rave@mother ~]$ 

First command stops the playing video in chrome, but second command do not start the video again. Using only play and pause works fine.

[rave@mother ~]$ echo KeyStrPress XF86AudioPause KeyStrRelease XF86AudioPause | xmacroplay $DISPLAY
XTest for server ":0" is version 2.2.

KeyStrPress: XF86AudioPause
KeyStrRelease: XF86AudioPause
Unknown tag: XF86AudioPause
xmacroplay: pointer and keyboard released. 
[rave@mother ~]$ echo KeyStrPress XF86AudioPlay KeyStrRelease XF86AudioPlay | xmacroplay $DISPLAY
XTest for server ":0" is version 2.2.

KeyStrPress: XF86AudioPlay
KeyStrRelease: XF86AudioPlay
Unknown tag: XF86AudioPlay
xmacroplay: pointer and keyboard released. 
[rave@mother ~]$
raveit65 commented 4 years ago

@sc0w Is your concern resolved now? Do you you like to approve it?

raveit65 commented 4 years ago

@rbuj This is from https://bugzilla.gnome.org/show_bug.cgi?id=697810 , right? Do we need the second commit?

rbuj commented 4 years ago

@raveit65 It's not based on bug 697810, which added files below, among other changes:

I tested it with spotify and it worked too.

raveit65 commented 4 years ago

With firefox in f32 it is working now :)

raveit65 commented 4 years ago

I consider this as a bugfix and will cherry-pick it to 1.24.