summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS39
-rw-r--r--configure.ac33
-rw-r--r--data/org.mate.peripherals-mouse.gschema.xml.in5
-rw-r--r--plugins/mouse/msd-mouse-manager.c78
-rw-r--r--plugins/wlrandr/msd-wlrandr-manager.c23
5 files changed, 164 insertions, 14 deletions
diff --git a/NEWS b/NEWS
index db159ea..aaf2c97 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,42 @@
+### mate-settings-daemon 1.29.1
+
+ * background: don't initialize alpha channel
+ * wayland/background: respect show-desktop-icons setting
+ * fix wayland-protocols path
+ * ci: add wayland related packages
+ * Remove dead code
+ * wlrandr: persist the applied configuration instead of a live snapshot
+ * clipboard: adjust offer timeout
+ * xsettings: flush Xlib output so settings reach X11/XWayland clients
+ * Remove dead code
+ * xsettings: flush Xlib output so settings reach X11/XWayland clients
+ * wlrandr: expose configuration over D-Bus for the display capplet
+ * Add wlrandr plugin
+ * Respect fade effect settings and fix redraw at resolution changes
+ * background: port to wayland via gtk-layer-shell
+ * clipboard-manager: add Wayland support
+ * Initial Wayland support
+ * Translated using Weblate (Greek)
+ * Translated using Weblate (Kabyle)
+ * Translated using Weblate (Russian)
+ * Translated using Weblate (Georgian)
+ * Translated using Weblate (Korean)
+ * Translated using Weblate (Occitan)
+ * build (deps) bump actions/checkout from 6 to 7
+ * build (deps) bump actions/cache from 5 to 76
+ * xrandr: Handle hotplug_mode_update for VM guest resizing
+ * background: simplify desktop detection to use EWMH standard
+ * correcting po with errors
+ * remove empty po file
+ * add translation coverage badge
+ * retrieve last transifex translations
+ * Revert "Retrieve last transifex translations"
+ * Retrieve last transifex translations
+ * build(deps): bump actions/checkout from 5 to 6
+ * ci: migrate from Travis CI to GitHub Actions
+ * fix memleak
+
+
### mate-settings-daemon 1.29.0
* xsettings: Remove HiDPI scale change workaround
diff --git a/configure.ac b/configure.ac
index 9272e34..911a8bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ([2.60])
m4_define([msd_api_version_major],[1])
m4_define([msd_api_version_minor],[29])
-m4_define([msd_api_version_micro],[0])
+m4_define([msd_api_version_micro],[1])
m4_define([msd_api_version],
[msd_api_version_major.msd_api_version_minor.msd_api_version_micro])
@@ -83,6 +83,28 @@ esac
AC_SUBST([MSD_PLUGIN_LDFLAGS])
dnl ---------------------------------------------------------------------------
+dnl - Ayatana AppIndicator
+dnl ---------------------------------------------------------------------------
+
+AC_ARG_ENABLE(appindicator,
+ AS_HELP_STRING([--enable-appindicator], [Enable ayatana appindicator support (default: auto)]),
+ [case "${enableval}" in
+ yes|no|auto) enable_appindicator=${enableval} ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-appindicator) ;;
+ esac],
+ enable_appindicator=auto)
+
+have_appindicator=no
+if test "x${enable_appindicator}" != "xno"; then
+ PKG_CHECK_MODULES(APPINDICATOR, ayatana-appindicator3-0.1,
+ [have_appindicator=yes
+ AC_DEFINE(HAVE_APP_INDICATOR, 1, [Define if ayatana appindicator support is enabled])],
+ [if test "x${enable_appindicator}" = "xyes"; then
+ AC_MSG_ERROR([Ayatana appindicator support requested but ayatana-appindicator3-0.1 not found])
+ fi])
+fi
+
+dnl ---------------------------------------------------------------------------
dnl - Wayland
dnl ---------------------------------------------------------------------------
@@ -126,17 +148,11 @@ if test "x${enable_wayland}" != "xno"; then
fi
if test "x${have_wayland}" = "xyes"; then
- PKG_CHECK_MODULES(APPINDICATOR, ayatana-appindicator3-0.1,
- [have_wayland=yes],
- [have_wayland=no])
- fi
-
- if test "x${have_wayland}" = "xyes"; then
AC_DEFINE(HAVE_WAYLAND, 1, [Define if Wayland support is enabled])
fi
if test "x${have_wayland}" = "xno" -a "x${enable_wayland}" = "xyes"; then
- AC_MSG_ERROR([Wayland support requested but the required Wayland libraries (GTK+ Wayland backend, wayland-client, wayland-protocols, gtk-layer-shell or ayatana-appindicator) are missing])
+ AC_MSG_ERROR([Wayland support requested but the required Wayland libraries (GTK+ Wayland backend, wayland-client, wayland-protocols or gtk-layer-shell) are missing])
fi
fi
AM_CONDITIONAL(BUILD_WAYLAND, test "x${have_wayland}" = "xyes")
@@ -559,6 +575,7 @@ Configure summary:
Libmatemixer support ....: ${have_libmatemixer}
Smartcard support .......: ${have_smartcard_support}
RFKill support ..........: ${enable_rfkill}
+ Appindicator support ....: ${have_appindicator}
Wayland support .........: ${have_wayland}
Wayland protocols dir ...: ${WAYLAND_PROTOCOLS_DATADIR}
${NSS_DATABASE:+\
diff --git a/data/org.mate.peripherals-mouse.gschema.xml.in b/data/org.mate.peripherals-mouse.gschema.xml.in
index 87b4bc2..b36cbd8 100644
--- a/data/org.mate.peripherals-mouse.gschema.xml.in
+++ b/data/org.mate.peripherals-mouse.gschema.xml.in
@@ -10,6 +10,11 @@
<summary>Mouse button orientation</summary>
<description>Swap left and right mouse buttons for left-handed mice.</description>
</key>
+ <key name="natural-scroll" type="b">
+ <default>false</default>
+ <summary>Natural scrolling</summary>
+ <description>Set this to true to enable natural (reverse) scrolling for mice</description>
+ </key>
<key name="motion-acceleration" type="d">
<default>-1</default>
<summary>Motion Acceleration</summary>
diff --git a/plugins/mouse/msd-mouse-manager.c b/plugins/mouse/msd-mouse-manager.c
index fb4c35c..a79fd09 100644
--- a/plugins/mouse/msd-mouse-manager.c
+++ b/plugins/mouse/msd-mouse-manager.c
@@ -60,6 +60,7 @@
/* Mouse settings */
#define MATE_MOUSE_SCHEMA "org.mate.peripherals-mouse"
#define KEY_MOUSE_LOCATE_POINTER "locate-pointer"
+#define KEY_MOUSE_NATURAL_SCROLL "natural-scroll"
#define KEY_MIDDLE_BUTTON_EMULATION "middle-button-enabled"
/* Touchpad settings */
@@ -1391,8 +1392,8 @@ set_natural_scroll_libinput (XDeviceInfo *device_info,
}
static void
-set_natural_scroll (XDeviceInfo *device_info,
- gboolean natural_scroll)
+set_touchpad_natural_scroll (XDeviceInfo *device_info,
+ gboolean natural_scroll)
{
if (property_from_name ("Synaptics Scrolling Distance"))
set_natural_scroll_synaptics (device_info, natural_scroll);
@@ -1402,7 +1403,7 @@ set_natural_scroll (XDeviceInfo *device_info,
}
static void
-set_natural_scroll_all (MsdMouseManager *manager)
+set_touchpad_natural_scroll_all (MsdMouseManager *manager)
{
int numdevices, i;
XDeviceInfo *devicelist = XListInputDevices (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &numdevices);
@@ -1413,7 +1414,69 @@ set_natural_scroll_all (MsdMouseManager *manager)
gboolean natural_scroll = g_settings_get_boolean (manager->priv->settings_touchpad, KEY_TOUCHPAD_NATURAL_SCROLL);
for (i = 0; i < numdevices; i++) {
- set_natural_scroll (&devicelist[i], natural_scroll);
+ set_touchpad_natural_scroll (&devicelist[i], natural_scroll);
+ }
+
+ XFreeDeviceList (devicelist);
+}
+
+static void
+mouse_set_bool (XDeviceInfo *device_info,
+ const char *property_name,
+ int property_index,
+ gboolean enabled)
+{
+ XDevice *device;
+ GdkDisplay *display;
+
+ display = gdk_display_get_default ();
+
+ device = device_is_touchpad (device_info);
+ if (device != NULL) {
+ XCloseDevice (GDK_DISPLAY_XDISPLAY (display), device);
+ return;
+ }
+
+ if ((device_info->use == IsXPointer) ||
+ (device_info->use == IsXKeyboard) ||
+ (!xinput_device_has_buttons (device_info)))
+ return;
+
+ gdk_x11_display_error_trap_push (display);
+ device = XOpenDevice (GDK_DISPLAY_XDISPLAY (display), device_info->id);
+ if ((gdk_x11_display_error_trap_pop (display) != 0) || (device == NULL))
+ return;
+
+ property_set_bool (device_info, device, property_name, property_index, enabled);
+
+ gdk_x11_display_error_trap_push (display);
+ XCloseDevice (GDK_DISPLAY_XDISPLAY (display), device);
+ gdk_x11_display_error_trap_pop_ignored (display);
+}
+
+static void
+set_mouse_natural_scroll (XDeviceInfo *device_info,
+ gboolean natural_scroll)
+{
+ g_debug ("Trying to set %s for \"%s\"", natural_scroll ? "natural (reverse) scroll" : "normal scroll", device_info->name);
+
+ mouse_set_bool (device_info, "libinput Natural Scrolling Enabled", 0, natural_scroll);
+ mouse_set_bool (device_info, "Evdev Wheel Inversion", 0, natural_scroll);
+}
+
+static void
+set_mouse_natural_scroll_all (MsdMouseManager *manager)
+{
+ int numdevices, i;
+ XDeviceInfo *devicelist = XListInputDevices (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &numdevices);
+
+ if (devicelist == NULL)
+ return;
+
+ gboolean natural_scroll = g_settings_get_boolean (manager->priv->settings_mouse, KEY_MOUSE_NATURAL_SCROLL);
+
+ for (i = 0; i < numdevices; i++) {
+ set_mouse_natural_scroll (&devicelist[i], natural_scroll);
}
XFreeDeviceList (devicelist);
@@ -1679,7 +1742,8 @@ set_mouse_settings (MsdMouseManager *manager)
set_tap_to_click_all (manager);
set_click_actions_all (manager);
set_scrolling_all (manager->priv->settings_touchpad);
- set_natural_scroll_all (manager);
+ set_touchpad_natural_scroll_all (manager);
+ set_mouse_natural_scroll_all (manager);
set_touchpad_enabled_all (g_settings_get_boolean (manager->priv->settings_touchpad, KEY_TOUCHPAD_ENABLED));
set_accel_profile_all (manager);
}
@@ -1700,6 +1764,8 @@ mouse_callback (GSettings *settings,
set_accel_profile_all (manager);
} else if (g_strcmp0 (key, KEY_MIDDLE_BUTTON_EMULATION) == 0) {
set_middle_button_all (g_settings_get_boolean (settings, key));
+ } else if (g_strcmp0 (key, KEY_MOUSE_NATURAL_SCROLL) == 0) {
+ set_mouse_natural_scroll_all (manager);
} else if (g_strcmp0 (key, KEY_MOUSE_LOCATE_POINTER) == 0) {
set_locate_pointer (manager, g_settings_get_boolean (settings, key));
#if 0 /* FIXME need to fork (?) mousetweaks for this to work */
@@ -1741,7 +1807,7 @@ touchpad_callback (GSettings *settings,
|| (g_strcmp0 (key, KEY_HORIZ_TWO_FINGER_SCROLL) == 0)) {
set_scrolling_all (manager->priv->settings_touchpad);
} else if (g_strcmp0 (key, KEY_TOUCHPAD_NATURAL_SCROLL) == 0) {
- set_natural_scroll_all (manager);
+ set_touchpad_natural_scroll_all (manager);
} else if (g_strcmp0 (key, KEY_TOUCHPAD_ENABLED) == 0) {
set_touchpad_enabled_all (g_settings_get_boolean (settings, key));
} else if ((g_strcmp0 (key, KEY_MOTION_ACCELERATION) == 0)
diff --git a/plugins/wlrandr/msd-wlrandr-manager.c b/plugins/wlrandr/msd-wlrandr-manager.c
index 7258d78..7240ae8 100644
--- a/plugins/wlrandr/msd-wlrandr-manager.c
+++ b/plugins/wlrandr/msd-wlrandr-manager.c
@@ -32,7 +32,9 @@
#define MATE_DESKTOP_USE_UNSTABLE_API
#include <libmate-desktop/mate-desktop-utils.h>
+#ifdef HAVE_APP_INDICATOR
#include <libayatana-appindicator/app-indicator.h>
+#endif
#include <wayland-client.h>
#include "wlr-output-management-unstable-v1-client-protocol.h"
@@ -161,7 +163,9 @@ struct MsdWlrandrManagerPrivate {
gboolean initial_config_applied;
struct zwlr_output_configuration_v1 *pending_config;
gboolean probing;
+#ifdef HAVE_APP_INDICATOR
AppIndicator *indicator;
+#endif
GtkWidget *menu;
GtkWidget *confirm_dialog;
guint icon_changed_id;
@@ -2659,8 +2663,13 @@ rebuild_menu (MsdWlrandrManager *manager)
GtkWidget *menu;
GList *l;
+#ifndef HAVE_APP_INDICATOR
+ /* there is no tray icon to attach the menu to */
+ return;
+#else
if (priv->indicator == NULL)
return;
+#endif
menu = gtk_menu_new ();
@@ -2684,7 +2693,9 @@ rebuild_menu (MsdWlrandrManager *manager)
gtk_widget_destroy (priv->menu);
priv->menu = menu;
+#ifdef HAVE_APP_INDICATOR
app_indicator_set_menu (priv->indicator, GTK_MENU (menu));
+#endif
}
/* ------------------------------------------------------------------ *
@@ -2697,10 +2708,14 @@ start_or_stop_icon (MsdWlrandrManager *manager)
gboolean show = g_settings_get_boolean (manager->priv->settings, CONF_KEY_SHOW_NOTIFICATION_ICON);
if (show) {
+#ifdef HAVE_APP_INDICATOR
app_indicator_set_status (manager->priv->indicator, APP_INDICATOR_STATUS_ACTIVE);
+#endif
rebuild_menu (manager);
} else {
+#ifdef HAVE_APP_INDICATOR
app_indicator_set_status (manager->priv->indicator, APP_INDICATOR_STATUS_PASSIVE);
+#endif
}
}
@@ -2755,8 +2770,10 @@ msd_wlrandr_manager_finalize (GObject *object)
g_object_unref (priv->settings);
}
+#ifdef HAVE_APP_INDICATOR
if (priv->indicator != NULL)
g_object_unref (priv->indicator);
+#endif
if (priv->menu != NULL)
gtk_widget_destroy (priv->menu);
if (priv->confirm_dialog != NULL)
@@ -2833,14 +2850,18 @@ msd_wlrandr_manager_start (MsdWlrandrManager *manager, GError **error)
wl_registry_add_listener (priv->registry, &registry_listener, manager);
wl_display_flush (priv->display);
+#ifdef HAVE_APP_INDICATOR
priv->indicator = app_indicator_new ("org.mate.settingsdaemon.wlrandr",
MSD_WLRANDR_ICON_NAME,
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
app_indicator_set_title (priv->indicator, _("Configure display settings"));
+#endif
icon_settings = g_settings_new ("org.mate.interface");
+#ifdef HAVE_APP_INDICATOR
if (g_settings_get_boolean (icon_settings, "menus-have-icons"))
app_indicator_set_icon_theme_path (priv->indicator, NULL);
+#endif
g_object_unref (icon_settings);
priv->icon_changed_id = g_signal_connect (priv->settings, "changed::" CONF_KEY_SHOW_NOTIFICATION_ICON,
@@ -2906,11 +2927,13 @@ msd_wlrandr_manager_stop (MsdWlrandrManager *manager)
priv->settings = NULL;
}
+#ifdef HAVE_APP_INDICATOR
if (priv->indicator != NULL) {
app_indicator_set_status (priv->indicator, APP_INDICATOR_STATUS_PASSIVE);
g_object_unref (priv->indicator);
priv->indicator = NULL;
}
+#endif
if (priv->menu != NULL) {
gtk_widget_destroy (priv->menu);