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
8d2de5db
Commit
8d2de5db
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
win32u: Use a specific flag instead of shrinking the clip rect.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55047
parent
ab9b99c4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
9 deletions
+21
-9
input.c
dlls/win32u/input.c
+16
-6
message.c
dlls/win32u/message.c
+1
-1
sysparams.c
dlls/win32u/sysparams.c
+1
-1
server_protocol.h
include/wine/server_protocol.h
+2
-1
protocol.def
server/protocol.def
+1
-0
No files found.
dlls/win32u/input.c
View file @
8d2de5db
...
...
@@ -2470,9 +2470,10 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset )
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
MONITORINFO
monitor_info
=
{.
cbSize
=
sizeof
(
MONITORINFO
)};
RECT
rect
,
virtual_rect
=
NtUserGetVirtualScreenRect
()
;
RECT
rect
;
HMONITOR
monitor
;
DWORD
style
;
BOOL
ret
;
if
(
hwnd
==
NtUserGetDesktopWindow
())
return
FALSE
;
if
(
hwnd
!=
NtUserGetForegroundWindow
())
return
FALSE
;
...
...
@@ -2497,11 +2498,20 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset )
if
(
is_virtual_desktop
())
return
FALSE
;
}
/* shrink the clipping rect to make sure it is not ignored for being fullscreen */
if
(
EqualRect
(
&
monitor_info
.
rcMonitor
,
&
virtual_rect
))
InflateRect
(
&
monitor_info
.
rcMonitor
,
-
1
,
-
1
);
TRACE
(
"win %p clipping fullscreen
\n
"
,
hwnd
);
return
NtUserClipCursor
(
&
monitor_info
.
rcMonitor
);
SERVER_START_REQ
(
set_cursor
)
{
req
->
flags
=
SET_CURSOR_CLIP
|
SET_CURSOR_FSCLIP
;
req
->
clip
.
left
=
monitor_info
.
rcMonitor
.
left
;
req
->
clip
.
top
=
monitor_info
.
rcMonitor
.
top
;
req
->
clip
.
right
=
monitor_info
.
rcMonitor
.
right
;
req
->
clip
.
bottom
=
monitor_info
.
rcMonitor
.
bottom
;
ret
=
!
wine_server_call
(
req
);
}
SERVER_END_REQ
;
return
ret
;
}
/**********************************************************************
...
...
@@ -2567,7 +2577,7 @@ BOOL process_wine_clipcursor( HWND hwnd, UINT flags, BOOL reset )
get_clip_cursor
(
&
rect
);
intersect_rect
(
&
rect
,
&
rect
,
&
virtual_rect
);
if
(
EqualRect
(
&
rect
,
&
virtual_rect
))
empty
=
TRUE
;
if
(
empty
)
if
(
empty
&&
!
(
flags
&
SET_CURSOR_FSCLIP
)
)
{
/* if currently clipping, check if we should switch to fullscreen clipping */
if
(
was_clipping
&&
clip_fullscreen_window
(
hwnd
,
TRUE
))
return
TRUE
;
...
...
dlls/win32u/message.c
View file @
8d2de5db
...
...
@@ -1274,7 +1274,7 @@ static LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPAR
case
WM_WINE_CLIPCURSOR
:
/* 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
);
if
(
wparam
&
SET_CURSOR_FSCLIP
)
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 @
8d2de5db
...
...
@@ -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
,
0
,
0
);
NtUserPostMessage
(
NtUserGetForegroundWindow
(),
WM_WINE_CLIPCURSOR
,
SET_CURSOR_FSCLIP
,
0
);
}
return
ret
;
...
...
include/wine/server_protocol.h
View file @
8d2de5db
...
...
@@ -5357,6 +5357,7 @@ struct set_cursor_reply
#define SET_CURSOR_POS 0x04
#define SET_CURSOR_CLIP 0x08
#define SET_CURSOR_NOCLIP 0x10
#define SET_CURSOR_FSCLIP 0x20
struct
get_cursor_history_request
...
...
@@ -6417,7 +6418,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 77
6
#define SERVER_PROTOCOL_VERSION 77
7
/* ### protocol_version end ### */
...
...
server/protocol.def
View file @
8d2de5db
...
...
@@ -3719,6 +3719,7 @@ struct handle_info
#define SET_CURSOR_POS 0x04
#define SET_CURSOR_CLIP 0x08
#define SET_CURSOR_NOCLIP 0x10
#define SET_CURSOR_FSCLIP 0x20
/* Get the history of the 64 last cursor positions */
@REQ(get_cursor_history)
...
...
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