diff options
Diffstat (limited to 'xorg-server/hw/xwin/windialogs.c')
-rwxr-xr-x | xorg-server/hw/xwin/windialogs.c | 62 |
1 files changed, 25 insertions, 37 deletions
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c index 77feb514e..3e3bd401c 100755 --- a/xorg-server/hw/xwin/windialogs.c +++ b/xorg-server/hw/xwin/windialogs.c @@ -33,9 +33,6 @@ #include <xwin-config.h> #endif #include "win.h" -#ifdef __CYGWIN__ -#include <sys/cygwin.h> -#endif #include <shellapi.h> #include "winprefs.h" @@ -50,13 +47,13 @@ extern Bool g_fClipboardStarted; * Local function prototypes */ -static wBOOL CALLBACK +static INT_PTR CALLBACK winExitDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam); -static wBOOL CALLBACK +static INT_PTR CALLBACK winChangeDepthDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam); -static wBOOL CALLBACK +static INT_PTR CALLBACK winAboutDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam); static void @@ -296,7 +293,7 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv) g_hDlgExit = CreateDialogParam(g_hInstance, "EXIT_DIALOG", pScreenPriv->hwndScreen, - winExitDlgProc, (int) pScreenPriv); + winExitDlgProc, (LPARAM) pScreenPriv); /* Show the dialog box */ ShowWindow(g_hDlgExit, SW_SHOW); @@ -315,7 +312,7 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv) * Exit dialog window procedure */ -static wBOOL CALLBACK +static INT_PTR CALLBACK winExitDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam) { static winPrivScreenPtr s_pScreenPriv = NULL; @@ -415,14 +412,13 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv) "DEPTH_CHANGE_BOX", pScreenPriv->hwndScreen, winChangeDepthDlgProc, - (int) pScreenPriv); + (LPARAM) pScreenPriv); /* Show the dialog box */ ShowWindow(g_hDlgDepthChange, SW_SHOW); - winDebug ("winDisplayDepthChangeDialog - DialogBox returned: %d\n", - (int) g_hDlgDepthChange); - winDebug ("winDisplayDepthChangeDialog - GetLastError: %d\n", - (int) GetLastError()); + if (!g_hDlgDepthChange) + ErrorF("winDisplayDepthChangeDialog - GetLastError: %d\n", + (int) GetLastError()); /* Minimize the display window */ ShowWindow(pScreenPriv->hwndScreen, SW_MINIMIZE); @@ -433,7 +429,7 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv) * disruptive screen depth changes. */ -static wBOOL CALLBACK +static INT_PTR CALLBACK winChangeDepthDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) { @@ -537,7 +533,7 @@ winDisplayAboutDialog(winPrivScreenPtr pScreenPriv) g_hDlgAbout = CreateDialogParam(g_hInstance, "ABOUT_BOX", pScreenPriv->hwndScreen, - winAboutDlgProc, (int) pScreenPriv); + winAboutDlgProc, (LPARAM) pScreenPriv); /* Show the dialog box */ ShowWindow(g_hDlgAbout, SW_SHOW); @@ -554,7 +550,7 @@ winDisplayAboutDialog(winPrivScreenPtr pScreenPriv) * Process messages for the about dialog. */ -static wBOOL CALLBACK +static INT_PTR CALLBACK winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) { static winPrivScreenPtr s_pScreenPriv = NULL; @@ -615,26 +611,17 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) case ID_ABOUT_CHANGELOG: { - int iReturn; - -#ifdef __CYGWIN__ - const char *pszCygPath = "/usr/X11R6/share/doc/" - "xorg-x11-xwin/changelog.html"; - char pszWinPath[MAX_PATH + 1]; + INT_PTR iReturn; - /* Convert the POSIX path to a Win32 path */ - cygwin_conv_to_win32_path(pszCygPath, pszWinPath); -#else const char *pszWinPath = "http://x.cygwin.com/" "devel/server/changelog.html"; -#endif - iReturn = (int) ShellExecute(NULL, + iReturn = (INT_PTR) ShellExecute(NULL, "open", pszWinPath, NULL, NULL, SW_MAXIMIZE); if (iReturn < 32) { ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_CHANGELOG - " - "ShellExecute failed: %d\n", iReturn); + "ShellExecute failed: %d\n", (int)iReturn); } } return TRUE; @@ -642,14 +629,15 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) case ID_ABOUT_WEBSITE: { const char *pszPath = __VENDORDWEBSUPPORT__; - int iReturn; + INT_PTR iReturn; - iReturn = (int) ShellExecute(NULL, + iReturn = (INT_PTR) ShellExecute(NULL, "open", pszPath, NULL, NULL, SW_MAXIMIZE); if (iReturn < 32) { ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_WEBSITE - " - "ShellExecute failed: %d\n", iReturn); + "ShellExecute failed: %d\n", (int)iReturn); + } } return TRUE; @@ -657,14 +645,14 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) case ID_ABOUT_UG: { const char *pszPath = "http://x.cygwin.com/docs/ug/"; - int iReturn; + INT_PTR iReturn; - iReturn = (int) ShellExecute(NULL, + iReturn = (INT_PTR) ShellExecute(NULL, "open", pszPath, NULL, NULL, SW_MAXIMIZE); if (iReturn < 32) { ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_UG - " - "ShellExecute failed: %d\n", iReturn); + "ShellExecute failed: %d\n", (int)iReturn); } } return TRUE; @@ -672,14 +660,14 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) case ID_ABOUT_FAQ: { const char *pszPath = "http://x.cygwin.com/docs/faq/"; - int iReturn; + INT_PTR iReturn; - iReturn = (int) ShellExecute(NULL, + iReturn = (INT_PTR) ShellExecute(NULL, "open", pszPath, NULL, NULL, SW_MAXIMIZE); if (iReturn < 32) { ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_FAQ - " - "ShellExecute failed: %d\n", iReturn); + "ShellExecute failed: %d\n", (int)iReturn); } } return TRUE; |