1
0
Fork 0

(svn r21015) -Fix [FS#4176]: don't let the resize button go past the bottom of the screen

release/1.1
glx 2010-10-23 17:37:54 +00:00
parent cb43ece091
commit 3a6892ba10
1 changed files with 5 additions and 0 deletions

View File

@ -1761,6 +1761,11 @@ static EventState HandleWindowDragging()
if (w->resize.step_width == 0) x = 0; if (w->resize.step_width == 0) x = 0;
if (w->resize.step_height == 0) y = 0; if (w->resize.step_height == 0) y = 0;
/* Check the resize button won't go past the bottom of the screen */
if (w->top + w->height + y > _screen.height) {
y = _screen.height - w->height - w->top;
}
/* X and Y has to go by step.. calculate it. /* X and Y has to go by step.. calculate it.
* The cast to int is necessary else x/y are implicitly casted to * The cast to int is necessary else x/y are implicitly casted to
* unsigned int, which won't work. */ * unsigned int, which won't work. */