From 3cf76019d6d0ddf513735c144c7f0146c79d8021 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Thu, 12 Aug 2010 15:50:34 +0400 Subject: [PATCH] winex11.drv: Do not call user32 functions if wine_tsx11_lock is called (eterbug #5799). Conflicts: dlls/winex11.drv/mouse.c Conflicts: dlls/winex11.drv/mouse.c --- dlls/winex11.drv/mouse.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 59347bc175..f5bde46407 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -898,6 +898,9 @@ BOOL CDECL X11DRV_GetCursorPos(LPPOINT pos) int rootX, rootY, winX, winY; unsigned int xstate; BOOL ret; + char class[80]; + WINDOWINFO pwi; + HWND hwnd; wine_tsx11_lock(); ret = XQueryPointer( display, root_window, &root, &child, &rootX, &rootY, &winX, &winY, &xstate ); @@ -907,18 +910,16 @@ BOOL CDECL X11DRV_GetCursorPos(LPPOINT pos) pos->y = winY + virtual_screen_rect.top; TRACE("pointer at (%d,%d)\n", pos->x, pos->y ); } + /* EterBug 1695 */ - WINDOWINFO pwi; - HWND hwnd = WindowFromPoint(*pos); + hwnd = WindowFromPoint(*pos); GetWindowInfo(hwnd,&pwi); - char class[80]; GetClassNameA(hwnd,class,sizeof class); if((GetActiveWindow()==0)&&(!(strcmp(class, "V8Dockbar"))||!(strcmp(class, "V8CommandBar")))) { pos->y=0; } - wine_tsx11_unlock(); return ret; } -- 2.33.8