Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ce829bdc
Commit
ce829bdc
authored
Feb 25, 2000
by
James Abbatiello
Committed by
Alexandre Julliard
Feb 25, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better thread safety for WarpPointer hack.
parent
60532568
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
17 deletions
+14
-17
mouse_main.c
dlls/mouse/mouse_main.c
+2
-3
mouse.h
include/mouse.h
+1
-1
ttydrv.h
include/ttydrv.h
+1
-1
x11drv.h
include/x11drv.h
+1
-2
mouse.c
windows/ttydrv/mouse.c
+2
-2
mouse.c
windows/x11drv/mouse.c
+7
-8
No files found.
dlls/mouse/mouse_main.c
View file @
ce829bdc
...
...
@@ -109,7 +109,6 @@ void MOUSE_SendEvent( DWORD mouseStatus, DWORD posX, DWORD posY,
int
height
=
MONITOR_GetHeight
(
&
MONITOR_PrimaryMonitor
);
int
iWndsLocks
;
WINE_MOUSEEVENT
wme
;
BOOL
bOldWarpPointer
;
if
(
!
DefMouseEventProc
)
return
;
...
...
@@ -128,11 +127,11 @@ void MOUSE_SendEvent( DWORD mouseStatus, DWORD posX, DWORD posY,
wme
.
hWnd
=
hWnd
;
wme
.
keyState
=
keyState
;
bOldWarpPointer
=
MOUSE_Driver
->
pEnableWarpPointer
(
FALSE
);
MOUSE_Driver
->
pEnableWarpPointer
(
FALSE
);
/* To avoid deadlocks, we have to suspend all locks on windows structures
before the program control is passed to the mouse driver */
iWndsLocks
=
WIN_SuspendWndsLock
();
DefMouseEventProc
(
mouseStatus
,
posX
,
posY
,
0
,
(
DWORD
)
&
wme
);
WIN_RestoreWndsLock
(
iWndsLocks
);
MOUSE_Driver
->
pEnableWarpPointer
(
bOldWarpPointer
);
MOUSE_Driver
->
pEnableWarpPointer
(
TRUE
);
}
include/mouse.h
View file @
ce829bdc
...
...
@@ -38,7 +38,7 @@ typedef struct tagMOUSE_DRIVER {
VOID
(
*
pInit
)(
VOID
);
VOID
(
*
pSetCursor
)(
struct
tagCURSORICONINFO
*
);
VOID
(
*
pMoveCursor
)(
WORD
,
WORD
);
BOOL
(
*
pEnableWarpPointer
)(
BOOL
);
LONG
(
*
pEnableWarpPointer
)(
BOOL
);
}
MOUSE_DRIVER
;
extern
MOUSE_DRIVER
*
MOUSE_Driver
;
...
...
include/ttydrv.h
View file @
ce829bdc
...
...
@@ -217,7 +217,7 @@ extern struct tagMOUSE_DRIVER TTYDRV_MOUSE_Driver;
extern
void
TTYDRV_MOUSE_Init
();
extern
void
TTYDRV_MOUSE_SetCursor
(
struct
tagCURSORICONINFO
*
lpCursor
);
extern
void
TTYDRV_MOUSE_MoveCursor
(
WORD
wAbsX
,
WORD
wAbsY
);
extern
BOOL
TTYDRV_MOUSE_EnableWarpPointer
(
BOOL
bEnable
);
extern
LONG
TTYDRV_MOUSE_EnableWarpPointer
(
BOOL
bEnable
);
/* TTY windows driver */
...
...
include/x11drv.h
View file @
ce829bdc
...
...
@@ -438,11 +438,10 @@ extern void X11DRV_MONITOR_SetScreenSaveTimeout(struct tagMONITOR *pMonitor, int
extern
struct
tagMOUSE_DRIVER
X11DRV_MOUSE_Driver
;
extern
BOOL
X11DRV_MOUSE_DisableWarpPointer
;
extern
void
X11DRV_MOUSE_Init
();
extern
void
X11DRV_MOUSE_SetCursor
(
struct
tagCURSORICONINFO
*
lpCursor
);
extern
void
X11DRV_MOUSE_MoveCursor
(
WORD
wAbsX
,
WORD
wAbsY
);
extern
BOOL
X11DRV_MOUSE_EnableWarpPointer
(
BOOL
bEnable
);
extern
LONG
X11DRV_MOUSE_EnableWarpPointer
(
BOOL
bEnable
);
/* X11 windows driver */
...
...
windows/ttydrv/mouse.c
View file @
ce829bdc
...
...
@@ -23,9 +23,9 @@ void TTYDRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY)
/***********************************************************************
* TTYDRV_MOUSE_EnableWarpPointer
*/
BOOL
TTYDRV_MOUSE_EnableWarpPointer
(
BOOL
bEnable
)
LONG
TTYDRV_MOUSE_EnableWarpPointer
(
BOOL
bEnable
)
{
return
TRUE
;
return
0
;
}
/***********************************************************************
...
...
windows/x11drv/mouse.c
View file @
ce829bdc
...
...
@@ -23,7 +23,7 @@ DEFAULT_DEBUG_CHANNEL(cursor)
Cursor
X11DRV_MOUSE_XCursor
=
None
;
/* Current X cursor */
static
BOOL
X11DRV_MOUSE_WarpPointer
=
TRUE
;
/* hack; see DISPLAY_MoveCursor */
static
LONG
X11DRV_MOUSE_WarpPointer
=
0
;
/* hack; see DISPLAY_MoveCursor */
/***********************************************************************
* X11DRV_MOUSE_DoSetCursor
...
...
@@ -226,7 +226,7 @@ void X11DRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY)
int
rootX
,
rootY
,
winX
,
winY
;
unsigned
int
xstate
;
if
(
!
X11DRV_MOUSE_WarpPointer
)
return
;
if
(
X11DRV_MOUSE_WarpPointer
<
0
)
return
;
if
(
!
TSXQueryPointer
(
display
,
X11DRV_GetXRootWindow
(),
&
root
,
&
child
,
&
rootX
,
&
rootY
,
&
winX
,
&
winY
,
&
xstate
))
...
...
@@ -244,13 +244,12 @@ void X11DRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY)
/***********************************************************************
* X11DRV_MOUSE_EnableWarpPointer
*/
BOOL
X11DRV_MOUSE_EnableWarpPointer
(
BOOL
bEnable
)
LONG
X11DRV_MOUSE_EnableWarpPointer
(
BOOL
bEnable
)
{
BOOL
bOldEnable
=
X11DRV_MOUSE_WarpPointer
;
X11DRV_MOUSE_WarpPointer
=
bEnable
;
return
bOldEnable
;
if
(
bEnable
)
return
InterlockedIncrement
(
&
X11DRV_MOUSE_WarpPointer
);
else
return
InterlockedDecrement
(
&
X11DRV_MOUSE_WarpPointer
);
}
/***********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment