Merge remote-tracking branch 'jturney/master'
This commit is contained in:
commit
548c6fe044
|
@ -70,12 +70,6 @@ extern HWND g_hwndClipboard;
|
||||||
extern Bool g_fClipboard;
|
extern Bool g_fClipboard;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
module handle for dynamically loaded comctl32 library
|
|
||||||
*/
|
|
||||||
static HMODULE g_hmodCommonControls = NULL;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function prototypes
|
* Function prototypes
|
||||||
*/
|
*/
|
||||||
|
@ -235,14 +229,6 @@ ddxGiveUp (enum ExitCode error)
|
||||||
* we are guaranteed to not need the DirectDraw functions.
|
* we are guaranteed to not need the DirectDraw functions.
|
||||||
*/
|
*/
|
||||||
winReleaseDDProcAddresses();
|
winReleaseDDProcAddresses();
|
||||||
|
|
||||||
/* Unload our TrackMouseEvent function pointer */
|
|
||||||
if (g_hmodCommonControls != NULL)
|
|
||||||
{
|
|
||||||
FreeLibrary (g_hmodCommonControls);
|
|
||||||
g_hmodCommonControls = NULL;
|
|
||||||
g_fpTrackMouseEvent = (FARPROC) (void (*)(void))NoopDDA;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Free concatenated command line */
|
/* Free concatenated command line */
|
||||||
free(g_pszCommandLine);
|
free(g_pszCommandLine);
|
||||||
|
@ -602,34 +588,17 @@ winFixupPaths (void)
|
||||||
}
|
}
|
||||||
if (getenv("HOME") == NULL)
|
if (getenv("HOME") == NULL)
|
||||||
{
|
{
|
||||||
HMODULE shfolder;
|
|
||||||
SHGETFOLDERPATHPROC shgetfolderpath = NULL;
|
|
||||||
char buffer[MAX_PATH + 5];
|
char buffer[MAX_PATH + 5];
|
||||||
strncpy(buffer, "HOME=", 5);
|
strncpy(buffer, "HOME=", 5);
|
||||||
|
|
||||||
/* Try to load SHGetFolderPath from shfolder.dll and shell32.dll */
|
|
||||||
|
|
||||||
shfolder = LoadLibrary("shfolder.dll");
|
|
||||||
/* fallback to shell32.dll */
|
|
||||||
if (shfolder == NULL)
|
|
||||||
shfolder = LoadLibrary("shell32.dll");
|
|
||||||
|
|
||||||
/* resolve SHGetFolderPath */
|
|
||||||
if (shfolder != NULL)
|
|
||||||
shgetfolderpath = (SHGETFOLDERPATHPROC)GetProcAddress(shfolder, "SHGetFolderPathA");
|
|
||||||
|
|
||||||
/* query appdata directory */
|
/* query appdata directory */
|
||||||
if (shgetfolderpath &&
|
if (SHGetFolderPathA(NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0, buffer + 5) == 0)
|
||||||
shgetfolderpath(NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0,
|
{
|
||||||
buffer + 5) == 0)
|
|
||||||
{
|
|
||||||
putenv(buffer);
|
putenv(buffer);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
winMsg (X_ERROR, "Can not determine HOME directory\n");
|
winMsg (X_ERROR, "Can not determine HOME directory\n");
|
||||||
}
|
}
|
||||||
if (shfolder != NULL)
|
|
||||||
FreeLibrary(shfolder);
|
|
||||||
}
|
}
|
||||||
if (!g_fLogFileChanged) {
|
if (!g_fLogFileChanged) {
|
||||||
static char buffer[MAX_PATH];
|
static char buffer[MAX_PATH];
|
||||||
|
@ -839,10 +808,10 @@ winUseMsg (void)
|
||||||
"\theight and initial position for that screen. Additionally\n"
|
"\theight and initial position for that screen. Additionally\n"
|
||||||
"\ta monitor number can be specified to start the server on,\n"
|
"\ta monitor number can be specified to start the server on,\n"
|
||||||
"\tat which point, all coordinates become relative to that\n"
|
"\tat which point, all coordinates become relative to that\n"
|
||||||
"\tmonitor (Not for Windows NT4 and 95). Examples:\n"
|
"\tmonitor. Examples:\n"
|
||||||
"\t -screen 0 800x600+100+100@2 ; 2nd monitor offset 100,100 size 800x600\n"
|
"\t -screen 0 800x600+100+100@2 ; 2nd monitor offset 100,100 size 800x600\n"
|
||||||
"\t -screen 0 1024x768@3 ; 3rd monitor size 1024x768\n"
|
"\t -screen 0 1024x768@3 ; 3rd monitor size 1024x768\n"
|
||||||
"\t -screen 0 @1 ; on 1st monitor using its full resolution (the default)\n");
|
"\t -screen 0 @1 ; on 1st monitor using its full resolution (the default)\n");
|
||||||
|
|
||||||
ErrorF ("-silent-dup-error\n"
|
ErrorF ("-silent-dup-error\n"
|
||||||
"\tIf another instance of " EXECUTABLE_NAME " with the same display number is running\n"
|
"\tIf another instance of " EXECUTABLE_NAME " with the same display number is running\n"
|
||||||
|
@ -979,27 +948,6 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
|
||||||
/* Detect supported engines */
|
/* Detect supported engines */
|
||||||
winDetectSupportedEngines ();
|
winDetectSupportedEngines ();
|
||||||
|
|
||||||
/* Load common controls library */
|
|
||||||
g_hmodCommonControls = LoadLibraryEx ("comctl32.dll", NULL, 0);
|
|
||||||
|
|
||||||
/* Load TrackMouseEvent function pointer */
|
|
||||||
g_fpTrackMouseEvent = GetProcAddress (g_hmodCommonControls,
|
|
||||||
"_TrackMouseEvent");
|
|
||||||
if (g_fpTrackMouseEvent == NULL)
|
|
||||||
{
|
|
||||||
winErrorFVerb (1, "InitOutput - Could not get pointer to function\n"
|
|
||||||
"\t_TrackMouseEvent in comctl32.dll. Try installing\n"
|
|
||||||
"\tInternet Explorer 3.0 or greater if you have not\n"
|
|
||||||
"\talready.\n");
|
|
||||||
|
|
||||||
/* Free the library since we won't need it */
|
|
||||||
FreeLibrary (g_hmodCommonControls);
|
|
||||||
g_hmodCommonControls = NULL;
|
|
||||||
|
|
||||||
/* Set function pointer to point to no operation function */
|
|
||||||
g_fpTrackMouseEvent = (FARPROC) (void (*)(void))NoopDDA;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Store the instance handle */
|
/* Store the instance handle */
|
||||||
g_hInstance = GetModuleHandle (NULL);
|
g_hInstance = GetModuleHandle (NULL);
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,9 @@
|
||||||
/>
|
/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||||
|
<dpiAware>true</dpiAware>
|
||||||
|
</asmv3:windowsSettings>
|
||||||
|
</asmv3:application>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|
|
@ -1449,7 +1449,7 @@ DECLARE_INTERFACE_(IDirectDraw4,IUnknown)
|
||||||
#define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c))
|
#define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c))
|
||||||
/*** IDirectDraw4 methods ***/
|
/*** IDirectDraw4 methods ***/
|
||||||
#define IDirectDraw4_GetSurfaceFromDC(p,a,b) ICOM_CALL_(GetSurfaceFromDC,p,(p,a,b))
|
#define IDirectDraw4_GetSurfaceFromDC(p,a,b) ICOM_CALL_(GetSurfaceFromDC,p,(p,a,b))
|
||||||
#define IDirectDraw4_RestoreAllSurfaces(pc) ICOM_CALL_(RestoreAllSurfaces,p,(p))
|
#define IDirectDraw4_RestoreAllSurfaces(p) ICOM_CALL_(RestoreAllSurfaces,p,(p))
|
||||||
#define IDirectDraw4_TestCooperativeLevel(p) ICOM_CALL_(TestCooperativeLevel,p,(p))
|
#define IDirectDraw4_TestCooperativeLevel(p) ICOM_CALL_(TestCooperativeLevel,p,(p))
|
||||||
#define IDirectDraw4_GetDeviceIdentifier(p,a,b) ICOM_CALL_(GetDeviceIdentifier,p,(p,a,b))
|
#define IDirectDraw4_GetDeviceIdentifier(p,a,b) ICOM_CALL_(GetDeviceIdentifier,p,(p,a,b))
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
#define WIN_DEFAULT_BLACKPIXEL 0
|
#define WIN_DEFAULT_BLACKPIXEL 0
|
||||||
#define WIN_DEFAULT_LINEBIAS 0
|
#define WIN_DEFAULT_LINEBIAS 0
|
||||||
#define WIN_DEFAULT_E3B_TIME 50 /* milliseconds */
|
#define WIN_DEFAULT_E3B_TIME 50 /* milliseconds */
|
||||||
#define WIN_DEFAULT_DPI 75
|
#define WIN_DEFAULT_DPI 96
|
||||||
#define WIN_DEFAULT_REFRESH 0
|
#define WIN_DEFAULT_REFRESH 0
|
||||||
#define WIN_DEFAULT_WIN_KILL TRUE
|
#define WIN_DEFAULT_WIN_KILL TRUE
|
||||||
#define WIN_DEFAULT_UNIX_KILL FALSE
|
#define WIN_DEFAULT_UNIX_KILL FALSE
|
||||||
|
@ -673,7 +673,6 @@ extern DeviceIntPtr g_pwinKeyboard;
|
||||||
|
|
||||||
extern FARPROC g_fpDirectDrawCreate;
|
extern FARPROC g_fpDirectDrawCreate;
|
||||||
extern FARPROC g_fpDirectDrawCreateClipper;
|
extern FARPROC g_fpDirectDrawCreateClipper;
|
||||||
extern FARPROC g_fpTrackMouseEvent;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -56,8 +56,6 @@ extern void *g_pClipboardDisplay;
|
||||||
extern Window g_iClipboardWindow;
|
extern Window g_iClipboardWindow;
|
||||||
extern Atom g_atomLastOwnedSelection;
|
extern Atom g_atomLastOwnedSelection;
|
||||||
|
|
||||||
/* BPS - g_hwndClipboard needed for X app->Windows paste fix */
|
|
||||||
extern HWND g_hwndClipboard;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local function prototypes
|
* Local function prototypes
|
||||||
|
@ -143,12 +141,6 @@ winProcessXEventsTimeout (HWND hwnd, int iWindow, Display *pDisplay,
|
||||||
* Process a given Windows message
|
* Process a given Windows message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* BPS - Define our own message, which we'll post to ourselves to facilitate
|
|
||||||
* resetting the delayed rendering mechanism after each paste from X app to
|
|
||||||
* Windows app. TODO - Perhaps move to win.h with the other WM_USER messages.
|
|
||||||
*/
|
|
||||||
#define WM_USER_PASTE_COMPLETE (WM_USER + 1003)
|
|
||||||
|
|
||||||
LRESULT CALLBACK
|
LRESULT CALLBACK
|
||||||
winClipboardWindowProc (HWND hwnd, UINT message,
|
winClipboardWindowProc (HWND hwnd, UINT message,
|
||||||
WPARAM wParam, LPARAM lParam)
|
WPARAM wParam, LPARAM lParam)
|
||||||
|
@ -343,6 +335,8 @@ winClipboardWindowProc (HWND hwnd, UINT message,
|
||||||
* previous XSetSelectionOwner messages.
|
* previous XSetSelectionOwner messages.
|
||||||
*/
|
*/
|
||||||
XSync (pDisplay, FALSE);
|
XSync (pDisplay, FALSE);
|
||||||
|
|
||||||
|
winDebug("winClipboardWindowProc - XSync done.\n");
|
||||||
|
|
||||||
/* Release PRIMARY selection if owned */
|
/* Release PRIMARY selection if owned */
|
||||||
iReturn = XGetSelectionOwner (pDisplay, XA_PRIMARY);
|
iReturn = XGetSelectionOwner (pDisplay, XA_PRIMARY);
|
||||||
|
@ -540,13 +534,6 @@ winClipboardWindowProc (HWND hwnd, UINT message,
|
||||||
ErrorF("winClipboardWindowProc - timed out waiting for WIN_XEVENTS_NOTIFY\n");
|
ErrorF("winClipboardWindowProc - timed out waiting for WIN_XEVENTS_NOTIFY\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* BPS - Post ourselves a user message whose handler will reset the
|
|
||||||
* delayed rendering mechanism after the paste is complete. This is
|
|
||||||
* necessary because calling SetClipboardData() with a NULL argument
|
|
||||||
* here will cause the data we just put on the clipboard to be lost!
|
|
||||||
*/
|
|
||||||
PostMessage(g_hwndClipboard, WM_USER_PASTE_COMPLETE, 0, 0);
|
|
||||||
|
|
||||||
/* Special handling for WM_RENDERALLFORMATS */
|
/* Special handling for WM_RENDERALLFORMATS */
|
||||||
if (message == WM_RENDERALLFORMATS)
|
if (message == WM_RENDERALLFORMATS)
|
||||||
{
|
{
|
||||||
|
@ -564,37 +551,6 @@ winClipboardWindowProc (HWND hwnd, UINT message,
|
||||||
winDebug ("winClipboardWindowProc - WM_RENDER*FORMAT - Returning.\n");
|
winDebug ("winClipboardWindowProc - WM_RENDER*FORMAT - Returning.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* BPS - This WM_USER message is posted by us. It gives us the opportunity
|
|
||||||
* to reset the delayed rendering mechanism after each and every paste
|
|
||||||
* from an X app to a Windows app. Without such a mechanism, subsequent
|
|
||||||
* changes of selection in the X app owning the selection are not
|
|
||||||
* reflected in pastes into Windows apps, since Windows won't send us the
|
|
||||||
* WM_RENDERFORMAT message unless someone has set changed data (or NULL)
|
|
||||||
* on the clipboard. */
|
|
||||||
case WM_USER_PASTE_COMPLETE:
|
|
||||||
{
|
|
||||||
if (hwnd != GetClipboardOwner ())
|
|
||||||
/* In case we've lost the selection since posting the message */
|
|
||||||
return 0;
|
|
||||||
winDebug ("winClipboardWindowProc - WM_USER_PASTE_COMPLETE\n");
|
|
||||||
|
|
||||||
/* Set up for another delayed rendering callback */
|
|
||||||
OpenClipboard (g_hwndClipboard);
|
|
||||||
|
|
||||||
/* Take ownership of the Windows clipboard */
|
|
||||||
EmptyClipboard ();
|
|
||||||
|
|
||||||
/* Advertise Unicode if we support it */
|
|
||||||
if (g_fUnicodeSupport)
|
|
||||||
SetClipboardData (CF_UNICODETEXT, NULL);
|
|
||||||
|
|
||||||
/* Always advertise regular text */
|
|
||||||
SetClipboardData (CF_TEXT, NULL);
|
|
||||||
|
|
||||||
/* Release the clipboard */
|
|
||||||
CloseClipboard ();
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Let Windows perform default processing for unhandled messages */
|
/* Let Windows perform default processing for unhandled messages */
|
||||||
|
|
|
@ -78,13 +78,6 @@ Bool g_fSoftwareCursor = FALSE;
|
||||||
Bool g_fSilentDupError = FALSE;
|
Bool g_fSilentDupError = FALSE;
|
||||||
Bool g_fNativeGl = FALSE;
|
Bool g_fNativeGl = FALSE;
|
||||||
|
|
||||||
/*
|
|
||||||
* Global variables for dynamically loaded libraries and
|
|
||||||
* their function pointers
|
|
||||||
*/
|
|
||||||
|
|
||||||
FARPROC g_fpTrackMouseEvent = (FARPROC) (void (*)(void))NoopDDA;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef XWIN_CLIPBOARD
|
#ifdef XWIN_CLIPBOARD
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -53,30 +53,8 @@ wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _d
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef WINAPI wBOOL (*ENUMDISPLAYMONITORSPROC)(HDC,LPCRECT,MONITORENUMPROC,LPARAM);
|
|
||||||
ENUMDISPLAYMONITORSPROC _EnumDisplayMonitors;
|
|
||||||
|
|
||||||
wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data);
|
|
||||||
|
|
||||||
Bool QueryMonitor(int index, struct GetMonitorInfoData *data)
|
Bool QueryMonitor(int index, struct GetMonitorInfoData *data)
|
||||||
{
|
{
|
||||||
/* Load EnumDisplayMonitors from DLL */
|
|
||||||
HMODULE user32;
|
|
||||||
FARPROC func;
|
|
||||||
user32 = LoadLibrary("user32.dll");
|
|
||||||
if (user32 == NULL)
|
|
||||||
{
|
|
||||||
winW32Error(2, "Could not open user32.dll");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
func = GetProcAddress(user32, "EnumDisplayMonitors");
|
|
||||||
if (func == NULL)
|
|
||||||
{
|
|
||||||
winW32Error(2, "Could not resolve EnumDisplayMonitors: ");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
_EnumDisplayMonitors = (ENUMDISPLAYMONITORSPROC)func;
|
|
||||||
|
|
||||||
/* prepare data */
|
/* prepare data */
|
||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -84,9 +62,5 @@ Bool QueryMonitor(int index, struct GetMonitorInfoData *data)
|
||||||
data->requestedMonitor = index;
|
data->requestedMonitor = index;
|
||||||
|
|
||||||
/* query information */
|
/* query information */
|
||||||
_EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data);
|
return EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data);
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
FreeLibrary(user32);
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -549,8 +549,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
||||||
tme.hwndTrack = hwnd;
|
tme.hwndTrack = hwnd;
|
||||||
|
|
||||||
/* Call the tracking function */
|
/* Call the tracking function */
|
||||||
if (!(*g_fpTrackMouseEvent) (&tme))
|
if (!TrackMouseEvent(&tme))
|
||||||
ErrorF ("winTopLevelWindowProc - _TrackMouseEvent failed\n");
|
ErrorF ("winTopLevelWindowProc - TrackMouseEvent failed\n");
|
||||||
|
|
||||||
/* Flag that we are tracking now */
|
/* Flag that we are tracking now */
|
||||||
s_fTracking = TRUE;
|
s_fTracking = TRUE;
|
||||||
|
|
|
@ -88,12 +88,27 @@ winInitializeScreenDefaults(void)
|
||||||
dwWidth = GetSystemMetrics (SM_CXSCREEN);
|
dwWidth = GetSystemMetrics (SM_CXSCREEN);
|
||||||
dwHeight = GetSystemMetrics (SM_CYSCREEN);
|
dwHeight = GetSystemMetrics (SM_CYSCREEN);
|
||||||
|
|
||||||
winErrorFVerb (2, "winInitializeScreenDefaults - w %d h %d\n",
|
winErrorFVerb(2, "winInitializeScreenDefaults - primary monitor w %d h %d\n", (int) dwWidth, (int) dwHeight);
|
||||||
(int) dwWidth, (int) dwHeight);
|
|
||||||
|
|
||||||
/* Set a default DPI, if no parameter was passed */
|
/* Set a default DPI, if no '-dpi' option was used */
|
||||||
if (monitorResolution == 0)
|
if (monitorResolution == 0)
|
||||||
monitorResolution = WIN_DEFAULT_DPI;
|
{
|
||||||
|
HDC hdc = GetDC(NULL);
|
||||||
|
if (hdc)
|
||||||
|
{
|
||||||
|
int dpiX = GetDeviceCaps(hdc, LOGPIXELSX);
|
||||||
|
int dpiY = GetDeviceCaps(hdc, LOGPIXELSY);
|
||||||
|
|
||||||
|
winErrorFVerb(2, "winInitializeDefaultScreens - native DPI x %d y %d\n", dpiX, dpiY);
|
||||||
|
monitorResolution = dpiY;
|
||||||
|
ReleaseDC(NULL, hdc);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
winErrorFVerb(1, "winInitializeDefaultScreens - Failed to retrieve native DPI, falling back to default of %d DPI\n", WIN_DEFAULT_DPI);
|
||||||
|
monitorResolution = WIN_DEFAULT_DPI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
defaultScreenInfo.iMonitor = 1;
|
defaultScreenInfo.iMonitor = 1;
|
||||||
defaultScreenInfo.dwWidth = dwWidth;
|
defaultScreenInfo.dwWidth = dwWidth;
|
||||||
|
@ -311,8 +326,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
struct GetMonitorInfoData data;
|
struct GetMonitorInfoData data;
|
||||||
if (!QueryMonitor(iMonitor, &data))
|
if (!QueryMonitor(iMonitor, &data))
|
||||||
{
|
{
|
||||||
ErrorF ("ddxProcessArgument - screen - "
|
ErrorF ("ddxProcessArgument - screen - Querying monitors failed\n");
|
||||||
"Querying monitors is not supported on NT4 and Win95\n");
|
|
||||||
} else if (data.bMonitorSpecifiedExists == TRUE)
|
} else if (data.bMonitorSpecifiedExists == TRUE)
|
||||||
{
|
{
|
||||||
winErrorFVerb(2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
|
winErrorFVerb(2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
|
||||||
|
@ -368,8 +382,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
struct GetMonitorInfoData data;
|
struct GetMonitorInfoData data;
|
||||||
if (!QueryMonitor(iMonitor, &data))
|
if (!QueryMonitor(iMonitor, &data))
|
||||||
{
|
{
|
||||||
ErrorF ("ddxProcessArgument - screen - "
|
ErrorF ("ddxProcessArgument - screen - Querying monitors failed\n");
|
||||||
"Querying monitors is not supported on NT4 and Win95\n");
|
|
||||||
} else if (data.bMonitorSpecifiedExists == TRUE)
|
} else if (data.bMonitorSpecifiedExists == TRUE)
|
||||||
{
|
{
|
||||||
g_ScreenInfo[nScreenNum].iMonitor = iMonitor;
|
g_ScreenInfo[nScreenNum].iMonitor = iMonitor;
|
||||||
|
@ -396,8 +409,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
struct GetMonitorInfoData data;
|
struct GetMonitorInfoData data;
|
||||||
if (!QueryMonitor(iMonitor, &data))
|
if (!QueryMonitor(iMonitor, &data))
|
||||||
{
|
{
|
||||||
ErrorF ("ddxProcessArgument - screen - "
|
ErrorF ("ddxProcessArgument - screen - Querying monitors failed\n");
|
||||||
"Querying monitors is not supported on NT4 and Win95\n");
|
|
||||||
} else if (data.bMonitorSpecifiedExists == TRUE)
|
} else if (data.bMonitorSpecifiedExists == TRUE)
|
||||||
{
|
{
|
||||||
winErrorFVerb (2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
|
winErrorFVerb (2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
|
||||||
|
|
|
@ -547,8 +547,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
|
||||||
tme.hwndTrack = hwnd;
|
tme.hwndTrack = hwnd;
|
||||||
|
|
||||||
/* Call the tracking function */
|
/* Call the tracking function */
|
||||||
if (!(*g_fpTrackMouseEvent) (&tme))
|
if (!TrackMouseEvent(&tme))
|
||||||
ErrorF ("winMWExtWMWindowProc - _TrackMouseEvent failed\n");
|
ErrorF ("winMWExtWMWindowProc - TrackMouseEvent failed\n");
|
||||||
|
|
||||||
/* Flag that we are tracking now */
|
/* Flag that we are tracking now */
|
||||||
s_fTracking = TRUE;
|
s_fTracking = TRUE;
|
||||||
|
|
|
@ -776,8 +776,8 @@ winWindowProc (HWND hwnd, UINT message,
|
||||||
tme.hwndTrack = hwnd;
|
tme.hwndTrack = hwnd;
|
||||||
|
|
||||||
/* Call the tracking function */
|
/* Call the tracking function */
|
||||||
if (!(*g_fpTrackMouseEvent) (&tme))
|
if (!TrackMouseEvent(&tme))
|
||||||
ErrorF ("winWindowProc - _TrackMouseEvent failed\n");
|
ErrorF ("winWindowProc - TrackMouseEvent failed\n");
|
||||||
|
|
||||||
/* Flag that we are tracking now */
|
/* Flag that we are tracking now */
|
||||||
s_fTracking = TRUE;
|
s_fTracking = TRUE;
|
||||||
|
|
|
@ -44,7 +44,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
/* from ddxLoad.c */
|
/* from ddxLoad.c */
|
||||||
extern const char* Win32TempDir();
|
extern const char* Win32TempDir(void);
|
||||||
extern int Win32System(const char *cmdline);
|
extern int Win32System(const char *cmdline);
|
||||||
#undef System
|
#undef System
|
||||||
#define System Win32System
|
#define System Win32System
|
||||||
|
@ -126,10 +126,11 @@ XkbDDXListComponent( DeviceIntPtr dev,
|
||||||
char *file,*map,*tmp,*buf=NULL;
|
char *file,*map,*tmp,*buf=NULL;
|
||||||
FILE *in;
|
FILE *in;
|
||||||
Status status;
|
Status status;
|
||||||
int rval;
|
|
||||||
Bool haveDir;
|
Bool haveDir;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
char tmpname[PATH_MAX];
|
char tmpname[PATH_MAX];
|
||||||
|
#else
|
||||||
|
int rval;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((list->pattern[what]==NULL)||(list->pattern[what][0]=='\0'))
|
if ((list->pattern[what]==NULL)||(list->pattern[what][0]=='\0'))
|
||||||
|
@ -223,6 +224,9 @@ char tmpname[PATH_MAX];
|
||||||
buf = malloc(PATH_MAX * sizeof(char));
|
buf = malloc(PATH_MAX * sizeof(char));
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
#ifdef WIN32
|
||||||
|
unlink(tmpname);
|
||||||
|
#endif
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
|
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
|
||||||
|
|
|
@ -267,6 +267,9 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
|
||||||
nameRtrn[nameRtrnLen-1]= '\0';
|
nameRtrn[nameRtrnLen-1]= '\0';
|
||||||
}
|
}
|
||||||
free(buf);
|
free(buf);
|
||||||
|
#ifdef WIN32
|
||||||
|
unlink(tmpname);
|
||||||
|
#endif
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue