From b3f7488a8deb5b51cdbbc3673eb26b1611ef5110 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 18 Mar 2007 23:49:54 +0000 Subject: changed remembering of positions so it only remembers position relative to the current head that way, the windows don't get misplaced when the window is on second head, or when not using the head anymore --- ChangeLog | 5 ++++- src/Remember.cc | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8955409..898ef24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,11 @@ (Format: Year/Month/Day) Changes for 1.0rc3: *07/03/18: + * Changed position remembering so it only remembers position relative to the + current head (Mark) + Remember.cc * Fixed problem with new mouse binding code when using emacs keychains (Mark) - Keys.cc/hh + Keys.hh *07/03/17: * Iconified, stuck windows weren't being moved to different workspaces (Mark) Screen.cc diff --git a/src/Remember.cc b/src/Remember.cc index 2b8fbce..e0a7b0f 100644 --- a/src/Remember.cc +++ b/src/Remember.cc @@ -928,9 +928,13 @@ void Remember::rememberAttrib(WinClient &winclient, Attribute attrib) { //!! Note: This is odd, why dont we need to substract border width on win->width() ? app->rememberDimensions(win->width(), win->height() - 2 * win->fbWindow().borderWidth()); break; - case REM_POSITION: - app->rememberPosition(win->x(), win->y()); + case REM_POSITION: { + int head = win->screen().getHead(win->fbWindow()); + int head_x = win->screen().getHeadX(head); + int head_y = win->screen().getHeadY(head); + app->rememberPosition(win->x() - head_x, win->y() - head_y); break; + } case REM_FOCUSHIDDENSTATE: app->rememberFocusHiddenstate(win->isFocusHidden()); break; -- cgit v0.11.2