X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwedittags.c;h=781d2cf342833a5f26c9ce0fabbb44ae0ddbd9b6;hb=5cd55bddca592918f38deff675d05b650a71412e;hp=e3a868f3cbac644fefbb361b6ae70ee8b928bf17;hpb=7b4dacf6fe9f8c10b6eb4d6070869a3d933dbeb5;p=xboard.git diff --git a/winboard/wedittags.c b/winboard/wedittags.c index e3a868f..781d2cf 100644 --- a/winboard/wedittags.c +++ b/winboard/wedittags.c @@ -1,7 +1,9 @@ /* * wedittags.c -- EditTags window for WinBoard * - * Copyright 1995,2009 Free Software Foundation, Inc. + * Copyright 1995, 2009, 2010 Free Software Foundation, Inc. + * + * Enhancements Copyright 2005 Alessandro Scotti * * ------------------------------------------------------------------------ * @@ -33,17 +35,14 @@ #include #include "common.h" -#include "winboard.h" #include "frontend.h" #include "backend.h" -#include "wedittags.h" +#include "winboard.h" /* Module globals */ static char *editTagsText; -HWND editTagsDialog = NULL; BOOL editTagsUp = FALSE; BOOL canEditTags = FALSE; -int editTagsX, editTagsY, editTagsW, editTagsH; /* Imports from winboard.c */ extern HINSTANCE hInst; @@ -84,18 +83,18 @@ EditTagsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) GetClientRect(hDlg, &rect); sizeX = rect.right; sizeY = rect.bottom; - if (editTagsX != CW_USEDEFAULT && editTagsY != CW_USEDEFAULT && - editTagsW != CW_USEDEFAULT && editTagsH != CW_USEDEFAULT) { + if (wpTags.x != CW_USEDEFAULT && wpTags.y != CW_USEDEFAULT && + wpTags.width != CW_USEDEFAULT && wpTags.height != CW_USEDEFAULT) { WINDOWPLACEMENT wp; - EnsureOnScreen(&editTagsX, &editTagsY, 0, 0); + EnsureOnScreen(&wpTags.x, &wpTags.y, 0, 0); wp.length = sizeof(WINDOWPLACEMENT); wp.flags = 0; wp.showCmd = SW_SHOW; wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0; - wp.rcNormalPosition.left = editTagsX; - wp.rcNormalPosition.right = editTagsX + editTagsW; - wp.rcNormalPosition.top = editTagsY; - wp.rcNormalPosition.bottom = editTagsY + editTagsH; + wp.rcNormalPosition.left = wpTags.x; + wp.rcNormalPosition.right = wpTags.x + wpTags.width; + wp.rcNormalPosition.top = wpTags.y; + wp.rcNormalPosition.bottom = wpTags.y + wpTags.height; SetWindowPlacement(hDlg, &wp); GetClientRect(hDlg, &rect);