Update guimisc.c
This commit is contained in:
parent
b4266103e3
commit
fc693736c9
|
@ -352,11 +352,11 @@ _FX HWND Gui_SetParent(HWND hWndChild, HWND hWndNewParent)
|
|||
|
||||
_FX BOOL Gui_ClipCursor(const RECT *lpRect)
|
||||
{
|
||||
if (SbieApi_QueryConfBool(NULL, "BlockInterferenceControl", FALSE) && lpRect)
|
||||
{
|
||||
if (SbieApi_QueryConfBool(NULL, "BlockInterferenceControl", FALSE) && lpRect) {
|
||||
SetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!Gui_UseProxyService)
|
||||
return __sys_ClipCursor(lpRect);
|
||||
|
||||
|
@ -519,8 +519,10 @@ _FX BOOL Gui_SetCursorPos(int x, int y)
|
|||
if (SbieApi_QueryConfBool(NULL, "BlockInterferenceControl", FALSE)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!Gui_UseProxyService)
|
||||
return __sys_SetCursorPos(x, y);
|
||||
|
||||
GUI_SET_CURSOR_POS_REQ req;
|
||||
GUI_SET_CURSOR_POS_RPL *rpl;
|
||||
ULONG error;
|
||||
|
@ -554,12 +556,12 @@ _FX BOOL Gui_SetForegroundWindow(HWND hWnd)
|
|||
{
|
||||
GUI_SET_FOREGROUND_WINDOW_REQ req;
|
||||
void *rpl;
|
||||
if (SbieApi_QueryConfBool(NULL, "BlockInterferenceControl", FALSE))
|
||||
{
|
||||
if (SbieApi_QueryConfBool(NULL, "BlockInterferenceControl", FALSE)) {
|
||||
SetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
if (__sys_IsWindow(hWnd) || (! hWnd)|| !Gui_UseProxyService) {
|
||||
|
||||
if (!Gui_UseProxyService || __sys_IsWindow(hWnd) || (! hWnd)) {
|
||||
// window is in the same sandbox (or is NULL), no need for GUI Proxy
|
||||
return __sys_SetForegroundWindow(hWnd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue