summaryrefslogtreecommitdiff
path: root/mate-session/main.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-09-01 22:53:12 +0200
committerinfirit <[email protected]>2015-09-01 22:53:12 +0200
commit725910927048248426f2224762506ef7008f2429 (patch)
tree14a439dd0f5bbf05999e9ffbf6b7d8a86ec90b2e /mate-session/main.c
parente25e546c9d2f7a18ff2b3f4a578fb9028544be85 (diff)
downloadmate-session-manager-725910927048248426f2224762506ef7008f2429.tar.bz2
mate-session-manager-725910927048248426f2224762506ef7008f2429.tar.xz
Add option to disable overlay scrolling
Diffstat (limited to 'mate-session/main.c')
-rw-r--r--mate-session/main.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/mate-session/main.c b/mate-session/main.c
index bb46c81..c812038 100644
--- a/mate-session/main.c
+++ b/mate-session/main.c
@@ -74,6 +74,9 @@
#define MOBILITY_KEY "exec"
#define MOBILITY_STARTUP_KEY "startup"
+#define MATE_INTERFACE_SCHEMA "org.mate.interface"
+#define GTK_OVERLAY_SCROLL "gtk-overlay-scrolling"
+
#define GSM_DBUS_NAME "org.mate.SessionManager"
#define KEY_AUTOSAVE "auto-save-session"
@@ -534,6 +537,23 @@ void debug_changed (GSettings *settings, gchar *key, gpointer user_data)
mdm_log_set_debug (debug);
}
+static void set_overlay_scroll (void)
+{
+ GSettings *settings;
+ gboolean enabled;
+
+ settings = g_settings_new (MATE_INTERFACE_SCHEMA);
+ enabled = g_settings_get_boolean (settings, GTK_OVERLAY_SCROLL);
+
+ if (enabled) {
+ gsm_util_setenv ("GTK_OVERLAY_SCROLLING", "1");
+ } else {
+ gsm_util_setenv ("GTK_OVERLAY_SCROLLING", "0");
+ }
+
+ g_object_unref (settings);
+}
+
int main(int argc, char** argv)
{
struct sigaction sa;
@@ -638,6 +658,9 @@ int main(int argc, char** argv)
/* Starts gnome compat mode */
msm_gnome_start();
+ /* Set to use Gtk3 overlay scroll */
+ set_overlay_scroll ();
+
manager = gsm_manager_new(client_store, failsafe);
signal_handler = mdm_signal_handler_new();