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
This commit is contained in:
markt 2007-03-18 23:49:54 +00:00
parent 4945b88e1b
commit b3f7488a8d
2 changed files with 10 additions and 3 deletions

View file

@ -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

View file

@ -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;