From 7901013addca6abb7b4e6eff3a4397ef9f3a087d Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 17 Nov 2016 19:51:49 +0100 Subject: wacom: Detach of most responsibilities Settings for tablet devices are now managed by mutter, based on the gsettings-desktop-schemas peripherals schemas. This leaves the wacom plugin just in charge of: - Determining which output do display-attached tablets get. - Synchronizing LEDs/OLEDs to the right state, this will be triggered externally through the new SetGroupModeLED/SetOLEDLabels DBus methods. Everything else will be taken care of by mutter, both on Wayland and X11. https://bugzilla.gnome.org/show_bug.cgi?id=773958 --- plugins/wacom/Makefile.am | 126 +- plugins/wacom/README.config-storage | 60 - plugins/wacom/gsd-wacom-button-editor.c | 578 ------- plugins/wacom/gsd-wacom-button-editor.h | 68 - plugins/wacom/gsd-wacom-device.c | 2286 ------------------------- plugins/wacom/gsd-wacom-device.h | 202 --- plugins/wacom/gsd-wacom-key-shortcut-button.c | 634 ------- plugins/wacom/gsd-wacom-key-shortcut-button.h | 69 - plugins/wacom/gsd-wacom-manager.c | 1691 +----------------- plugins/wacom/gsd-wacom-oled.c | 58 +- plugins/wacom/gsd-wacom-oled.h | 3 +- plugins/wacom/gsd-wacom-osd-window.c | 2104 ----------------------- plugins/wacom/gsd-wacom-osd-window.h | 66 - plugins/wacom/list-wacom.c | 360 ---- plugins/wacom/tablet-layout.css | 39 - plugins/wacom/test-osd-window.c | 136 -- plugins/wacom/wacom.gresource.xml | 7 - 17 files changed, 130 insertions(+), 8357 deletions(-) delete mode 100644 plugins/wacom/README.config-storage delete mode 100644 plugins/wacom/gsd-wacom-button-editor.c delete mode 100644 plugins/wacom/gsd-wacom-button-editor.h delete mode 100644 plugins/wacom/gsd-wacom-device.c delete mode 100644 plugins/wacom/gsd-wacom-device.h delete mode 100644 plugins/wacom/gsd-wacom-key-shortcut-button.c delete mode 100644 plugins/wacom/gsd-wacom-key-shortcut-button.h delete mode 100644 plugins/wacom/gsd-wacom-osd-window.c delete mode 100644 plugins/wacom/gsd-wacom-osd-window.h delete mode 100644 plugins/wacom/list-wacom.c delete mode 100644 plugins/wacom/tablet-layout.css delete mode 100644 plugins/wacom/test-osd-window.c delete mode 100644 plugins/wacom/wacom.gresource.xml (limited to 'plugins/wacom') diff --git a/plugins/wacom/Makefile.am b/plugins/wacom/Makefile.am index 869ac3e7..7bf2e855 100644 --- a/plugins/wacom/Makefile.am +++ b/plugins/wacom/Makefile.am @@ -3,28 +3,17 @@ plugin_name = wacom org.gnome.settings-daemon.plugins.wacom.policy.in: org.gnome.settings-daemon.plugins.wacom.policy.in.in Makefile $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ -gsd-wacom-resources.c: wacom.gresource.xml tablet-layout.css - glib-compile-resources \ - --target=$@ \ - --sourcedir=$(srcdir) \ - --generate-source \ - --c-name gsd_wacom \ - $(srcdir)/wacom.gresource.xml - @INTLTOOL_POLICY_RULE@ polkit_policydir = $(datadir)/polkit-1/actions polkit_policy_in_files = org.gnome.settings-daemon.plugins.wacom.policy.in polkit_policy_DATA = $(polkit_policy_in_files:.policy.in=.policy) -# so it always gets included in the tarball -gsd_wacom_led_helper_SOURCES = gsd-wacom-led-helper.c -gsd_wacom_oled_helper_SOURCES = gsd-wacom-oled-helper.c gsd-wacom-oled-constants.h +EXTRA_DIST = wacom.gresource.xml -EXTRA_DIST = $(gsd_wacom_led_helper_SOURCES) wacom.gresource.xml tablet-layout.css \ - $(gsd_wacom_oled_helper_SOURCES) +libexec_PROGRAMS = gsd-wacom if HAVE_GUDEV -libexec_PROGRAMS = gsd-wacom-led-helper gsd-wacom-oled-helper +libexec_PROGRAMS += gsd-wacom-led-helper gsd-wacom-oled-helper gsd_wacom_led_helper_LDFLAGS = \ $(BACKLIGHT_HELPER_LIBS) \ @@ -45,98 +34,32 @@ endif EXTRA_DIST += org.gnome.settings-daemon.plugins.wacom.policy.in.in -libexec_PROGRAMS += gsd-wacom gsd-list-wacom gsd-test-wacom-osd - -gsd_wacom_SOURCES = \ - main.c \ - gsd-wacom-manager.c \ - gsd-wacom-manager.h \ - gsd-wacom-key-shortcut-button.h \ - gsd-wacom-key-shortcut-button.c \ - gsd-wacom-button-editor.h \ - gsd-wacom-button-editor.c \ - gsd-wacom-osd-window.h \ - gsd-wacom-osd-window.c \ - gsd-wacom-oled.h \ - gsd-wacom-oled.c \ - gsd-wacom-device.c \ - gsd-wacom-device.h \ - gsd-wacom-resources.c +gsd_wacom_SOURCES = \ + main.c \ + gsd-wacom-manager.c \ + gsd-wacom-manager.h \ + gsd-wacom-oled.h \ + gsd-wacom-oled.c gsd_wacom_CPPFLAGS = \ - -I$(top_srcdir)/data/ \ - -I$(top_srcdir)/gnome-settings-daemon \ - -I$(top_builddir)/gnome-settings-daemon \ - -I$(top_srcdir)/plugins/common \ - -DBINDIR=\"$(bindir)\" \ - -DPIXMAPDIR=\""$(pkgdatadir)"\" \ - -DGTKBUILDERDIR=\""$(pkgdatadir)"\" \ - -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \ - -DLIBEXECDIR=\""$(libexecdir)"\" - -gsd_wacom_CFLAGS = \ - $(PLUGIN_CFLAGS) \ - $(WACOM_CFLAGS) - -gsd_wacom_LDADD = \ - $(top_builddir)/gnome-settings-daemon/libgsd.la \ - $(top_builddir)/plugins/common/libcommon.la \ - $(WACOM_LIBS) \ - $(LIBM) - -gsd_list_wacom_SOURCES = \ - list-wacom.c \ - gsd-wacom-device.c \ - gsd-wacom-device.h - -gsd_list_wacom_CPPFLAGS = \ - -I$(top_srcdir)/data/ \ - -I$(top_srcdir)/gnome-settings-daemon \ - -I$(top_builddir)/gnome-settings-daemon \ - -I$(top_srcdir)/plugins/common \ - -DBINDIR=\"$(bindir)\" \ - -DPIXMAPDIR=\""$(pkgdatadir)"\" \ - -DGTKBUILDERDIR=\""$(pkgdatadir)"\" \ - -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" - -gsd_list_wacom_CFLAGS = $(WACOM_CFLAGS) - -gsd_list_wacom_LDADD = \ - $(top_builddir)/gnome-settings-daemon/libgsd.la \ - $(top_builddir)/plugins/common/libcommon.la \ - $(WACOM_LIBS) \ - $(LIBM) - -gsd_test_wacom_osd_SOURCES = \ - test-osd-window.c \ - gsd-wacom-key-shortcut-button.h \ - gsd-wacom-key-shortcut-button.c \ - gsd-wacom-button-editor.h \ - gsd-wacom-button-editor.c \ - gsd-wacom-osd-window.h \ - gsd-wacom-osd-window.c \ - gsd-wacom-device.c \ - gsd-wacom-device.h \ - gsd-wacom-resources.c - -gsd_test_wacom_osd_CPPFLAGS = \ - -I$(top_srcdir)/data/ \ - -I$(top_srcdir)/gnome-settings-daemon \ - -I$(top_builddir)/gnome-settings-daemon \ - -I$(top_srcdir)/plugins/common \ - -DBINDIR=\"$(bindir)\" \ - -DPIXMAPDIR=\""$(pkgdatadir)"\" \ - -DGTKBUILDERDIR=\""$(pkgdatadir)"\" \ - -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \ + -I$(top_srcdir)/data/ \ + -I$(top_srcdir)/gnome-settings-daemon \ + -I$(top_builddir)/gnome-settings-daemon \ + -I$(top_srcdir)/plugins/common \ + -DBINDIR=\"$(bindir)\" \ + -DPIXMAPDIR=\""$(pkgdatadir)"\" \ + -DGTKBUILDERDIR=\""$(pkgdatadir)"\" \ + -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" -gsd_test_wacom_osd_CFLAGS = \ +gsd_wacom_CFLAGS = \ + $(PLUGIN_CFLAGS) \ $(WACOM_CFLAGS) -gsd_test_wacom_osd_LDADD = \ - $(top_builddir)/gnome-settings-daemon/libgsd.la \ - $(top_builddir)/plugins/common/libcommon.la \ - $(WACOM_LIBS) \ +gsd_wacom_LDADD = \ + $(top_builddir)/gnome-settings-daemon/libgsd.la \ + $(top_builddir)/plugins/common/libcommon.la \ + $(WACOM_LIBS) \ $(LIBM) desktopdir = $(sysconfdir)/xdg/autostart @@ -146,9 +69,8 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) org.gnome.SettingsDaemon.Wacom.desktop: $(desktop_in_files) Makefile $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ -EXTRA_DIST += $(desktop_in_files) README.config-storage +EXTRA_DIST += $(desktop_in_files) CLEANFILES = \ $(desktop_DATA) \ - gsd-wacom-resources.c \ org.gnome.settings-daemon.plugins.wacom.policy \ org.gnome.settings-daemon.plugins.wacom.policy.in diff --git a/plugins/wacom/README.config-storage b/plugins/wacom/README.config-storage deleted file mode 100644 index bb99214b..00000000 --- a/plugins/wacom/README.config-storage +++ /dev/null @@ -1,60 +0,0 @@ -Configuration storage for Wacom tablets and styli - -Tablets -------- - -Configuration is stored on a per-device model basis, meaning that it's -possible to use the same device, with same configuration on 2 machines -with a shared home directory, or replace a malfunctioning device with the -same model and have the same configuration. - -It does not allow [1] having 2 separate tablets of the same model to have -different configurations, whether on a single machine, or using a shared -home directory. - -The configuration scheme is: -schema: org.gnome.settings-daemon.peripherals.wacom -path: /org/gnome/settings-daemon/peripherals/wacom/-/ - -where is the D-Bus machine-id for the machine, and - is a unique identifier for the tablet model. - -[1]: If you're using NFS shared home directories, you can share configurations -between different machines by creating an empty -~/.config/gnome-settings-daemon/no-per-machine-config file. -$ mkdir -p ~/.config/gnome-settings-daemon/ -$ touch ~/.config/gnome-settings-daemon/no-per-machine-config - -Note that this needs to happen without any gnome-settings-daemon -running (otherwise half of the configuration would be done in a per-machine -way and half in a generic way), and that previous machine-specific -configurations will be lost. - -Stylus ------- - -Styli use a similar configuration scheme. The identifier for each stylus -is the tool ID, for professional ranges, and a generic identifier for -the consumer ranges that do not support tool ID. - -schema: org.gnome.settings-daemon.peripherals.wacom.stylus -or: org.gnome.settings-daemon.peripherals.wacom.eraser - -path: /org/gnome/settings-daemon/peripherals/wacom/// - -So each tool can be configured per tablet (so the compatible airbrush stylus -will have different configurations on a Cintiq and an Intuos tablet) - -Buttons -------- - -schema: org.gnome.settings-daemon.peripherals.wacom.tablet-button -path: /org/gnome/settings-daemon/peripherals/wacom//