plug-ins: screenshot-win32.c forbids mixed declarations and code

(cherry picked from commit 09fb64c604)
This commit is contained in:
lillolollo 2020-04-11 02:07:25 +00:00 committed by Jehan
parent 472069779a
commit 202012ba73
1 changed files with 5 additions and 3 deletions

View File

@ -523,6 +523,9 @@ GetAccurateWindowRect (HWND hwndTarget,
if (GetWindowPlacement (hwndTarget, &windowplacment) && windowplacment.showCmd == SW_SHOWMAXIMIZED)
{
RECT *rectScreens = NULL;
int xCenter;
int yCenter;
int i;
/* If this is not the first time we call this function for some
* reason then we reset the rectScreens count
@ -548,11 +551,10 @@ GetAccurateWindowRect (HWND hwndTarget,
rectScreensCount = 1;
}
int xCenter = outRect->left + (outRect->right - outRect->left) / 2;
int yCenter = outRect->top + (outRect->bottom - outRect->top) / 2;
xCenter = outRect->left + (outRect->right - outRect->left) / 2;
yCenter = outRect->top + (outRect->bottom - outRect->top) / 2;
/* find on which screen the window exist */
int i;
for (i = 0; i < rectScreensCount; i++)
if (xCenter > rectScreens[i].left && xCenter < rectScreens[i].right &&
yCenter > rectScreens[i].top && yCenter < rectScreens[i].bottom)