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.c62
1 files changed, 25 insertions, 37 deletions
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c
index 86f332aad..054ee95b5 100644
--- 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
@@ -288,7 +285,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);
@@ -307,7 +304,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;
@@ -407,14 +404,13 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv)
"DEPTH_CHANGE_BOX",
pScreenPriv->hwndScreen,
winChangeDepthDlgProc,
- (int) pScreenPriv);
+ (LPARAM) pScreenPriv);
/* Show the dialog box */
ShowWindow(g_hDlgDepthChange, SW_SHOW);
- ErrorF("winDisplayDepthChangeDialog - DialogBox returned: %d\n",
- (int) g_hDlgDepthChange);
- ErrorF("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);
@@ -425,7 +421,7 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv)
* disruptive screen depth changes.
*/
-static wBOOL CALLBACK
+static INT_PTR CALLBACK
winChangeDepthDlgProc(HWND hwndDialog, UINT message,
WPARAM wParam, LPARAM lParam)
{
@@ -539,7 +535,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);
@@ -556,7 +552,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;
@@ -621,26 +617,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;
@@ -648,14 +635,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;
@@ -663,14 +651,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;
@@ -678,14 +666,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;