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
10f5ff7f
Commit
10f5ff7f
authored
May 10, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Update desktop cursor window when cursor pos changes.
parent
3c4be985
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
queue.c
server/queue.c
+19
-11
No files found.
server/queue.c
View file @
10f5ff7f
...
...
@@ -404,8 +404,16 @@ static struct message *alloc_hardware_message( lparam_t info, struct hw_msg_sour
return
msg
;
}
static
int
update_desktop_cursor_
pos
(
struct
desktop
*
desktop
,
int
x
,
int
y
)
static
int
update_desktop_cursor_
window
(
struct
desktop
*
desktop
,
user_handle_t
win
)
{
int
updated
=
win
!=
desktop
->
cursor
.
win
;
desktop
->
cursor
.
win
=
win
;
return
updated
;
}
static
int
update_desktop_cursor_pos
(
struct
desktop
*
desktop
,
user_handle_t
win
,
int
x
,
int
y
)
{
struct
thread_input
*
input
;
int
updated
;
x
=
max
(
min
(
x
,
desktop
->
cursor
.
clip
.
right
-
1
),
desktop
->
cursor
.
clip
.
left
);
...
...
@@ -415,6 +423,11 @@ static int update_desktop_cursor_pos( struct desktop *desktop, int x, int y )
desktop
->
cursor
.
y
=
y
;
desktop
->
cursor
.
last_change
=
get_tick_count
();
if
(
!
win
&&
(
input
=
desktop
->
foreground_input
))
win
=
input
->
capture
;
if
(
!
win
||
!
is_window_visible
(
win
)
||
is_window_transparent
(
win
))
win
=
shallow_window_from_point
(
desktop
,
x
,
y
);
if
(
update_desktop_cursor_window
(
desktop
,
win
))
updated
=
1
;
return
updated
;
}
...
...
@@ -427,7 +440,7 @@ static void set_cursor_pos( struct desktop *desktop, int x, int y )
if
((
device
=
current
->
process
->
rawinput_mouse
)
&&
(
device
->
flags
&
RIDEV_NOLEGACY
))
{
update_desktop_cursor_pos
(
desktop
,
x
,
y
);
update_desktop_cursor_pos
(
desktop
,
0
,
x
,
y
);
return
;
}
...
...
@@ -1457,11 +1470,8 @@ static void update_input_key_state( struct desktop *desktop, unsigned char *keys
}
/* update the desktop key state according to a mouse message flags */
static
void
update_desktop_mouse_state
(
struct
desktop
*
desktop
,
unsigned
int
flags
,
int
x
,
int
y
,
lparam_t
wparam
)
static
void
update_desktop_mouse_state
(
struct
desktop
*
desktop
,
unsigned
int
flags
,
lparam_t
wparam
)
{
if
(
flags
&
MOUSEEVENTF_MOVE
)
update_desktop_cursor_pos
(
desktop
,
x
,
y
);
if
(
flags
&
MOUSEEVENTF_LEFTDOWN
)
update_input_key_state
(
desktop
,
desktop
->
keystate
,
WM_LBUTTONDOWN
,
wparam
);
if
(
flags
&
MOUSEEVENTF_LEFTUP
)
...
...
@@ -1630,7 +1640,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
break
;
case
QS_MOUSEMOVE
:
prepend_cursor_history
(
msg
->
x
,
msg
->
y
,
msg
->
time
,
msg_data
->
info
);
if
(
update_desktop_cursor_pos
(
desktop
,
msg
->
x
,
msg
->
y
))
always_queue
=
1
;
if
(
update_desktop_cursor_pos
(
desktop
,
msg
->
win
,
msg
->
x
,
msg
->
y
))
always_queue
=
1
;
/* fallthrough */
case
QS_MOUSEBUTTON
:
if
(
desktop
->
keystate
[
VK_LBUTTON
]
&
0x80
)
msg
->
wparam
|=
MK_LBUTTON
;
...
...
@@ -1661,9 +1671,6 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
}
input
=
thread
->
queue
->
input
;
if
(
win
!=
desktop
->
cursor
.
win
)
always_queue
=
1
;
desktop
->
cursor
.
win
=
win
;
if
(
!
always_queue
||
merge_message
(
input
,
msg
))
free_message
(
msg
);
else
{
...
...
@@ -1887,7 +1894,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
if
((
device
=
current
->
process
->
rawinput_mouse
)
&&
(
device
->
flags
&
RIDEV_NOLEGACY
))
{
update_desktop_mouse_state
(
desktop
,
flags
,
x
,
y
,
input
->
mouse
.
data
<<
16
);
if
(
flags
&
MOUSEEVENTF_MOVE
)
update_desktop_cursor_pos
(
desktop
,
win
,
x
,
y
);
update_desktop_mouse_state
(
desktop
,
flags
,
input
->
mouse
.
data
<<
16
);
return
0
;
}
...
...
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