aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/windialogs.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/windialogs.c')
-rw-r--r--xorg-server/hw/xwin/windialogs.c116
1 files changed, 58 insertions, 58 deletions
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c
index 822941e83..94afcd989 100644
--- a/xorg-server/hw/xwin/windialogs.c
+++ b/xorg-server/hw/xwin/windialogs.c
@@ -150,7 +150,7 @@ winURLWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
SetCursor (cursor);
return TRUE;
}
- origCB = (WNDPROC)GetWindowLong (hwnd, GWL_USERDATA);
+ origCB = (WNDPROC)GetWindowLongPtr(hwnd, GWLP_USERDATA);
/* Otherwise fall through to original WndProc */
if (origCB)
return CallWindowProc (origCB, hwnd, msg, wParam, lParam);
@@ -167,19 +167,19 @@ static void
winOverrideURLButton (HWND hwnd, int id)
{
WNDPROC origCB;
- origCB = (WNDPROC)SetWindowLong (GetDlgItem (hwnd, id),
- GWL_WNDPROC, (LONG)winURLWndProc);
- SetWindowLong (GetDlgItem (hwnd, id), GWL_USERDATA, (LONG)origCB);
+ origCB = (WNDPROC)SetWindowLongPtr(GetDlgItem (hwnd, id),
+ GWLP_WNDPROC, (LONG_PTR)winURLWndProc);
+ SetWindowLongPtr(GetDlgItem (hwnd, id), GWLP_USERDATA, (LONG_PTR)origCB);
}
static void
winUnoverrideURLButton (HWND hwnd, int id)
{
WNDPROC origCB;
- origCB = (WNDPROC)SetWindowLong (GetDlgItem (hwnd, id),
- GWL_USERDATA, 0);
+ origCB = (WNDPROC)SetWindowLongPtr(GetDlgItem (hwnd, id),
+ GWLP_USERDATA, 0);
if (origCB)
- SetWindowLong (GetDlgItem (hwnd, id), GWL_WNDPROC, (LONG)origCB);
+ SetWindowLongPtr(GetDlgItem (hwnd, id), GWLP_WNDPROC, (LONG_PTR)origCB);
}
@@ -199,38 +199,38 @@ winInitDialog (HWND hwndDlg)
if (!hwndDesk || IsIconic (hwndDesk))
hwndDesk = GetDesktopWindow ();
- /* Remove minimize and maximize buttons */
- SetWindowLongPtr (hwndDlg, GWL_STYLE,
- GetWindowLongPtr (hwndDlg, GWL_STYLE)
- & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX));
+ /* Remove minimize and maximize buttons */
+ SetWindowLongPtr(hwndDlg, GWL_STYLE,
+ GetWindowLongPtr(hwndDlg, GWL_STYLE)
+ & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX));
/* Set Window not to show in the task bar */
- SetWindowLongPtr (hwndDlg, GWL_EXSTYLE,
- GetWindowLongPtr (hwndDlg, GWL_EXSTYLE) & ~WS_EX_APPWINDOW );
+ SetWindowLongPtr(hwndDlg, GWL_EXSTYLE,
+ GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) & ~WS_EX_APPWINDOW );
- /* Center dialog window in the screen. Not done for multi-monitor systems, where
- * it is likely to end up split across the screens. In that case, it appears
- * near the Tray icon.
- */
+ /* Center dialog window in the screen. Not done for multi-monitor systems, where
+ * it is likely to end up split across the screens. In that case, it appears
+ * near the Tray icon.
+ */
if (GetSystemMetrics(SM_CMONITORS)>1) {
/* Still need to refresh the frame change. */
SetWindowPos (hwndDlg, HWND_TOP, 0,0,0,0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
} else {
- GetWindowRect (hwndDesk, &rcDesk);
- GetWindowRect (hwndDlg, &rcDlg);
- CopyRect (&rc, &rcDesk);
-
- OffsetRect (&rcDlg, -rcDlg.left, -rcDlg.top);
- OffsetRect (&rc, -rc.left, -rc.top);
- OffsetRect (&rc, -rcDlg.right, -rcDlg.bottom);
-
- SetWindowPos (hwndDlg,
- HWND_TOPMOST,
- rcDesk.left + (rc.right / 2),
- rcDesk.top + (rc.bottom / 2),
- 0, 0,
- SWP_NOSIZE | SWP_FRAMECHANGED);
+ GetWindowRect (hwndDesk, &rcDesk);
+ GetWindowRect (hwndDlg, &rcDlg);
+ CopyRect (&rc, &rcDesk);
+
+ OffsetRect (&rcDlg, -rcDlg.left, -rcDlg.top);
+ OffsetRect (&rc, -rc.left, -rc.top);
+ OffsetRect (&rc, -rcDlg.right, -rcDlg.bottom);
+
+ SetWindowPos (hwndDlg,
+ HWND_TOPMOST,
+ rcDesk.left + (rc.right / 2),
+ rcDesk.top + (rc.bottom / 2),
+ 0, 0,
+ SWP_NOSIZE | SWP_FRAMECHANGED);
}
#ifdef XWIN_MULTIWINDOW
@@ -322,7 +322,7 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv)
/* Set focus to the Cancel button */
PostMessage (g_hDlgExit, WM_NEXTDLGCTL,
- (int) GetDlgItem (g_hDlgExit, IDCANCEL), TRUE);
+ GetDlgItem (g_hDlgExit, IDCANCEL), TRUE);
}
#define CONNECTED_CLIENTS_FORMAT "There are currently %d clients connected."
@@ -590,7 +590,7 @@ winDisplayAboutDialog (winPrivScreenPtr pScreenPriv)
/* Set focus to the OK button */
PostMessage (g_hDlgAbout, WM_NEXTDLGCTL,
- (int) GetDlgItem (g_hDlgAbout, IDOK), TRUE);
+ GetDlgItem (g_hDlgAbout, IDOK), TRUE);
}
@@ -671,7 +671,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
case ID_ABOUT_CHANGELOG:
{
- int iReturn;
+ HINSTANCE iReturn;
#ifdef __CYGWIN__
const char * pszCygPath = "/usr/X11R6/share/doc/"
"xorg-x11-xwin/changelog.html";
@@ -684,12 +684,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
"devel/server/changelog.html";
#endif
- iReturn = (int) ShellExecute (NULL,
- "open",
- pszWinPath,
- NULL,
- NULL,
- SW_MAXIMIZE);
+ iReturn = ShellExecute (NULL,
+ "open",
+ pszWinPath,
+ NULL,
+ NULL,
+ SW_MAXIMIZE);
if (iReturn < 32)
{
ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_CHANGELOG - "
@@ -704,12 +704,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
const char * pszPath = __VENDORDWEBSUPPORT__;
int iReturn;
- iReturn = (int) ShellExecute (NULL,
- "open",
- pszPath,
- NULL,
- NULL,
- SW_MAXIMIZE);
+ iReturn = ShellExecute (NULL,
+ "open",
+ pszPath,
+ NULL,
+ NULL,
+ SW_MAXIMIZE);
if (iReturn < 32)
{
ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_WEBSITE - "
@@ -724,12 +724,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
const char * pszPath = "http://x.cygwin.com/docs/ug/";
int iReturn;
- iReturn = (int) ShellExecute (NULL,
- "open",
- pszPath,
- NULL,
- NULL,
- SW_MAXIMIZE);
+ iReturn = ShellExecute (NULL,
+ "open",
+ pszPath,
+ NULL,
+ NULL,
+ SW_MAXIMIZE);
if (iReturn < 32)
{
ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_UG - "
@@ -744,12 +744,12 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
const char * pszPath = "http://x.cygwin.com/docs/faq/";
int iReturn;
- iReturn = (int) ShellExecute (NULL,
- "open",
- pszPath,
- NULL,
- NULL,
- SW_MAXIMIZE);
+ iReturn = ShellExecute (NULL,
+ "open",
+ pszPath,
+ NULL,
+ NULL,
+ SW_MAXIMIZE);
if (iReturn < 32)
{
ErrorF ("winAboutDlgProc - WM_COMMAND - ID_ABOUT_FAQ - "