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
c64c36f5
Commit
c64c36f5
authored
Mar 31, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Store all desktop cursor information in a separate structure.
parent
f421d22e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
25 deletions
+25
-25
queue.c
server/queue.c
+15
-15
user.h
server/user.h
+8
-3
window.c
server/window.c
+1
-1
winstation.c
server/winstation.c
+1
-6
No files found.
server/queue.c
View file @
c64c36f5
...
...
@@ -322,7 +322,7 @@ static int assign_thread_input( struct thread *thread, struct thread_input *new_
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
);
get_top_window_rectangle
(
desktop
,
&
desktop
->
cursor
.
clip
);
desktop
->
foreground_input
=
input
;
}
...
...
@@ -1279,8 +1279,8 @@ static user_handle_t find_hardware_message_window( struct desktop *desktop, stru
/* set the cursor position, clipping to the cursor clip rect */
static
void
set_cursor_pos
(
struct
desktop
*
desktop
,
int
x
,
int
y
)
{
desktop
->
cursor
_x
=
min
(
max
(
x
,
desktop
->
cursor_clip
.
left
),
desktop
->
cursor_
clip
.
right
-
1
);
desktop
->
cursor
_y
=
min
(
max
(
y
,
desktop
->
cursor_clip
.
top
),
desktop
->
cursor_
clip
.
bottom
-
1
);
desktop
->
cursor
.
x
=
min
(
max
(
x
,
desktop
->
cursor
.
clip
.
left
),
desktop
->
cursor
.
clip
.
right
-
1
);
desktop
->
cursor
.
y
=
min
(
max
(
y
,
desktop
->
cursor
.
clip
.
top
),
desktop
->
cursor
.
clip
.
bottom
-
1
);
}
/* queue a hardware message into a given thread input */
...
...
@@ -1312,8 +1312,8 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
if
(
desktop
->
keystate
[
VK_XBUTTON1
]
&
0x80
)
msg
->
wparam
|=
MK_XBUTTON1
;
if
(
desktop
->
keystate
[
VK_XBUTTON2
]
&
0x80
)
msg
->
wparam
|=
MK_XBUTTON2
;
}
data
->
x
=
desktop
->
cursor
_
x
;
data
->
y
=
desktop
->
cursor
_
y
;
data
->
x
=
desktop
->
cursor
.
x
;
data
->
y
=
desktop
->
cursor
.
y
;
if
(
msg
->
win
&&
(
thread
=
get_window_thread
(
msg
->
win
)))
{
...
...
@@ -1422,19 +1422,19 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
x
=
input
->
mouse
.
x
;
y
=
input
->
mouse
.
y
;
if
(
flags
&
~
(
MOUSEEVENTF_MOVE
|
MOUSEEVENTF_ABSOLUTE
)
&&
x
==
desktop
->
cursor
_x
&&
y
==
desktop
->
cursor_
y
)
x
==
desktop
->
cursor
.
x
&&
y
==
desktop
->
cursor
.
y
)
flags
&=
~
MOUSEEVENTF_MOVE
;
}
else
{
x
=
desktop
->
cursor
_
x
+
input
->
mouse
.
x
;
y
=
desktop
->
cursor
_
y
+
input
->
mouse
.
y
;
x
=
desktop
->
cursor
.
x
+
input
->
mouse
.
x
;
y
=
desktop
->
cursor
.
y
+
input
->
mouse
.
y
;
}
}
else
{
x
=
desktop
->
cursor
_
x
;
y
=
desktop
->
cursor
_
y
;
x
=
desktop
->
cursor
.
x
;
y
=
desktop
->
cursor
.
y
;
}
for
(
i
=
0
;
i
<
sizeof
(
messages
)
/
sizeof
(
messages
[
0
]);
i
++
)
...
...
@@ -2620,11 +2620,11 @@ DECL_HANDLER(set_cursor)
{
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
;
if
(
!
intersect_rect
(
&
input
->
desktop
->
cursor
.
clip
,
&
top_rect
,
&
req
->
clip
))
input
->
desktop
->
cursor
.
clip
=
top_rect
;
}
reply
->
new_x
=
input
->
desktop
->
cursor
_
x
;
reply
->
new_y
=
input
->
desktop
->
cursor
_
y
;
reply
->
new_clip
=
input
->
desktop
->
cursor
_
clip
;
reply
->
new_x
=
input
->
desktop
->
cursor
.
x
;
reply
->
new_y
=
input
->
desktop
->
cursor
.
y
;
reply
->
new_clip
=
input
->
desktop
->
cursor
.
clip
;
}
server/user.h
View file @
c64c36f5
...
...
@@ -51,6 +51,13 @@ struct winstation
struct
atom_table
*
atom_table
;
/* global atom table */
};
struct
global_cursor
{
int
x
;
/* cursor position */
int
y
;
rectangle_t
clip
;
/* cursor clip rectangle */
};
struct
desktop
{
struct
object
obj
;
/* object header */
...
...
@@ -63,9 +70,7 @@ struct desktop
struct
timeout_user
*
close_timeout
;
/* timeout before closing the desktop */
struct
thread_input
*
foreground_input
;
/* thread input of foreground thread */
unsigned
int
users
;
/* processes and threads using this desktop */
int
cursor_x
;
/* cursor position */
int
cursor_y
;
rectangle_t
cursor_clip
;
/* cursor clip rectangle */
struct
global_cursor
cursor
;
/* global cursor information */
unsigned
char
keystate
[
256
];
/* asynchronous key state */
};
...
...
server/window.c
View file @
c64c36f5
...
...
@@ -1553,7 +1553,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
)
win
->
desktop
->
cursor
_
clip
=
*
window_rect
;
if
(
win
==
win
->
desktop
->
top_window
)
win
->
desktop
->
cursor
.
clip
=
*
window_rect
;
/* if the window is not visible, everything is easy */
if
(
!
visible
)
return
;
...
...
server/winstation.c
View file @
c64c36f5
...
...
@@ -232,12 +232,7 @@ static struct desktop *create_desktop( const struct unicode_str *name, unsigned
desktop
->
close_timeout
=
NULL
;
desktop
->
foreground_input
=
NULL
;
desktop
->
users
=
0
;
desktop
->
cursor_x
=
0
;
desktop
->
cursor_y
=
0
;
desktop
->
cursor_clip
.
left
=
0
;
desktop
->
cursor_clip
.
top
=
0
;
desktop
->
cursor_clip
.
right
=
0
;
desktop
->
cursor_clip
.
bottom
=
0
;
memset
(
&
desktop
->
cursor
,
0
,
sizeof
(
desktop
->
cursor
)
);
memset
(
desktop
->
keystate
,
0
,
sizeof
(
desktop
->
keystate
)
);
list_add_tail
(
&
winstation
->
desktops
,
&
desktop
->
entry
);
}
...
...
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