mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05: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
365af53797
commit
b346f98eb0
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user