|
1
|
+From f6254cafe0920ecc8e3d96becbd83d297cb158c4 Mon Sep 17 00:00:00 2001
|
|
2
|
+From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
3
|
+Date: Wed, 18 Dec 2019 09:11:12 +0100
|
|
4
|
+Subject: [PATCH] RDA: Don't apply stored monitor configuration if session is
|
|
5
|
+ remote.
|
|
6
|
+
|
|
7
|
+---
|
|
8
|
+ configure.ac | 11 +++++++++++
|
|
9
|
+ plugins/xrandr/Makefile.am | 2 ++
|
|
10
|
+ plugins/xrandr/msd-xrandr-manager.c | 10 ++++++++++
|
|
11
|
+ 3 files changed, 23 insertions(+)
|
|
12
|
+
|
|
13
|
+--- a/configure.ac
|
|
14
|
++++ b/configure.ac
|
|
15
|
+@@ -58,6 +58,7 @@
|
|
16
|
+ LIBMATEKBD_REQUIRED_VERSION=1.17.0
|
|
17
|
+ LIBNOTIFY_REQUIRED_VERSION=0.7.0
|
|
18
|
+ LIBMATEMIXER_REQUIRED_VERSION=1.10.0
|
|
19
|
++RDA_REQUIRED_VERSION=0.0.3
|
|
20
|
+
|
|
21
|
+ EXTRA_COMPILE_WARNINGS(yes)
|
|
22
|
+
|
|
23
|
+@@ -365,6 +366,15 @@
|
|
24
|
+ AM_CONDITIONAL(BUILD_RFKILL, [test x"$enable_rfkill" = x"yes"])
|
|
25
|
+
|
|
26
|
+ # ---------------------------------------------------------------------------
|
|
27
|
++# - Check if Remote Desktop Awareness support is available
|
|
28
|
++# ---------------------------------------------------------------------------
|
|
29
|
++
|
|
30
|
++PKG_CHECK_MODULES(RDA, rda >= $RDA_REQUIRED_VERSION, have_rda=yes, have_rda=no)
|
|
31
|
++if test "x$have_rda" = "xyes"; then
|
|
32
|
++ AC_DEFINE(HAVE_RDA, 1, [Have the Remote Desktop Awareness library])
|
|
33
|
++fi
|
|
34
|
++
|
|
35
|
++# ---------------------------------------------------------------------------
|
|
36
|
+ # Enable Profiling
|
|
37
|
+ # ---------------------------------------------------------------------------
|
|
38
|
+ AC_ARG_ENABLE(profiling,
|
|
39
|
+@@ -537,4 +547,5 @@
|
|
40
|
+ System nssdb: ${NSS_DATABASE}
|
|
41
|
+ }\
|
|
42
|
+ Profiling support: ${enable_profiling}
|
|
43
|
++ RD awareness: ${have_rda}
|
|
44
|
+ "
|
|
45
|
+--- a/plugins/xrandr/Makefile.am
|
|
46
|
++++ b/plugins/xrandr/Makefile.am
|
|
47
|
+@@ -55,6 +55,7 @@
|
|
48
|
+ libxrandr_la_CFLAGS = \
|
|
49
|
+ $(SETTINGS_PLUGIN_CFLAGS) \
|
|
50
|
+ $(LIBNOTIFY_CFLAGS) \
|
|
51
|
++ $(RDA_CFLAGS) \
|
|
52
|
+ $(MATE_DESKTOP_CFLAGS) \
|
|
53
|
+ $(AM_CFLAGS)
|
|
54
|
+
|
|
55
|
+@@ -64,6 +65,7 @@
|
|
56
|
+ libxrandr_la_LIBADD = \
|
|
57
|
+ $(SETTINGS_PLUGIN_LIBS) \
|
|
58
|
+ $(LIBNOTIFY_LIBS) \
|
|
59
|
++ $(RDA_LIBS) \
|
|
60
|
+ $(MATE_DESKTOP_LIBS)
|
|
61
|
+
|
|
62
|
+ plugin_in_files = \
|
|
63
|
+--- a/plugins/xrandr/msd-xrandr-manager.c
|
|
64
|
++++ b/plugins/xrandr/msd-xrandr-manager.c
|
|
65
|
+@@ -50,6 +50,10 @@
|
|
66
|
+ #include <libnotify/notify.h>
|
|
67
|
+ #endif
|
|
68
|
+
|
|
69
|
++#ifdef HAVE_RDA
|
|
70
|
++#include <rda/rda.h>
|
|
71
|
++#endif
|
|
72
|
++
|
|
73
|
+ #include "mate-settings-profile.h"
|
|
74
|
+ #include "msd-xrandr-manager.h"
|
|
75
|
+
|
|
76
|
+@@ -2418,6 +2422,12 @@
|
|
77
|
+ GError *my_error;
|
|
78
|
+ gboolean result;
|
|
79
|
+
|
|
80
|
++#ifdef HAVE_RDA
|
|
81
|
++ if (rda_session_is_remote()) {
|
|
82
|
++ return;
|
|
83
|
++ }
|
|
84
|
++#endif
|
|
85
|
++
|
|
86
|
+ my_error = NULL;
|
|
87
|
+ result = apply_configuration_from_filename (manager, intended_filename, TRUE, timestamp, &my_error);
|
|
88
|
+ if (!result) {
|