summaryrefslogtreecommitdiff
path: root/src/include
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/include
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/include')
-rw-r--r--src/include/common.h10
-rw-r--r--src/include/prefs.h5
2 files changed, 14 insertions, 1 deletions
diff --git a/src/include/common.h b/src/include/common.h
index 69755e24..74137967 100644
--- a/src/include/common.h
+++ b/src/include/common.h
@@ -312,4 +312,14 @@ struct _MetaButtonLayout
(ycoord) >= (rect).y && \
(ycoord) < ((rect).y + (rect).height))
+/*
+ * Placement mode
+ */
+typedef enum
+{
+ META_PLACEMENT_MODE_AUTOMATIC,
+ META_PLACEMENT_MODE_POINTER,
+ META_PLACEMENT_MODE_MANUAL
+} MetaPlacementMode;
+
#endif
diff --git a/src/include/prefs.h b/src/include/prefs.h
index d804207c..a2fbbf55 100644
--- a/src/include/prefs.h
+++ b/src/include/prefs.h
@@ -64,7 +64,8 @@ typedef enum
META_PREF_RESIZE_WITH_RIGHT_BUTTON,
META_PREF_CENTER_NEW_WINDOWS,
META_PREF_SIDE_BY_SIDE_TILING,
- META_PREF_FORCE_FULLSCREEN
+ META_PREF_FORCE_FULLSCREEN,
+ META_PREF_PLACEMENT_MODE
} MetaPreference;
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
@@ -112,6 +113,8 @@ MetaActionTitlebar meta_prefs_get_action_double_click_titlebar (void);
MetaActionTitlebar meta_prefs_get_action_middle_click_titlebar (void);
MetaActionTitlebar meta_prefs_get_action_right_click_titlebar (void);
+MetaPlacementMode meta_prefs_get_placement_mode (void);
+
void meta_prefs_set_num_workspaces (int n_workspaces);
const char* meta_prefs_get_workspace_name (int i);