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
08b83254
Commit
08b83254
authored
Feb 08, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Shape offset must be relative to the window position.
parent
057267d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
window.c
dlls/winex11.drv/window.c
+13
-8
No files found.
dlls/winex11.drv/window.c
View file @
08b83254
...
...
@@ -1277,8 +1277,8 @@ void X11DRV_X_to_window_rect( struct x11drv_win_data *data, RECT *rect )
* Synchronize the X window position with the Windows one
*/
static
void
sync_window_position
(
Display
*
display
,
struct
x11drv_win_data
*
data
,
UINT
swp_flags
,
const
RECT
*
old_
client
_rect
,
const
RECT
*
old_whole_rect
)
UINT
swp_flags
,
const
RECT
*
old_
window
_rect
,
const
RECT
*
old_whole_rect
,
const
RECT
*
old_client_rect
)
{
DWORD
style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_STYLE
);
XWindowChanges
changes
;
...
...
@@ -1329,10 +1329,13 @@ static void sync_window_position( Display *display, struct x11drv_win_data *data
#ifdef HAVE_LIBXSHAPE
if
(
data
->
shaped
)
{
int
x_offset
=
old_whole_rect
->
left
-
data
->
whole_rect
.
left
;
int
y_offset
=
old_whole_rect
->
top
-
data
->
whole_rect
.
top
;
if
(
x_offset
||
y_offset
)
XShapeOffsetShape
(
display
,
data
->
whole_window
,
ShapeBounding
,
x_offset
,
y_offset
);
int
old_x_offset
=
old_window_rect
->
left
-
old_whole_rect
->
left
;
int
old_y_offset
=
old_window_rect
->
top
-
old_whole_rect
->
top
;
int
new_x_offset
=
data
->
window_rect
.
left
-
data
->
whole_rect
.
left
;
int
new_y_offset
=
data
->
window_rect
.
top
-
data
->
whole_rect
.
top
;
if
(
old_x_offset
!=
new_x_offset
||
old_y_offset
!=
new_y_offset
)
XShapeOffsetShape
(
display
,
data
->
whole_window
,
ShapeBounding
,
new_x_offset
-
old_x_offset
,
new_y_offset
-
old_y_offset
);
}
#endif
wine_tsx11_unlock
();
...
...
@@ -2097,7 +2100,7 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags
Display
*
display
;
struct
x11drv_win_data
*
data
=
X11DRV_get_win_data
(
hwnd
);
DWORD
new_style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
RECT
old_whole_rect
,
old_client_rect
;
RECT
old_w
indow_rect
,
old_w
hole_rect
,
old_client_rect
;
int
event_type
;
if
(
!
data
)
return
;
...
...
@@ -2105,6 +2108,7 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags
thread_data
=
x11drv_thread_data
();
display
=
thread_data
->
display
;
old_window_rect
=
data
->
window_rect
;
old_whole_rect
=
data
->
whole_rect
;
old_client_rect
=
data
->
client_rect
;
data
->
window_rect
=
*
rectWindow
;
...
...
@@ -2163,7 +2167,8 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags
/* don't change position if we are about to minimize or maximize a managed window */
if
(
!
event_type
&&
!
(
data
->
managed
&&
(
swp_flags
&
SWP_STATECHANGED
)
&&
(
new_style
&
(
WS_MINIMIZE
|
WS_MAXIMIZE
))))
sync_window_position
(
display
,
data
,
swp_flags
,
&
old_client_rect
,
&
old_whole_rect
);
sync_window_position
(
display
,
data
,
swp_flags
,
&
old_window_rect
,
&
old_whole_rect
,
&
old_client_rect
);
if
((
new_style
&
WS_VISIBLE
)
&&
((
new_style
&
WS_MINIMIZE
)
||
is_window_rect_mapped
(
rectWindow
)))
...
...
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