summaryrefslogtreecommitdiff
path: root/src/core/prefs.c
diff options
context:
space:
mode:
authorFaidon Liambotis <[email protected]>2015-09-14 03:06:18 +0300
committerinfirit <[email protected]>2015-09-16 13:59:59 +0200
commitdee034771c8f3b519c8011faf78d277d6af76933 (patch)
tree411e2ced133401f2480a2323154b5df792b4cc31 /src/core/prefs.c
parente12e55167107adaa0b45decdb2f57cf7c870d2aa (diff)
downloadmarco-dee034771c8f3b519c8011faf78d277d6af76933.tar.bz2
marco-dee034771c8f3b519c8011faf78d277d6af76933.tar.xz
Add manual and by-pointer window placement
This adds a window placement preference: the existing behavior is now called "automatic" and is the default. Two new modes are being introduced: "pointer", which means that windows are placed according to the mouse pointer position; and "manual" which means that the user must manually place the new window with the mouse or keyboard. This is a straight port from muffin, commit 3257671.
Diffstat (limited to 'src/core/prefs.c')
-rw-r--r--src/core/prefs.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 8fa28b83..2f3e9392 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -168,6 +168,8 @@ static void init_window_bindings (void);
static void init_commands (void);
static void init_workspace_names (void);
+static MetaPlacementMode placement_mode = META_PLACEMENT_MODE_AUTOMATIC;
+
typedef struct
{
MetaPrefsChangedFunc func;
@@ -317,6 +319,11 @@ static MetaEnumPreference preferences_enum[] =
META_PREF_ACTION_RIGHT_CLICK_TITLEBAR,
(gint *) &action_right_click_titlebar,
},
+ { "placement-mode",
+ KEY_GENERAL_SCHEMA,
+ META_PREF_PLACEMENT_MODE,
+ (gint *) &placement_mode,
+ },
{ NULL, NULL, 0, NULL },
};
@@ -1556,6 +1563,9 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_SIDE_BY_SIDE_TILING:
return "SIDE_BY_SIDE_TILING";
+
+ case META_PREF_PLACEMENT_MODE:
+ return "PLACEMENT_MODE";
}
return "(unknown)";
@@ -2241,6 +2251,12 @@ meta_prefs_get_force_fullscreen (void)
return force_fullscreen;
}
+MetaPlacementMode
+meta_prefs_get_placement_mode (void)
+{
+ return placement_mode;
+}
+
void
meta_prefs_set_force_compositing_manager (gboolean whether)
{