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
6ee45218
Commit
6ee45218
authored
Sep 27, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Pass the rectangle in client coordinates for update_window_zorder.
parent
d56ac062
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
45 deletions
+27
-45
event.c
dlls/winex11.drv/event.c
+6
-11
mouse.c
dlls/winex11.drv/mouse.c
+15
-30
protocol.def
server/protocol.def
+1
-1
window.c
server/window.c
+5
-3
No files found.
dlls/winex11.drv/event.c
View file @
6ee45218
...
...
@@ -731,19 +731,16 @@ static void X11DRV_Expose( HWND hwnd, XEvent *xev )
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
rect
.
left
=
event
->
x
;
rect
.
top
=
event
->
y
;
rect
.
right
=
event
->
x
+
event
->
width
;
rect
.
bottom
=
event
->
y
+
event
->
height
;
if
(
event
->
window
==
data
->
whole_window
)
{
rect
.
left
=
data
->
whole_rect
.
left
+
event
->
x
;
rect
.
top
=
data
->
whole_rect
.
top
+
event
->
y
;
OffsetRect
(
&
rect
,
data
->
whole_rect
.
left
-
data
->
client_rect
.
left
,
data
->
whole_rect
.
top
-
data
->
client_rect
.
top
)
;
flags
|=
RDW_FRAME
;
}
else
{
rect
.
left
=
data
->
client_rect
.
left
+
event
->
x
;
rect
.
top
=
data
->
client_rect
.
top
+
event
->
y
;
}
rect
.
right
=
rect
.
left
+
event
->
width
;
rect
.
bottom
=
rect
.
top
+
event
->
height
;
if
(
event
->
window
!=
root_window
)
{
...
...
@@ -758,8 +755,6 @@ static void X11DRV_Expose( HWND hwnd, XEvent *xev )
}
SERVER_END_REQ
;
/* make position relative to client area instead of parent */
OffsetRect
(
&
rect
,
-
data
->
client_rect
.
left
,
-
data
->
client_rect
.
top
);
flags
|=
RDW_ALLCHILDREN
;
}
...
...
dlls/winex11.drv/mouse.c
View file @
6ee45218
...
...
@@ -120,29 +120,6 @@ void X11DRV_Xcursor_Init(void)
/***********************************************************************
* get_coords
*
* get the coordinates of a mouse event
*/
static
inline
void
get_coords
(
HWND
hwnd
,
Window
window
,
int
x
,
int
y
,
POINT
*
pt
)
{
struct
x11drv_win_data
*
data
=
X11DRV_get_win_data
(
hwnd
);
if
(
!
data
)
return
;
if
(
window
==
data
->
client_window
)
{
pt
->
x
=
x
+
data
->
client_rect
.
left
;
pt
->
y
=
y
+
data
->
client_rect
.
top
;
}
else
{
pt
->
x
=
x
+
data
->
whole_rect
.
left
;
pt
->
y
=
y
+
data
->
whole_rect
.
top
;
}
}
/***********************************************************************
* clip_point_to_rect
*
* Clip point to the provided rectangle
...
...
@@ -241,25 +218,33 @@ void set_window_cursor( HWND hwnd, HCURSOR handle )
*/
static
void
update_mouse_state
(
HWND
hwnd
,
Window
window
,
int
x
,
int
y
,
unsigned
int
state
,
POINT
*
pt
)
{
struct
x11drv_thread_data
*
data
=
x11drv_thread_data
();
struct
x11drv_win_data
*
data
=
X11DRV_get_win_data
(
hwnd
);
if
(
!
data
)
return
;
get_coords
(
hwnd
,
window
,
x
,
y
,
pt
);
if
(
window
==
data
->
whole_window
)
{
x
+=
data
->
whole_rect
.
left
-
data
->
client_rect
.
left
;
y
+=
data
->
whole_rect
.
top
-
data
->
client_rect
.
top
;
}
pt
->
x
=
x
+
data
->
client_rect
.
left
;
pt
->
y
=
y
+
data
->
client_rect
.
top
;
cursor_window
=
hwnd
;
/* update the wine server Z-order */
if
(
window
!=
data
->
grab_window
&&
if
(
window
!=
x11drv_thread_data
()
->
grab_window
&&
/* ignore event if a button is pressed, since the mouse is then grabbed too */
!
(
state
&
(
Button1Mask
|
Button2Mask
|
Button3Mask
|
Button4Mask
|
Button5Mask
|
Button6Mask
|
Button7Mask
)))
{
SERVER_START_REQ
(
update_window_zorder
)
{
req
->
window
=
wine_server_user_handle
(
hwnd
);
req
->
rect
.
left
=
pt
->
x
;
req
->
rect
.
top
=
pt
->
y
;
req
->
rect
.
right
=
pt
->
x
+
1
;
req
->
rect
.
bottom
=
pt
->
y
+
1
;
req
->
rect
.
left
=
x
;
req
->
rect
.
top
=
y
;
req
->
rect
.
right
=
x
+
1
;
req
->
rect
.
bottom
=
y
+
1
;
wine_server_call
(
req
);
}
SERVER_END_REQ
;
...
...
server/protocol.def
View file @
6ee45218
...
...
@@ -2441,7 +2441,7 @@ enum coords_relative
/* Update the z order of a window so that a given rectangle is fully visible */
@REQ(update_window_zorder)
user_handle_t window; /* handle to the window */
rectangle_t rect; /* rectangle that must be visible */
rectangle_t rect; /* rectangle that must be visible
(in client coords)
*/
@END
...
...
server/window.c
View file @
6ee45218
...
...
@@ -2423,18 +2423,20 @@ DECL_HANDLER(get_update_region)
/* update the z order of a window so that a given rectangle is fully visible */
DECL_HANDLER
(
update_window_zorder
)
{
rectangle_t
tmp
;
rectangle_t
tmp
,
rect
=
req
->
rect
;
struct
window
*
ptr
,
*
win
=
get_window
(
req
->
window
);
if
(
!
win
||
!
win
->
parent
||
!
is_visible
(
win
))
return
;
/* nothing to do */
if
(
win
->
ex_style
&
WS_EX_LAYOUTRTL
)
mirror_rect
(
&
win
->
client_rect
,
&
rect
);
offset_rect
(
&
rect
,
win
->
client_rect
.
left
,
win
->
client_rect
.
top
);
LIST_FOR_EACH_ENTRY
(
ptr
,
&
win
->
parent
->
children
,
struct
window
,
entry
)
{
if
(
ptr
==
win
)
break
;
if
(
!
(
ptr
->
style
&
WS_VISIBLE
))
continue
;
if
(
ptr
->
ex_style
&
WS_EX_TRANSPARENT
)
continue
;
if
(
!
intersect_rect
(
&
tmp
,
&
ptr
->
visible_rect
,
&
re
q
->
re
ct
))
continue
;
if
(
ptr
->
win_region
&&
!
rect_in_region
(
ptr
->
win_region
,
&
re
q
->
re
ct
))
continue
;
if
(
!
intersect_rect
(
&
tmp
,
&
ptr
->
visible_rect
,
&
rect
))
continue
;
if
(
ptr
->
win_region
&&
!
rect_in_region
(
ptr
->
win_region
,
&
rect
))
continue
;
/* found a window obscuring the rectangle, now move win above this one */
/* making sure to not violate the topmost rule */
if
(
!
(
ptr
->
ex_style
&
WS_EX_TOPMOST
)
||
(
win
->
ex_style
&
WS_EX_TOPMOST
))
...
...
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