Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDA: Don't apply stored monitor configuration if session is remote. #306

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ MATE_DESKTOP_REQUIRED_VERSION=1.23.2
LIBMATEKBD_REQUIRED_VERSION=1.17.0
LIBNOTIFY_REQUIRED_VERSION=0.7.0
LIBMATEMIXER_REQUIRED_VERSION=1.10.0
RDA_REQUIRED_VERSION=0.0.3

EXTRA_COMPILE_WARNINGS(yes)

Expand Down Expand Up @@ -363,6 +364,15 @@ fi

AM_CONDITIONAL(BUILD_RFKILL, [test x"$enable_rfkill" = x"yes"])

# ---------------------------------------------------------------------------
# - Check if Remote Desktop Awareness support is available
# ---------------------------------------------------------------------------

PKG_CHECK_MODULES(RDA, rda >= $RDA_REQUIRED_VERSION, have_rda=yes, have_rda=no)
if test "x$have_rda" = "xyes"; then
AC_DEFINE(HAVE_RDA, 1, [Have the Remote Desktop Awareness library])
fi

# ---------------------------------------------------------------------------
# Enable Profiling
# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -538,4 +548,5 @@ ${NSS_DATABASE:+\
System nssdb: ${NSS_DATABASE}
}\
Profiling support: ${enable_profiling}
RD awareness: ${have_rda}
"
2 changes: 2 additions & 0 deletions plugins/xrandr/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ libxrandr_la_CPPFLAGS = \
libxrandr_la_CFLAGS = \
$(SETTINGS_PLUGIN_CFLAGS) \
$(LIBNOTIFY_CFLAGS) \
$(RDA_CFLAGS) \
$(MATE_DESKTOP_CFLAGS) \
$(AM_CFLAGS)

Expand All @@ -76,6 +77,7 @@ libxrandr_la_LDFLAGS = \
libxrandr_la_LIBADD = \
$(SETTINGS_PLUGIN_LIBS) \
$(LIBNOTIFY_LIBS) \
$(RDA_LIBS) \
$(MATE_DESKTOP_LIBS)

plugin_in_files = \
Expand Down
10 changes: 10 additions & 0 deletions plugins/xrandr/msd-xrandr-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
#include <libnotify/notify.h>
#endif

#ifdef HAVE_RDA
#include <rda/rda.h>
#endif

#include "mate-settings-profile.h"
#include "msd-xrandr-manager.h"

Expand Down Expand Up @@ -2407,6 +2411,12 @@ apply_intended_configuration (MsdXrandrManager *manager, const char *intended_fi
GError *my_error;
gboolean result;

#ifdef HAVE_RDA
if (rda_session_is_remote()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Respect code style. File doesn't use tabs.

return;
}
#endif

my_error = NULL;
result = apply_configuration_from_filename (manager, intended_filename, TRUE, timestamp, &my_error);
if (!result) {
Expand Down