# HG changeset patch # User rubidium # Date 1185742477 0 # Node ID b2a4bed111b6c4c7b5f194c1b162864fefcf2151 # Parent f0d341e693263d5135eaac1f6f5378fb94f97a3d (svn r10727) -Codechange: when a window would fall outside of the screen (on the right) when opening it, move it to the left so it stays inside the screen. diff -r f0d341e69326 -r b2a4bed111b6 src/window.cpp --- a/src/window.cpp Sun Jul 29 19:19:30 2007 +0000 +++ b/src/window.cpp Sun Jul 29 20:54:37 2007 +0000 @@ -689,6 +689,8 @@ w->wndproc(w, &e); } + if (w->left + w->width > _screen.width) w->left -= (w->left + w->width - _screen.width); + const Window *wt = FindWindowById(WC_MAIN_TOOLBAR, 0); w->top = max(w->top, (wt == NULL || w == wt || y == 0) ? 0 : wt->height); w->left = max(w->left, 0);