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
ab9b99c4
Commit
ab9b99c4
authored
Jun 16, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Pass set_cursor flags in WM_WINE_CLIPCURSOR wparam.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55047
parent
56e2a08d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
14 deletions
+17
-14
input.c
dlls/win32u/input.c
+3
-3
message.c
dlls/win32u/message.c
+3
-1
sysparams.c
dlls/win32u/sysparams.c
+1
-1
win32u_private.h
dlls/win32u/win32u_private.h
+1
-1
queue.c
server/queue.c
+6
-6
user.h
server/user.h
+2
-1
window.c
server/window.c
+1
-1
No files found.
dlls/win32u/input.c
View file @
ab9b99c4
...
...
@@ -2544,13 +2544,13 @@ BOOL get_clip_cursor( RECT *rect )
return
ret
;
}
BOOL
process_wine_clipcursor
(
HWND
hwnd
,
BOOL
empty
,
BOOL
reset
)
BOOL
process_wine_clipcursor
(
HWND
hwnd
,
UINT
flags
,
BOOL
reset
)
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
RECT
rect
,
virtual_rect
=
NtUserGetVirtualScreenRect
();
BOOL
was_clipping
;
BOOL
was_clipping
,
empty
=
!!
(
flags
&
SET_CURSOR_NOCLIP
)
;
TRACE
(
"hwnd %p,
empty %u, reset %u
\n
"
,
hwnd
,
empty
,
reset
);
TRACE
(
"hwnd %p,
flags %#x, reset %u
\n
"
,
hwnd
,
flags
,
reset
);
if
((
was_clipping
=
thread_info
->
clipping_cursor
))
InterlockedDecrement
(
&
clipping_cursor
);
thread_info
->
clipping_cursor
=
FALSE
;
...
...
dlls/win32u/message.c
View file @
ab9b99c4
...
...
@@ -1272,7 +1272,9 @@ static LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPAR
return
call_current_hook
(
h_extra
->
handle
,
HC_ACTION
,
wparam
,
h_extra
->
lparam
);
}
case
WM_WINE_CLIPCURSOR
:
if
(
wparam
&&
lparam
)
return
clip_fullscreen_window
(
hwnd
,
FALSE
);
/* non-hardware message, posted on display mode change to trigger fullscreen
clipping or to the desktop window to forcefully release the cursor grabs */
if
(
!
wparam
)
return
clip_fullscreen_window
(
hwnd
,
FALSE
);
return
process_wine_clipcursor
(
hwnd
,
wparam
,
lparam
);
case
WM_WINE_SETCURSOR
:
FIXME
(
"Unexpected non-hardware WM_WINE_SETCURSOR message
\n
"
);
...
...
dlls/win32u/sysparams.c
View file @
ab9b99c4
...
...
@@ -2929,7 +2929,7 @@ static LONG apply_display_settings( const WCHAR *devname, const DEVMODEW *devmod
MAKELPARAM
(
current_mode
.
dmPelsWidth
,
current_mode
.
dmPelsHeight
),
SMTO_ABORTIFHUNG
,
2000
,
FALSE
);
/* post clip_fullscreen_window request to the foreground window */
NtUserPostMessage
(
NtUserGetForegroundWindow
(),
WM_WINE_CLIPCURSOR
,
TRUE
,
TRUE
);
NtUserPostMessage
(
NtUserGetForegroundWindow
(),
WM_WINE_CLIPCURSOR
,
0
,
0
);
}
return
ret
;
...
...
dlls/win32u/win32u_private.h
View file @
ab9b99c4
...
...
@@ -104,7 +104,7 @@ extern BOOL set_foreground_window( HWND hwnd, BOOL mouse ) DECLSPEC_HIDDEN;
extern
void
toggle_caret
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
update_mouse_tracking_info
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
BOOL
get_clip_cursor
(
RECT
*
rect
)
DECLSPEC_HIDDEN
;
extern
BOOL
process_wine_clipcursor
(
HWND
hwnd
,
BOOL
empty
,
BOOL
reset
)
DECLSPEC_HIDDEN
;
extern
BOOL
process_wine_clipcursor
(
HWND
hwnd
,
UINT
flags
,
BOOL
reset
)
DECLSPEC_HIDDEN
;
extern
BOOL
clip_fullscreen_window
(
HWND
hwnd
,
BOOL
reset
)
DECLSPEC_HIDDEN
;
/* menu.c */
...
...
server/queue.c
View file @
ab9b99c4
...
...
@@ -508,7 +508,7 @@ static void get_message_defaults( struct msg_queue *queue, int *x, int *y, unsig
}
/* set the cursor clip rectangle */
void
set_clip_rectangle
(
struct
desktop
*
desktop
,
const
rectangle_t
*
rect
,
int
reset
)
void
set_clip_rectangle
(
struct
desktop
*
desktop
,
const
rectangle_t
*
rect
,
unsigned
int
flags
,
int
reset
)
{
rectangle_t
top_rect
;
int
x
,
y
;
...
...
@@ -532,17 +532,17 @@ void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int r
if
(
x
!=
desktop
->
cursor
.
x
||
y
!=
desktop
->
cursor
.
y
)
set_cursor_pos
(
desktop
,
x
,
y
);
/* request clip cursor rectangle reset to the desktop thread */
if
(
reset
)
post_desktop_message
(
desktop
,
WM_WINE_CLIPCURSOR
,
TRUE
,
FALSE
);
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
,
rect
==
NULL
,
reset
);
queue_cursor_message
(
desktop
,
0
,
WM_WINE_CLIPCURSOR
,
flags
,
reset
);
}
/* change the foreground input and reset the cursor clip rect */
static
void
set_foreground_input
(
struct
desktop
*
desktop
,
struct
thread_input
*
input
)
{
if
(
desktop
->
foreground_input
==
input
)
return
;
set_clip_rectangle
(
desktop
,
NULL
,
1
);
set_clip_rectangle
(
desktop
,
NULL
,
SET_CURSOR_NOCLIP
,
1
);
desktop
->
foreground_input
=
input
;
}
...
...
@@ -3383,8 +3383,8 @@ DECL_HANDLER(set_cursor)
input
->
cursor_count
+=
req
->
show_count
;
}
if
(
req
->
flags
&
SET_CURSOR_POS
)
set_cursor_pos
(
desktop
,
req
->
x
,
req
->
y
);
if
(
req
->
flags
&
SET_CURSOR_CLIP
)
set_clip_rectangle
(
desktop
,
&
req
->
clip
,
0
);
if
(
req
->
flags
&
SET_CURSOR_NOCLIP
)
set_clip_rectangle
(
desktop
,
NULL
,
0
);
if
(
req
->
flags
&
SET_CURSOR_CLIP
)
set_clip_rectangle
(
desktop
,
&
req
->
clip
,
req
->
flags
,
0
);
if
(
req
->
flags
&
SET_CURSOR_NOCLIP
)
set_clip_rectangle
(
desktop
,
NULL
,
SET_CURSOR_NOCLIP
,
0
);
if
(
req
->
flags
&
(
SET_CURSOR_HANDLE
|
SET_CURSOR_COUNT
))
{
...
...
server/user.h
View file @
ab9b99c4
...
...
@@ -110,7 +110,8 @@ extern void queue_cleanup_window( struct thread *thread, user_handle_t win );
extern
int
init_thread_queue
(
struct
thread
*
thread
);
extern
int
attach_thread_input
(
struct
thread
*
thread_from
,
struct
thread
*
thread_to
);
extern
void
detach_thread_input
(
struct
thread
*
thread_from
);
extern
void
set_clip_rectangle
(
struct
desktop
*
desktop
,
const
rectangle_t
*
rect
,
int
reset
);
extern
void
set_clip_rectangle
(
struct
desktop
*
desktop
,
const
rectangle_t
*
rect
,
unsigned
int
flags
,
int
reset
);
extern
void
post_message
(
user_handle_t
win
,
unsigned
int
message
,
lparam_t
wparam
,
lparam_t
lparam
);
extern
void
send_notify_message
(
user_handle_t
win
,
unsigned
int
message
,
...
...
server/window.c
View file @
ab9b99c4
...
...
@@ -1829,7 +1829,7 @@ static void set_window_pos( struct window *win, struct window *previous,
}
/* reset cursor clip rectangle when the desktop changes size */
if
(
win
==
win
->
desktop
->
top_window
)
set_clip_rectangle
(
win
->
desktop
,
NULL
,
1
);
if
(
win
==
win
->
desktop
->
top_window
)
set_clip_rectangle
(
win
->
desktop
,
NULL
,
SET_CURSOR_NOCLIP
,
1
);
/* if the window is not visible, everything is easy */
if
(
!
visible
)
return
;
...
...
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