mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
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
This commit is contained in:
parent
4a8f7aa884
commit
4c2e39bf2c
@ -491,12 +491,17 @@ place_window_if_needed(MetaWindow *window,
|
|||||||
!window->minimized &&
|
!window->minimized &&
|
||||||
!window->fullscreen)
|
!window->fullscreen)
|
||||||
{
|
{
|
||||||
|
MetaRectangle orig_rect;
|
||||||
MetaRectangle placed_rect;
|
MetaRectangle placed_rect;
|
||||||
MetaWorkspace *cur_workspace;
|
MetaWorkspace *cur_workspace;
|
||||||
const MetaMonitorInfo *monitor_info;
|
const MetaMonitorInfo *monitor_info;
|
||||||
|
|
||||||
meta_window_get_frame_rect (window, &placed_rect);
|
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);
|
&placed_rect.x, &placed_rect.y);
|
||||||
did_placement = TRUE;
|
did_placement = TRUE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user