xserver: Branch 'master'
Jon TURNEY
jturney at kemper.freedesktop.org
Sun Jul 26 07:15:58 PDT 2009
hw/xwin/windialogs.c | 24 ++++++++++++------------
hw/xwin/winmultiwindowwindow.c | 2 +-
hw/xwin/winprefs.c | 4 ++--
3 files changed, 15 insertions(+), 15 deletions(-)
New commits:
commit b3751454cbe02ee952bab213e8c3684d429c41b3
Author: Colin Harrison <colin.harrison at virgin.net>
Date: Tue Jul 21 16:07:56 2009 +0100
Cygwin/X: Update Get/SetWindowLong() to Get/SetWindowLongPtr() everywhere
Get/SetWindowLong() is superseded by Get/SetWindowLongPtr(), so change to
using that everywhere it remains
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/windialogs.c b/hw/xwin/windialogs.c
index 0cfddc6..0bcf0d7 100755
--- a/hw/xwin/windialogs.c
+++ b/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, GWL_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),
+ GWL_WNDPROC, (LONG_PTR)winURLWndProc);
+ SetWindowLongPtr(GetDlgItem (hwnd, id), GWL_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),
+ GWL_USERDATA, 0);
if (origCB)
- SetWindowLong (GetDlgItem (hwnd, id), GWL_WNDPROC, (LONG)origCB);
+ SetWindowLongPtr(GetDlgItem (hwnd, id), GWL_WNDPROC, (LONG_PTR)origCB);
}
@@ -200,13 +200,13 @@ winInitDialog (HWND hwndDlg)
hwndDesk = GetDesktopWindow ();
/* Remove minimize and maximize buttons */
- SetWindowLong (hwndDlg, GWL_STYLE,
- GetWindowLong (hwndDlg, GWL_STYLE)
- & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX));
+ SetWindowLongPtr(hwndDlg, GWL_STYLE,
+ GetWindowLongPtr(hwndDlg, GWL_STYLE)
+ & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX));
/* Set Window not to show in the task bar */
- SetWindowLong (hwndDlg, GWL_EXSTYLE,
- GetWindowLong (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
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index 8b18aeb..e2b5ed2 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -575,7 +575,7 @@ winCreateWindowsWindow (WindowPtr pWin)
if (hIconSmall) SendMessage (hWnd, WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall);
/* Change style back to popup, already placed... */
- SetWindowLong (hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
+ SetWindowLongPtr(hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
SetWindowPos (hWnd, 0, 0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
/* Make sure it gets the proper system menu for a WS_POPUP, too */
diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c
index fe49ae2..d5bceb9 100644
--- a/hw/xwin/winprefs.c
+++ b/hw/xwin/winprefs.c
@@ -313,7 +313,7 @@ HandleCustomWM_INITMENU(unsigned long hwndIn,
if (!hwnd || !hmenu)
return;
- if (GetWindowLong (hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)
+ if (GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)
dwExStyle = MF_BYCOMMAND | MF_CHECKED;
else
dwExStyle = MF_BYCOMMAND | MF_UNCHECKED;
@@ -408,7 +408,7 @@ HandleCustomWM_COMMAND (unsigned long hwndIn,
return FALSE;
/* Get extended window style */
- dwExStyle = GetWindowLong (hwnd, GWL_EXSTYLE);
+ dwExStyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE);
/* Handle topmost windows */
if (dwExStyle & WS_EX_TOPMOST)
More information about the xorg-commit
mailing list