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)
|
void winEnqueueMotion(int x, int y)
|
||||||
{
|
{
|
||||||
miPointerSetPosition(g_pwinPointer, &x, &y);
|
|
||||||
|
|
||||||
int i, nevents;
|
int i, nevents;
|
||||||
int valuators[2];
|
int valuators[2];
|
||||||
|
|
||||||
EventListPtr events;
|
EventListPtr events;
|
||||||
GetEventList(&events);
|
|
||||||
|
|
||||||
|
miPointerSetPosition(g_pwinPointer, &x, &y);
|
||||||
valuators[0] = x;
|
valuators[0] = x;
|
||||||
valuators[1] = y;
|
valuators[1] = y;
|
||||||
|
|
||||||
|
GetEventList(&events);
|
||||||
nevents = GetPointerEvents(events, g_pwinPointer, MotionNotify, 0,
|
nevents = GetPointerEvents(events, g_pwinPointer, MotionNotify, 0,
|
||||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||||
|
|
||||||
|
|
|
@ -543,7 +543,8 @@ winUpdateIcon (Window id)
|
||||||
HICON hIcon, hIconSmall=NULL, hIconOld;
|
HICON hIcon, hIconSmall=NULL, hIconOld;
|
||||||
|
|
||||||
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
|
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
|
||||||
if (!pWin) return;
|
if (pWin)
|
||||||
|
{
|
||||||
winWindowPriv(pWin);
|
winWindowPriv(pWin);
|
||||||
if (pWinPriv->hWnd) {
|
if (pWinPriv->hWnd) {
|
||||||
hIcon = winOverrideIcon ((unsigned long)pWin);
|
hIcon = winOverrideIcon ((unsigned long)pWin);
|
||||||
|
@ -569,7 +570,7 @@ winUpdateIcon (Window id)
|
||||||
hIconOld = (HICON) SendMessage (pWinPriv->hWnd,
|
hIconOld = (HICON) SendMessage (pWinPriv->hWnd,
|
||||||
WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall);
|
WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall);
|
||||||
winDestroyIcon(hIconOld);
|
winDestroyIcon(hIconOld);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -282,11 +282,11 @@ static void winRaiseWindow(WindowPtr pWin)
|
||||||
if (!winInDestroyWindowsWindow && !winInRaiseWindow)
|
if (!winInDestroyWindowsWindow && !winInRaiseWindow)
|
||||||
{
|
{
|
||||||
BOOL oldstate = winInRaiseWindow;
|
BOOL oldstate = winInRaiseWindow;
|
||||||
|
XID vlist[1] = { 0 };
|
||||||
winInRaiseWindow = TRUE;
|
winInRaiseWindow = TRUE;
|
||||||
/* Call configure window directly to make sure it gets processed
|
/* Call configure window directly to make sure it gets processed
|
||||||
* in time
|
* in time
|
||||||
*/
|
*/
|
||||||
XID vlist[1] = { 0 };
|
|
||||||
ConfigureWindow(pWin, CWStackMode, vlist, serverClient);
|
ConfigureWindow(pWin, CWStackMode, vlist, serverClient);
|
||||||
winInRaiseWindow = oldstate;
|
winInRaiseWindow = oldstate;
|
||||||
}
|
}
|
||||||
|
@ -416,12 +416,14 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
||||||
winReorderWindowsMultiWindow ();
|
winReorderWindowsMultiWindow ();
|
||||||
|
|
||||||
/* Fix a 'round title bar corner background should be transparent not black' problem when first painted */
|
/* Fix a 'round title bar corner background should be transparent not black' problem when first painted */
|
||||||
|
{
|
||||||
RECT rWindow;
|
RECT rWindow;
|
||||||
HRGN hRgnWindow;
|
HRGN hRgnWindow;
|
||||||
GetWindowRect(hwnd, &rWindow);
|
GetWindowRect(hwnd, &rWindow);
|
||||||
hRgnWindow = CreateRectRgnIndirect(&rWindow);
|
hRgnWindow = CreateRectRgnIndirect(&rWindow);
|
||||||
SetWindowRgn (hwnd, hRgnWindow, TRUE);
|
SetWindowRgn (hwnd, hRgnWindow, TRUE);
|
||||||
DeleteObject(hRgnWindow);
|
DeleteObject(hRgnWindow);
|
||||||
|
}
|
||||||
|
|
||||||
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)XMING_SIGNATURE);
|
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 */
|
else /* It is an overridden window so make it top of Z stack */
|
||||||
{
|
{
|
||||||
|
HWND forHwnd = GetForegroundWindow();
|
||||||
#if CYGWINDOWING_DEBUG
|
#if CYGWINDOWING_DEBUG
|
||||||
ErrorF ("overridden window is shown\n");
|
ErrorF ("overridden window is shown\n");
|
||||||
#endif
|
#endif
|
||||||
HWND forHwnd = GetForegroundWindow();
|
|
||||||
if (forHwnd != NULL)
|
if (forHwnd != NULL)
|
||||||
{
|
{
|
||||||
if (GetWindowLongPtr(forHwnd, GWLP_USERDATA) & (LONG_PTR)XMING_SIGNATURE)
|
if (GetWindowLongPtr(forHwnd, GWLP_USERDATA) & (LONG_PTR)XMING_SIGNATURE)
|
||||||
|
|
Loading…
Reference in New Issue