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
c0d1ff59
Commit
c0d1ff59
authored
Jun 14, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store the current cursor in the thread queue instead of globally.
parent
e4a33c06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
21 deletions
+24
-21
queue.h
include/queue.h
+3
-0
cursoricon.c
windows/cursoricon.c
+21
-21
No files found.
include/queue.h
View file @
c0d1ff59
...
...
@@ -62,6 +62,9 @@ typedef struct tagMESSAGEQUEUE
DWORD
GetMessagePosVal
;
/* Value for GetMessagePos */
DWORD
GetMessageExtraInfoVal
;
/* Value for GetMessageExtraInfo */
HCURSOR
cursor
;
/* current cursor */
INT
cursor_count
;
/* cursor show count */
HANDLE16
hCurHook
;
/* Current hook */
HANDLE16
hooks
[
WH_NB_HOOKS
];
/* Task hooks list */
...
...
windows/cursoricon.c
View file @
c0d1ff59
...
...
@@ -56,6 +56,7 @@
#include "module.h"
#include "wine/debug.h"
#include "user.h"
#include "queue.h"
#include "input.h"
#include "message.h"
#include "winerror.h"
...
...
@@ -65,8 +66,6 @@ WINE_DECLARE_DEBUG_CHANNEL(cursor);
WINE_DECLARE_DEBUG_CHANNEL
(
icon
);
WINE_DECLARE_DEBUG_CHANNEL
(
resource
);
static
HCURSOR
hActiveCursor
=
0
;
/* Active cursor */
static
INT
CURSOR_ShowCount
=
0
;
/* Cursor display count */
static
RECT
CURSOR_ClipRect
;
/* Cursor clipping rect */
static
HDC
screen_dc
;
...
...
@@ -1220,7 +1219,7 @@ WORD WINAPI DestroyIcon32( HGLOBAL16 handle, UINT16 flags )
/* Check whether destroying active cursor */
if
(
hActiveC
ursor
==
handle
)
if
(
QUEUE_Current
()
->
c
ursor
==
handle
)
{
WARN_
(
cursor
)(
"Destroying active cursor!
\n
"
);
SetCursor
(
0
);
...
...
@@ -1368,20 +1367,20 @@ HCURSOR16 WINAPI SetCursor16( HCURSOR16 hCursor )
* RETURNS:
* A handle to the previous cursor shape.
*/
HCURSOR
WINAPI
SetCursor
(
HCURSOR
hCursor
/* [in] Handle of cursor to show */
)
{
HCURSOR
WINAPI
SetCursor
(
HCURSOR
hCursor
/* [in] Handle of cursor to show */
)
{
MESSAGEQUEUE
*
queue
=
QUEUE_Current
();
HCURSOR
hOldCursor
;
if
(
hCursor
==
hActiveCursor
)
return
hActive
Cursor
;
/* No change */
if
(
hCursor
==
queue
->
cursor
)
return
h
Cursor
;
/* No change */
TRACE_
(
cursor
)(
"%04x
\n
"
,
hCursor
);
hOldCursor
=
hActiveC
ursor
;
hActiveC
ursor
=
hCursor
;
hOldCursor
=
queue
->
c
ursor
;
queue
->
c
ursor
=
hCursor
;
/* Change the cursor shape only if it is visible */
if
(
CURSOR_ShowC
ount
>=
0
)
if
(
queue
->
cursor_c
ount
>=
0
)
{
USER_Driver
.
pSetCursor
(
(
CURSORICONINFO
*
)
GlobalLock16
(
h
Active
Cursor
)
);
GlobalUnlock16
(
h
Active
Cursor
);
USER_Driver
.
pSetCursor
(
(
CURSORICONINFO
*
)
GlobalLock16
(
hCursor
)
);
GlobalUnlock16
(
hCursor
);
}
return
hOldCursor
;
}
...
...
@@ -1401,23 +1400,24 @@ INT16 WINAPI ShowCursor16( BOOL16 bShow )
*/
INT
WINAPI
ShowCursor
(
BOOL
bShow
)
{
TRACE_
(
cursor
)(
"%d, count=%d
\n
"
,
bShow
,
CURSOR_ShowCount
);
MESSAGEQUEUE
*
queue
=
QUEUE_Current
();
TRACE_
(
cursor
)(
"%d, count=%d
\n
"
,
bShow
,
queue
->
cursor_count
);
if
(
bShow
)
{
if
(
++
CURSOR_ShowC
ount
==
0
)
/* Show it */
if
(
++
queue
->
cursor_c
ount
==
0
)
/* Show it */
{
USER_Driver
.
pSetCursor
(
(
CURSORICONINFO
*
)
GlobalLock16
(
hActiveC
ursor
)
);
GlobalUnlock16
(
hActiveC
ursor
);
USER_Driver
.
pSetCursor
(
(
CURSORICONINFO
*
)
GlobalLock16
(
queue
->
c
ursor
)
);
GlobalUnlock16
(
queue
->
c
ursor
);
}
}
else
{
if
(
--
CURSOR_ShowC
ount
==
-
1
)
/* Hide it */
if
(
--
queue
->
cursor_c
ount
==
-
1
)
/* Hide it */
USER_Driver
.
pSetCursor
(
NULL
);
}
return
CURSOR_ShowC
ount
;
return
queue
->
cursor_c
ount
;
}
...
...
@@ -1426,7 +1426,7 @@ INT WINAPI ShowCursor( BOOL bShow )
*/
HCURSOR16
WINAPI
GetCursor16
(
void
)
{
return
hActiveCursor
;
return
GetCursor
()
;
}
...
...
@@ -1435,7 +1435,7 @@ HCURSOR16 WINAPI GetCursor16(void)
*/
HCURSOR
WINAPI
GetCursor
(
void
)
{
return
hActiveC
ursor
;
return
QUEUE_Current
()
->
c
ursor
;
}
...
...
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