From 4c2e39bf2cfe549a07cf7c61df24d6e6de2ea671 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 5 Mar 2014 17:04:50 -0500 Subject: [PATCH] Fix positioning error for manually positioned windows The "original coordinates" passed into meta_window_place() were the coordinates of the client rectangle not the frame rectangle. When meta_window_place() didn't place because the window was manually positioned (e.g., 'xterm -geometry +x+y') that resulted in a window being offset by the frame dimensions. https://bugzilla.gnome.org/show_bug.cgi?id=724049 --- src/core/constraints.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/constraints.c b/src/core/constraints.c index fc5dc6f86..b59aa065f 100644 --- a/src/core/constraints.c +++ b/src/core/constraints.c @@ -491,12 +491,17 @@ place_window_if_needed(MetaWindow *window, !window->minimized && !window->fullscreen) { + MetaRectangle orig_rect; MetaRectangle placed_rect; MetaWorkspace *cur_workspace; const MetaMonitorInfo *monitor_info; meta_window_get_frame_rect (window, &placed_rect); - meta_window_place (window, info->orig.x, info->orig.y, + + orig_rect = info->orig; + extend_by_frame (window, &orig_rect); + + meta_window_place (window, orig_rect.x, orig_rect.y, &placed_rect.x, &placed_rect.y); did_placement = TRUE;