From dee034771c8f3b519c8011faf78d277d6af76933 Mon Sep 17 00:00:00 2001 From: Faidon Liambotis Date: Mon, 14 Sep 2015 03:06:18 +0300 Subject: 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. --- src/core/window.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/window.c') diff --git a/src/core/window.c b/src/core/window.c index 60616e4d..30ebfa85 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -461,6 +461,7 @@ meta_window_new_with_attrs (MetaDisplay *display, window->maximize_horizontally_after_placement = FALSE; window->maximize_vertically_after_placement = FALSE; window->minimize_after_placement = FALSE; + window->move_after_placement = FALSE; window->fullscreen = FALSE; window->fullscreen_after_placement = FALSE; window->fullscreen_monitors[0] = -1; @@ -2346,6 +2347,13 @@ meta_window_show (MetaWindow *window) if (takes_focus_on_map) { meta_window_focus (window, timestamp); + + if (window->move_after_placement) + { + meta_window_begin_grab_op(window, META_GRAB_OP_KEYBOARD_MOVING, + FALSE, timestamp); + window->move_after_placement = FALSE; + } } else { -- cgit v1.2.1