Skip to content

Implement DBus interfaces for KeyGrabbing (org.gnome.Shell.xml)

Evangelos Ribeiro Tzaras requested to merge devrtz/phosh:dbus_keygrabbing into master

This MR aims to close #98 (closed).

@guido.gunther has given me some tips:

since i'm not 100% certain the way via #98 (closed) works it may be good to start on the phosh side implementing the DBus API towards g-s-d, (you can just insert fake events there as a test) and if that works work upwards toward the compositor. Basically what you want is to send out DBus events so that this is triggered in g-s-d: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/blob/master/plugins/media-keys/gsd-media-keys-manager.c#L1592

thinking about this for a moment: the main reason for going via gnome-settings-daemon is that this gives the on-screen-display (OSD) when pressing the buttons but only if we implement #33 (closed) as well. So we could also take a shortcut: just forward the vol_up/vol_down events from the compositor to the shell and then reuse the gvc we already have in the shell for the time being to change the volume: https://source.puri.sm/Librem5/phosh/-/blob/master/src/settings.c#L117 . This would cut the problem into nicer chunks: a) forwarding vol_up/vol_down from compositor (phoc) to the shell (phosh), wire that to the already existing volume slider in phosh and already have something working. b) iterate on that by implementing the OSD and Mediakeys interface to interface with gnome-settings-daemon to make it perfect

ToDos:

  • add and implement relevant interface bits from org.gnome.Shell.xml (GrabAccelerator, AcceleratorActivated and friends)
Edited by Evangelos Ribeiro Tzaras

Merge request reports