summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/builds.yml2
-rw-r--r--configure.ac2
-rw-r--r--plugins/xrandr/msd-xrandr-manager.c34
3 files changed, 36 insertions, 2 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml
index 01b3ba8..c549b72 100644
--- a/.github/workflows/builds.yml
+++ b/.github/workflows/builds.yml
@@ -15,7 +15,7 @@ concurrency:
cancel-in-progress: true
env:
- MATE_DESKTOP_VERSION: 1.28.2
+ MATE_DESKTOP_VERSION: 1.29.0
CACHE_PATH: /tmp/.cache
jobs:
diff --git a/configure.ac b/configure.ac
index 48c2865..92866a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,7 +55,7 @@ dnl ---------------------------------------------------------------------------
GLIB_REQUIRED_VERSION=2.58.0
GIO_REQUIRED_VERSION=2.50.0
GTK_REQUIRED_VERSION=3.22.0
-MATE_DESKTOP_REQUIRED_VERSION=1.27.1
+MATE_DESKTOP_REQUIRED_VERSION=1.29.0
LIBMATEKBD_REQUIRED_VERSION=1.17.0
LIBNOTIFY_REQUIRED_VERSION=0.7.0
LIBATSPI_REQUIRED_VERSION=2.0
diff --git a/plugins/xrandr/msd-xrandr-manager.c b/plugins/xrandr/msd-xrandr-manager.c
index 78e538f..4402fd9 100644
--- a/plugins/xrandr/msd-xrandr-manager.c
+++ b/plugins/xrandr/msd-xrandr-manager.c
@@ -1572,6 +1572,22 @@ apply_color_profiles (void)
}
}
+static gboolean
+has_hotplug_mode_update (MateRRScreen *screen)
+{
+ MateRROutput **outputs;
+ int i;
+
+ outputs = mate_rr_screen_list_outputs (screen);
+
+ for (i = 0; outputs[i] != NULL; i++) {
+ if (mate_rr_output_get_hotplug_mode_update (outputs[i]))
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static void
on_randr_event (MateRRScreen *screen, gpointer data)
{
@@ -1600,6 +1616,24 @@ on_randr_event (MateRRScreen *screen, gpointer data)
*/
show_timestamps_dialog (manager, "ignoring since change > config");
log_msg (" Ignoring event since change >= config\n");
+ } else if (has_hotplug_mode_update (screen)) {
+ /* An output has the hotplug_mode_update property, which
+ * means that the driver is requesting that the desktop
+ * environment apply a new preferred mode on hotplug events
+ * to handle dynamic guest resizing (e.g. SPICE/QXL in VMs).
+ *
+ * In this case, always auto-configure to use the new
+ * preferred mode rather than applying stored configurations.
+ */
+
+ show_timestamps_dialog (manager, "hotplug_mode_update detected, auto-configuring");
+
+ if (config_timestamp != priv->last_config_timestamp) {
+ priv->last_config_timestamp = config_timestamp;
+ auto_configure_outputs (manager, config_timestamp);
+ log_msg (" Automatically configured outputs for hotplug_mode_update\n");
+ } else
+ log_msg (" Ignored hotplug_mode_update event as timestamps are the same\n");
} else {
/* Here, config_timestamp > change_timestamp. This means that
* the screen got reconfigured because of hotplug/unplug; the X