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
1604d8a2
Commit
1604d8a2
authored
Mar 14, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Send WM_WINE_CLIPCURSOR message only when necessary.
parent
f1dca891
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
queue.c
server/queue.c
+7
-2
user.h
server/user.h
+1
-0
No files found.
server/queue.c
View file @
1604d8a2
...
...
@@ -527,6 +527,7 @@ static void get_message_defaults( struct msg_queue *queue, int *x, int *y, unsig
void
set_clip_rectangle
(
struct
desktop
*
desktop
,
const
rectangle_t
*
rect
,
unsigned
int
flags
,
int
reset
)
{
rectangle_t
top_rect
;
unsigned
int
old_flags
;
int
x
,
y
;
get_top_window_rectangle
(
desktop
,
&
top_rect
);
...
...
@@ -542,6 +543,9 @@ void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, unsig
}
else
desktop
->
cursor
.
clip
=
top_rect
;
old_flags
=
desktop
->
cursor
.
clip_flags
;
desktop
->
cursor
.
clip_flags
=
flags
;
/* warp the mouse to be inside the clip rect */
x
=
max
(
min
(
desktop
->
cursor
.
x
,
desktop
->
cursor
.
clip
.
right
-
1
),
desktop
->
cursor
.
clip
.
left
);
y
=
max
(
min
(
desktop
->
cursor
.
y
,
desktop
->
cursor
.
clip
.
bottom
-
1
),
desktop
->
cursor
.
clip
.
top
);
...
...
@@ -550,8 +554,9 @@ void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, unsig
/* request clip cursor rectangle reset to the desktop thread */
if
(
reset
)
post_desktop_message
(
desktop
,
WM_WINE_CLIPCURSOR
,
flags
,
FALSE
);
/* notify foreground thread, of reset, or to apply new cursor clipping rect */
queue_cursor_message
(
desktop
,
0
,
WM_WINE_CLIPCURSOR
,
flags
,
reset
);
/* notify foreground thread of reset, clipped, or released cursor rect */
if
(
reset
||
flags
!=
SET_CURSOR_NOCLIP
||
old_flags
!=
SET_CURSOR_NOCLIP
)
queue_cursor_message
(
desktop
,
0
,
WM_WINE_CLIPCURSOR
,
flags
,
reset
);
}
/* change the foreground input and reset the cursor clip rect */
...
...
server/user.h
View file @
1604d8a2
...
...
@@ -59,6 +59,7 @@ struct global_cursor
int
x
;
/* cursor position */
int
y
;
rectangle_t
clip
;
/* cursor clip rectangle */
unsigned
int
clip_flags
;
/* last cursor clip flags */
unsigned
int
last_change
;
/* time of last position change */
user_handle_t
win
;
/* window that contains the cursor */
};
...
...
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