Xming: Fix various 'ISO C90 forbids mixed declarations and code' warnings
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
78c87bdad1
commit
83d120b904
|
@ -371,16 +371,15 @@ winMouseButtonsHandle (ScreenPtr pScreen,
|
|||
*/
|
||||
void winEnqueueMotion(int x, int y)
|
||||
{
|
||||
miPointerSetPosition(g_pwinPointer, &x, &y);
|
||||
|
||||
int i, nevents;
|
||||
int valuators[2];
|
||||
|
||||
EventListPtr events;
|
||||
GetEventList(&events);
|
||||
|
||||
miPointerSetPosition(g_pwinPointer, &x, &y);
|
||||
valuators[0] = x;
|
||||
valuators[1] = y;
|
||||
|
||||
GetEventList(&events);
|
||||
nevents = GetPointerEvents(events, g_pwinPointer, MotionNotify, 0,
|
||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||
|
||||
|
|
|
@ -543,33 +543,34 @@ winUpdateIcon (Window id)
|
|||
HICON hIcon, hIconSmall=NULL, hIconOld;
|
||||
|
||||
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
|
||||
if (!pWin) return;
|
||||
winWindowPriv(pWin);
|
||||
if (pWinPriv->hWnd) {
|
||||
hIcon = winOverrideIcon ((unsigned long)pWin);
|
||||
if (!hIcon) {
|
||||
hIcon = winXIconToHICON (pWin, GetSystemMetrics(SM_CXICON));
|
||||
if (!hIcon) {
|
||||
hIcon = g_hIconX;
|
||||
hIconSmall = g_hSmallIconX;
|
||||
} else {
|
||||
/* Leave undefined if not found */
|
||||
hIconSmall = winXIconToHICON (pWin, GetSystemMetrics(SM_CXSMICON));
|
||||
if (pWin)
|
||||
{
|
||||
winWindowPriv(pWin);
|
||||
if (pWinPriv->hWnd) {
|
||||
hIcon = winOverrideIcon ((unsigned long)pWin);
|
||||
if (!hIcon) {
|
||||
hIcon = winXIconToHICON (pWin, GetSystemMetrics(SM_CXICON));
|
||||
if (!hIcon) {
|
||||
hIcon = g_hIconX;
|
||||
hIconSmall = g_hSmallIconX;
|
||||
} else {
|
||||
/* Leave undefined if not found */
|
||||
hIconSmall = winXIconToHICON (pWin, GetSystemMetrics(SM_CXSMICON));
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the large icon */
|
||||
hIconOld = (HICON) SendMessage (pWinPriv->hWnd,
|
||||
WM_SETICON, ICON_BIG, (LPARAM) hIcon);
|
||||
|
||||
/* Delete the icon if its not the default */
|
||||
winDestroyIcon(hIconOld);
|
||||
|
||||
/* Same for the small icon */
|
||||
hIconOld = (HICON) SendMessage (pWinPriv->hWnd,
|
||||
WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall);
|
||||
winDestroyIcon(hIconOld);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the large icon */
|
||||
hIconOld = (HICON) SendMessage (pWinPriv->hWnd,
|
||||
WM_SETICON, ICON_BIG, (LPARAM) hIcon);
|
||||
|
||||
/* Delete the icon if its not the default */
|
||||
winDestroyIcon(hIconOld);
|
||||
|
||||
/* Same for the small icon */
|
||||
hIconOld = (HICON) SendMessage (pWinPriv->hWnd,
|
||||
WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall);
|
||||
winDestroyIcon(hIconOld);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -282,11 +282,11 @@ static void winRaiseWindow(WindowPtr pWin)
|
|||
if (!winInDestroyWindowsWindow && !winInRaiseWindow)
|
||||
{
|
||||
BOOL oldstate = winInRaiseWindow;
|
||||
XID vlist[1] = { 0 };
|
||||
winInRaiseWindow = TRUE;
|
||||
/* Call configure window directly to make sure it gets processed
|
||||
* in time
|
||||
*/
|
||||
XID vlist[1] = { 0 };
|
||||
ConfigureWindow(pWin, CWStackMode, vlist, serverClient);
|
||||
winInRaiseWindow = oldstate;
|
||||
}
|
||||
|
@ -416,12 +416,14 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
|||
winReorderWindowsMultiWindow ();
|
||||
|
||||
/* Fix a 'round title bar corner background should be transparent not black' problem when first painted */
|
||||
RECT rWindow;
|
||||
HRGN hRgnWindow;
|
||||
GetWindowRect(hwnd, &rWindow);
|
||||
hRgnWindow = CreateRectRgnIndirect(&rWindow);
|
||||
SetWindowRgn (hwnd, hRgnWindow, TRUE);
|
||||
DeleteObject(hRgnWindow);
|
||||
{
|
||||
RECT rWindow;
|
||||
HRGN hRgnWindow;
|
||||
GetWindowRect(hwnd, &rWindow);
|
||||
hRgnWindow = CreateRectRgnIndirect(&rWindow);
|
||||
SetWindowRgn (hwnd, hRgnWindow, TRUE);
|
||||
DeleteObject(hRgnWindow);
|
||||
}
|
||||
|
||||
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)XMING_SIGNATURE);
|
||||
|
||||
|
@ -897,10 +899,10 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
|||
}
|
||||
else /* It is an overridden window so make it top of Z stack */
|
||||
{
|
||||
HWND forHwnd = GetForegroundWindow();
|
||||
#if CYGWINDOWING_DEBUG
|
||||
ErrorF ("overridden window is shown\n");
|
||||
#endif
|
||||
HWND forHwnd = GetForegroundWindow();
|
||||
if (forHwnd != NULL)
|
||||
{
|
||||
if (GetWindowLongPtr(forHwnd, GWLP_USERDATA) & (LONG_PTR)XMING_SIGNATURE)
|
||||
|
|
Loading…
Reference in New Issue
Block a user