Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b7570b79
Commit
b7570b79
authored
May 29, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Add a reset parameter to WM_WINE_CLIPCURSOR and driver ClipCursor.
parent
b16ab961
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
22 deletions
+24
-22
driver.c
dlls/win32u/driver.c
+3
-3
input.c
dlls/win32u/input.c
+5
-5
message.c
dlls/win32u/message.c
+1
-1
win32u_private.h
dlls/win32u/win32u_private.h
+1
-1
macdrv.h
dlls/winemac.drv/macdrv.h
+1
-2
mouse.c
dlls/winemac.drv/mouse.c
+4
-2
mouse.c
dlls/winex11.drv/mouse.c
+7
-6
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
gdi_driver.h
include/wine/gdi_driver.h
+1
-1
No files found.
dlls/win32u/driver.c
View file @
b7570b79
...
...
@@ -752,7 +752,7 @@ static BOOL nulldrv_SetCursorPos( INT x, INT y )
return
TRUE
;
}
static
BOOL
nulldrv_ClipCursor
(
LPCRECT
clip
)
static
BOOL
nulldrv_ClipCursor
(
const
RECT
*
clip
,
BOOL
reset
)
{
return
TRUE
;
}
...
...
@@ -1133,9 +1133,9 @@ static BOOL loaderdrv_SetCursorPos( INT x, INT y )
return
load_driver
()
->
pSetCursorPos
(
x
,
y
);
}
static
BOOL
loaderdrv_ClipCursor
(
const
RECT
*
clip
)
static
BOOL
loaderdrv_ClipCursor
(
const
RECT
*
clip
,
BOOL
reset
)
{
return
load_driver
()
->
pClipCursor
(
clip
);
return
load_driver
()
->
pClipCursor
(
clip
,
reset
);
}
static
LRESULT
nulldrv_ClipboardWindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
...
...
dlls/win32u/input.c
View file @
b7570b79
...
...
@@ -2497,16 +2497,16 @@ BOOL get_clip_cursor( RECT *rect )
return
ret
;
}
BOOL
process_wine_clipcursor
(
BOOL
empty
)
BOOL
process_wine_clipcursor
(
BOOL
empty
,
BOOL
reset
)
{
RECT
rect
;
TRACE
(
"empty %u
\n
"
,
empty
);
TRACE
(
"empty %u
, reset %u
\n
"
,
empty
,
reset
);
if
(
empty
)
return
user_driver
->
pClipCursor
(
NULL
);
if
(
empty
||
reset
)
return
user_driver
->
pClipCursor
(
NULL
,
reset
);
get_clip_cursor
(
&
rect
);
return
user_driver
->
pClipCursor
(
&
rect
);
return
user_driver
->
pClipCursor
(
&
rect
,
FALSE
);
}
/***********************************************************************
...
...
@@ -2552,6 +2552,6 @@ BOOL WINAPI NtUserClipCursor( const RECT *rect )
}
}
SERVER_END_REQ
;
if
(
ret
)
user_driver
->
pClipCursor
(
&
new_rect
);
if
(
ret
)
user_driver
->
pClipCursor
(
&
new_rect
,
FALSE
);
return
ret
;
}
dlls/win32u/message.c
View file @
b7570b79
...
...
@@ -1272,7 +1272,7 @@ 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
:
return
process_wine_clipcursor
(
wparam
);
return
process_wine_clipcursor
(
wparam
,
lparam
);
case
WM_WINE_UPDATEWINDOWSTATE
:
update_window_state
(
hwnd
);
return
0
;
...
...
dlls/win32u/win32u_private.h
View file @
b7570b79
...
...
@@ -101,7 +101,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
(
BOOL
empty
)
DECLSPEC_HIDDEN
;
extern
BOOL
process_wine_clipcursor
(
BOOL
empty
,
BOOL
reset
)
DECLSPEC_HIDDEN
;
/* menu.c */
extern
HMENU
create_menu
(
BOOL
is_popup
)
DECLSPEC_HIDDEN
;
...
...
dlls/winemac.drv/macdrv.h
View file @
b7570b79
...
...
@@ -133,7 +133,7 @@ extern BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device
BOOL
force
,
void
*
param
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_GetDeviceGammaRamp
(
PHYSDEV
dev
,
LPVOID
ramp
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_SetDeviceGammaRamp
(
PHYSDEV
dev
,
LPVOID
ramp
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_ClipCursor
(
LPCRECT
clip
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_ClipCursor
(
const
RECT
*
clip
,
BOOL
reset
)
DECLSPEC_HIDDEN
;
extern
LRESULT
macdrv_DesktopWindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_DestroyWindow
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_SetDesktopWindow
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
...
...
@@ -157,7 +157,6 @@ extern void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags
const
RECT
*
visible_rect
,
const
RECT
*
valid_rects
,
struct
window_surface
*
surface
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_DestroyCursorIcon
(
HCURSOR
cursor
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_ClipCursor
(
LPCRECT
clip
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_GetCursorPos
(
LPPOINT
pos
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_SetCapture
(
HWND
hwnd
,
UINT
flags
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_SetCursor
(
HCURSOR
cursor
)
DECLSPEC_HIDDEN
;
...
...
dlls/winemac.drv/mouse.c
View file @
b7570b79
...
...
@@ -659,11 +659,13 @@ void macdrv_DestroyCursorIcon(HCURSOR cursor)
*
* Set the cursor clipping rectangle.
*/
BOOL
macdrv_ClipCursor
(
LPCRECT
clip
)
BOOL
macdrv_ClipCursor
(
const
RECT
*
clip
,
BOOL
reset
)
{
CGRect
rect
;
TRACE
(
"%s
\n
"
,
wine_dbgstr_rect
(
clip
));
TRACE
(
"%s %u
\n
"
,
wine_dbgstr_rect
(
clip
),
reset
);
if
(
reset
)
return
TRUE
;
if
(
clip
)
{
...
...
dlls/winex11.drv/mouse.c
View file @
b7570b79
...
...
@@ -1557,17 +1557,18 @@ BOOL X11DRV_GetCursorPos(LPPOINT pos)
/***********************************************************************
* ClipCursor (X11DRV.@)
*/
BOOL
X11DRV_ClipCursor
(
LPCRECT
clip
)
BOOL
X11DRV_ClipCursor
(
const
RECT
*
clip
,
BOOL
reset
)
{
RECT
virtual_rect
=
NtUserGetVirtualScreenRect
(
);
TRACE
(
"clip %p, reset %u
\n
"
,
clip
,
reset
);
if
(
!
clip
)
clip
=
&
virtual_rect
;
if
(
grab_pointer
)
if
(
!
reset
&&
grab_pointer
)
{
RECT
virtual_rect
=
NtUserGetVirtualScreenRect
();
HWND
foreground
=
NtUserGetForegroundWindow
();
DWORD
tid
,
pid
;
if
(
!
clip
)
clip
=
&
virtual_rect
;
/* forward request to the foreground window if it's in a different thread */
tid
=
NtUserGetWindowThread
(
foreground
,
&
pid
);
if
(
tid
&&
tid
!=
GetCurrentThreadId
()
&&
pid
==
GetCurrentProcessId
())
...
...
@@ -1615,7 +1616,7 @@ LRESULT clip_cursor_request( HWND hwnd, BOOL fullscreen, BOOL reset )
else
{
NtUserGetClipCursor
(
&
clip
);
X11DRV_ClipCursor
(
&
clip
);
X11DRV_ClipCursor
(
&
clip
,
FALSE
);
}
return
0
;
...
...
dlls/winex11.drv/x11drv.h
View file @
b7570b79
...
...
@@ -216,7 +216,7 @@ extern void X11DRV_DestroyCursorIcon( HCURSOR handle ) DECLSPEC_HIDDEN;
extern
void
X11DRV_SetCursor
(
HCURSOR
handle
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_SetCursorPos
(
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_GetCursorPos
(
LPPOINT
pos
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_ClipCursor
(
LPCRECT
clip
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_ClipCursor
(
const
RECT
*
clip
,
BOOL
reset
)
DECLSPEC_HIDDEN
;
extern
LONG
X11DRV_ChangeDisplaySettings
(
LPDEVMODEW
displays
,
LPCWSTR
primary_name
,
HWND
hwnd
,
DWORD
flags
,
LPVOID
lpvoid
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_GetCurrentDisplaySettings
(
LPCWSTR
name
,
BOOL
is_primary
,
LPDEVMODEW
devmode
)
DECLSPEC_HIDDEN
;
extern
INT
X11DRV_GetDisplayDepth
(
LPCWSTR
name
,
BOOL
is_primary
)
DECLSPEC_HIDDEN
;
...
...
include/wine/gdi_driver.h
View file @
b7570b79
...
...
@@ -301,7 +301,7 @@ struct user_driver_funcs
void
(
*
pSetCursor
)(
HCURSOR
);
BOOL
(
*
pGetCursorPos
)(
LPPOINT
);
BOOL
(
*
pSetCursorPos
)(
INT
,
INT
);
BOOL
(
*
pClipCursor
)(
LPCRECT
);
BOOL
(
*
pClipCursor
)(
const
RECT
*
,
BOOL
);
/* clipboard functions */
LRESULT
(
*
pClipboardWindowProc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
void
(
*
pUpdateClipboard
)(
void
);
...
...
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