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
39bac051
Commit
39bac051
authored
Apr 06, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Queue a WM_MOUSEMOVE message when the cursor position is explicitly changed.
parent
9c8bbcd1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
9 deletions
+34
-9
queue.c
server/queue.c
+34
-9
No files found.
server/queue.c
View file @
39bac051
...
...
@@ -318,6 +318,34 @@ static int assign_thread_input( struct thread *thread, struct thread_input *new_
return
1
;
}
/* set the cursor position and queue the corresponding mouse message */
static
void
set_cursor_pos
(
struct
desktop
*
desktop
,
int
x
,
int
y
)
{
struct
hardware_msg_data
*
msg_data
;
struct
message
*
msg
;
if
(
!
(
msg
=
mem_alloc
(
sizeof
(
*
msg
)
)))
return
;
if
(
!
(
msg_data
=
mem_alloc
(
sizeof
(
*
msg_data
)
)))
{
free
(
msg
);
return
;
}
memset
(
msg_data
,
0
,
sizeof
(
*
msg_data
)
);
msg
->
type
=
MSG_HARDWARE
;
msg
->
win
=
0
;
msg
->
msg
=
WM_MOUSEMOVE
;
msg
->
wparam
=
0
;
msg
->
lparam
=
0
;
msg
->
time
=
get_tick_count
();
msg
->
result
=
NULL
;
msg
->
data
=
msg_data
;
msg
->
data_size
=
sizeof
(
*
msg_data
);
msg_data
->
x
=
x
;
msg_data
->
y
=
y
;
queue_hardware_message
(
desktop
,
msg
);
}
/* set the cursor clip rectangle */
static
void
set_clip_rectangle
(
struct
desktop
*
desktop
,
const
rectangle_t
*
rect
)
{
...
...
@@ -1288,14 +1316,6 @@ static user_handle_t find_hardware_message_window( struct desktop *desktop, stru
return
win
;
}
/* set the cursor position, clipping to the cursor clip rect */
static
void
set_cursor_pos
(
struct
desktop
*
desktop
,
int
x
,
int
y
)
{
desktop
->
cursor
.
x
=
min
(
max
(
x
,
desktop
->
cursor
.
clip
.
left
),
desktop
->
cursor
.
clip
.
right
-
1
);
desktop
->
cursor
.
y
=
min
(
max
(
y
,
desktop
->
cursor
.
clip
.
top
),
desktop
->
cursor
.
clip
.
bottom
-
1
);
desktop
->
cursor
.
last_change
=
get_tick_count
();
}
/* queue a hardware message into a given thread input */
static
void
queue_hardware_message
(
struct
desktop
*
desktop
,
struct
message
*
msg
)
{
...
...
@@ -1316,7 +1336,12 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
}
else
{
if
(
msg
->
msg
==
WM_MOUSEMOVE
)
set_cursor_pos
(
desktop
,
data
->
x
,
data
->
y
);
if
(
msg
->
msg
==
WM_MOUSEMOVE
)
{
desktop
->
cursor
.
x
=
min
(
max
(
data
->
x
,
desktop
->
cursor
.
clip
.
left
),
desktop
->
cursor
.
clip
.
right
-
1
);
desktop
->
cursor
.
y
=
min
(
max
(
data
->
y
,
desktop
->
cursor
.
clip
.
top
),
desktop
->
cursor
.
clip
.
bottom
-
1
);
desktop
->
cursor
.
last_change
=
get_tick_count
();
}
if
(
desktop
->
keystate
[
VK_LBUTTON
]
&
0x80
)
msg
->
wparam
|=
MK_LBUTTON
;
if
(
desktop
->
keystate
[
VK_MBUTTON
]
&
0x80
)
msg
->
wparam
|=
MK_MBUTTON
;
if
(
desktop
->
keystate
[
VK_RBUTTON
]
&
0x80
)
msg
->
wparam
|=
MK_RBUTTON
;
...
...
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