• Hans de Goede's avatar
    media-keys: Fix MprisController no longer working · 771fba73
    Hans de Goede authored
    Since commit e4297f2a ("media-keys: Use G_DECLARE_FINAL_TYPE for
    MprisController"), the MPRIS support in g-s-d no longer works.
    
    This is caused by the mpris_proxy_ready_cb changes, after the troublesome
    commit, the MprisController self pointer is retreived by
    the mpris_proxy_ready_cb like this:
    
          MprisController *self = MPRIS_CONTROLLER (object);
    
    But the object parameter to the GAsyncReadyCallback is the source object,
    which in this case is the just created GDBusProxy, not our MprisController
    object, leading to these warnings:
    
    gsd-media-keys[x]: invalid cast from 'GDBusProxy' to 'MprisController'
    
    Our MprisController is passed through the user_data pointer, so
    this commit fixes the code to use this instead.
    
    This fixes the warning and more importantly also makes the MPRIS support work
    again, since it now will now properly set self->mpris_client_proxy again.
    
    Fixes: #437
    771fba73
Name
Last commit
Last update
build-aux/ci Loading commit data...
data Loading commit data...
gnome-settings-daemon Loading commit data...
plugins Loading commit data...
po Loading commit data...
subprojects Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.gitmodules Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
ChangeLog Loading commit data...
MAINTAINERS Loading commit data...
NEWS Loading commit data...
README Loading commit data...
gnome-settings-daemon.doap Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...
meson_post_install.py Loading commit data...