forked from 12to11/12to11
Use precomputed width and height in ViewMaxX/ViewMaxY
* subcompositor.c (ViewMaxX): (ViewMaxY): Use precomputed dimensions. (ViewMove): Fix typo in comment.
This commit is contained in:
parent
3ed01b13b7
commit
769827921f
1 changed files with 3 additions and 3 deletions
|
@ -642,13 +642,13 @@ MakeView (void)
|
|||
static int
|
||||
ViewMaxX (View *view)
|
||||
{
|
||||
return view->abs_x + ViewWidth (view) - 1;
|
||||
return view->abs_x + view->width - 1;
|
||||
}
|
||||
|
||||
static int
|
||||
ViewMaxY (View *view)
|
||||
{
|
||||
return view->abs_y + ViewHeight (view) - 1;
|
||||
return view->abs_y + view->height - 1;
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
@ -1703,7 +1703,7 @@ ViewMove (View *view, int x, int y)
|
|||
SetGarbaged (view->subcompositor);
|
||||
}
|
||||
|
||||
/* If moving this biew bumps subcompositor.max_x and/or
|
||||
/* If moving this view bumps subcompositor.max_x and/or
|
||||
subcompositor.max_y, don't recompute either. */
|
||||
|
||||
if (view->subcompositor->max_x < ViewMaxX (view))
|
||||
|
|
Loading…
Add table
Reference in a new issue