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
21e86f60
Commit
21e86f60
authored
Mar 31, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Post a message to the desktop window when the cursor clip rectangle changes.
parent
85358b10
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
37 additions
and
8 deletions
+37
-8
cursoricon.c
dlls/user32/cursoricon.c
+1
-0
message.c
dlls/user32/message.c
+6
-0
user_private.h
dlls/user32/user_private.h
+1
-0
xinerama.c
dlls/winex11.drv/xinerama.c
+0
-1
server_protocol.h
include/wine/server_protocol.h
+3
-1
desktop.c
programs/explorer/desktop.c
+1
-0
protocol.def
server/protocol.def
+1
-0
queue.c
server/queue.c
+20
-5
request.h
server/request.h
+2
-1
trace.c
server/trace.c
+1
-0
user.h
server/user.h
+1
-0
No files found.
dlls/user32/cursoricon.c
View file @
21e86f60
...
...
@@ -1718,6 +1718,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH ClipCursor( const RECT *rect )
SERVER_START_REQ
(
set_cursor
)
{
req
->
flags
=
SET_CURSOR_CLIP
;
req
->
clip_msg
=
WM_WINE_CLIPCURSOR
;
if
(
rect
)
{
req
->
clip
.
left
=
rect
->
left
;
...
...
dlls/user32/message.c
View file @
21e86f60
...
...
@@ -1869,6 +1869,12 @@ 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
:
{
RECT
rect
;
GetClipCursor
(
&
rect
);
return
USER_Driver
->
pClipCursor
(
&
rect
);
}
default:
if
(
msg
>=
WM_WINE_FIRST_DRIVER_MSG
&&
msg
<=
WM_WINE_LAST_DRIVER_MSG
)
return
USER_Driver
->
pWindowMessage
(
hwnd
,
msg
,
wparam
,
lparam
);
...
...
dlls/user32/user_private.h
View file @
21e86f60
...
...
@@ -47,6 +47,7 @@ enum wine_internal_message
WM_WINE_SETACTIVEWINDOW
,
WM_WINE_KEYBOARD_LL_HOOK
,
WM_WINE_MOUSE_LL_HOOK
,
WM_WINE_CLIPCURSOR
,
WM_WINE_FIRST_DRIVER_MSG
=
0x80001000
,
/* range of messages reserved for the USER driver */
WM_WINE_LAST_DRIVER_MSG
=
0x80001fff
};
...
...
dlls/winex11.drv/xinerama.c
View file @
21e86f60
...
...
@@ -197,7 +197,6 @@ void xinerama_init( unsigned int width, unsigned int height )
wine_dbgstr_rect
(
&
rect
),
screen_width
,
screen_height
);
wine_tsx11_unlock
();
ClipCursor
(
NULL
);
/* reset the cursor clip rectangle */
}
...
...
include/wine/server_protocol.h
View file @
21e86f60
...
...
@@ -4798,6 +4798,8 @@ struct set_cursor_request
int
x
;
int
y
;
rectangle_t
clip
;
unsigned
int
clip_msg
;
char
__pad_52
[
4
];
};
struct
set_cursor_reply
{
...
...
@@ -5561,6 +5563,6 @@ union generic_reply
struct
set_cursor_reply
set_cursor_reply
;
};
#define SERVER_PROTOCOL_VERSION 41
8
#define SERVER_PROTOCOL_VERSION 41
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
programs/explorer/desktop.c
View file @
21e86f60
...
...
@@ -334,6 +334,7 @@ void manage_desktop( WCHAR *arg )
if
(
name
)
set_desktop_window_title
(
hwnd
,
name
);
SystemParametersInfoA
(
SPI_SETDESKPATTERN
,
-
1
,
NULL
,
FALSE
);
SetDeskWallPaper
(
(
LPSTR
)
-
1
);
ClipCursor
(
NULL
);
initialize_display_settings
(
hwnd
);
initialize_appbar
();
initialize_systray
(
using_root
);
...
...
server/protocol.def
View file @
21e86f60
...
...
@@ -3318,6 +3318,7 @@ enum coords_relative
int x; /* cursor position */
int y;
rectangle_t clip; /* cursor clip rectangle */
unsigned int clip_msg; /* message to post on cursor clip changes */
@REPLY
user_handle_t prev_handle; /* previous handle */
int prev_count; /* previous show count */
...
...
server/queue.c
View file @
21e86f60
...
...
@@ -318,11 +318,23 @@ static int assign_thread_input( struct thread *thread, struct thread_input *new_
return
1
;
}
/* set the cursor clip rectangle */
static
void
set_clip_rectangle
(
struct
desktop
*
desktop
,
const
rectangle_t
*
rect
)
{
rectangle_t
top_rect
,
new_rect
;
get_top_window_rectangle
(
desktop
,
&
top_rect
);
if
(
!
rect
||
!
intersect_rect
(
&
new_rect
,
&
top_rect
,
rect
))
new_rect
=
top_rect
;
if
(
!
memcmp
(
&
desktop
->
cursor
.
clip
,
&
new_rect
,
sizeof
(
new_rect
)
))
return
;
desktop
->
cursor
.
clip
=
new_rect
;
if
(
desktop
->
cursor
.
clip_msg
)
post_desktop_message
(
desktop
,
desktop
->
cursor
.
clip_msg
,
0
,
0
);
}
/* 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
;
get_top_window_rectangle
(
desktop
,
&
desktop
->
cursor
.
clip
);
set_clip_rectangle
(
desktop
,
NULL
);
desktop
->
foreground_input
=
input
;
}
...
...
@@ -2620,10 +2632,13 @@ DECL_HANDLER(set_cursor)
}
if
(
req
->
flags
&
SET_CURSOR_CLIP
)
{
rectangle_t
top_rect
;
get_top_window_rectangle
(
input
->
desktop
,
&
top_rect
);
if
(
!
intersect_rect
(
&
input
->
desktop
->
cursor
.
clip
,
&
top_rect
,
&
req
->
clip
))
input
->
desktop
->
cursor
.
clip
=
top_rect
;
struct
desktop
*
desktop
=
input
->
desktop
;
/* only the desktop owner can set the message */
if
(
req
->
clip_msg
&&
get_top_window_owner
(
desktop
)
==
current
->
process
)
desktop
->
cursor
.
clip_msg
=
req
->
clip_msg
;
set_clip_rectangle
(
desktop
,
&
req
->
clip
);
}
reply
->
new_x
=
input
->
desktop
->
cursor
.
x
;
...
...
server/request.h
View file @
21e86f60
...
...
@@ -2097,7 +2097,8 @@ C_ASSERT( FIELD_OFFSET(struct set_cursor_request, show_count) == 20 );
C_ASSERT
(
FIELD_OFFSET
(
struct
set_cursor_request
,
x
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_cursor_request
,
y
)
==
28
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_cursor_request
,
clip
)
==
32
);
C_ASSERT
(
sizeof
(
struct
set_cursor_request
)
==
48
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_cursor_request
,
clip_msg
)
==
48
);
C_ASSERT
(
sizeof
(
struct
set_cursor_request
)
==
56
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_cursor_reply
,
prev_handle
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_cursor_reply
,
prev_count
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_cursor_reply
,
new_x
)
==
16
);
...
...
server/trace.c
View file @
21e86f60
...
...
@@ -3896,6 +3896,7 @@ static void dump_set_cursor_request( const struct set_cursor_request *req )
fprintf
(
stderr
,
", x=%d"
,
req
->
x
);
fprintf
(
stderr
,
", y=%d"
,
req
->
y
);
dump_rectangle
(
", clip="
,
&
req
->
clip
);
fprintf
(
stderr
,
", clip_msg=%08x"
,
req
->
clip_msg
);
}
static
void
dump_set_cursor_reply
(
const
struct
set_cursor_reply
*
req
)
...
...
server/user.h
View file @
21e86f60
...
...
@@ -56,6 +56,7 @@ struct global_cursor
int
x
;
/* cursor position */
int
y
;
rectangle_t
clip
;
/* cursor clip rectangle */
unsigned
int
clip_msg
;
/* message to post for cursor clip changes */
unsigned
int
last_change
;
/* time of last position change */
};
...
...
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