X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwedittags.c;h=965e7237b0caf6282834e379f1f4e70b3347592b;hb=8c94141e6c30dc94777dee5824cfbf027a18f940;hp=da86de30b3f61c1fc3dd418d4cae75d14e9f6e42;hpb=91d8e5853ca580769cc130aa6ea004869118d171;p=xboard.git diff --git a/winboard/wedittags.c b/winboard/wedittags.c index da86de3..965e723 100644 --- a/winboard/wedittags.c +++ b/winboard/wedittags.c @@ -1,9 +1,10 @@ /* * wedittags.c -- EditTags window for WinBoard - * $Id: wedittags.c,v 2.1 2003/10/27 19:21:02 mann Exp $ * * Copyright 1995,2009 Free Software Foundation, Inc. * + * Enhancements Copyright 2005 Alessandro Scotti + * * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -34,16 +35,14 @@ #include #include "common.h" -#include "winboard.h" #include "frontend.h" #include "backend.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); + 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);