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
5a859655
Commit
5a859655
authored
Sep 26, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Sep 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Re-sync the window region whenever factors affecting its conversion to…
winemac: Re-sync the window region whenever factors affecting its conversion to Cocoa coordinates change.
parent
d7f4d675
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
window.c
dlls/winemac.drv/window.c
+11
-4
No files found.
dlls/winemac.drv/window.c
View file @
5a859655
...
@@ -836,7 +836,8 @@ RGNDATA *get_region_data(HRGN hrgn, HDC hdc_lptodp)
...
@@ -836,7 +836,8 @@ RGNDATA *get_region_data(HRGN hrgn, HDC hdc_lptodp)
*
*
* Synchronize the Mac window position with the Windows one
* Synchronize the Mac window position with the Windows one
*/
*/
static
void
sync_window_position
(
struct
macdrv_win_data
*
data
,
UINT
swp_flags
,
const
RECT
*
old_window_rect
)
static
void
sync_window_position
(
struct
macdrv_win_data
*
data
,
UINT
swp_flags
,
const
RECT
*
old_window_rect
,
const
RECT
*
old_whole_rect
)
{
{
CGRect
frame
;
CGRect
frame
;
...
@@ -848,7 +849,10 @@ static void sync_window_position(struct macdrv_win_data *data, UINT swp_flags, c
...
@@ -848,7 +849,10 @@ static void sync_window_position(struct macdrv_win_data *data, UINT swp_flags, c
frame
.
size
.
width
=
frame
.
size
.
height
=
1
;
frame
.
size
.
width
=
frame
.
size
.
height
=
1
;
data
->
on_screen
=
macdrv_set_cocoa_window_frame
(
data
->
cocoa_window
,
&
frame
);
data
->
on_screen
=
macdrv_set_cocoa_window_frame
(
data
->
cocoa_window
,
&
frame
);
if
(
old_window_rect
&&
IsRectEmpty
(
old_window_rect
)
!=
IsRectEmpty
(
&
data
->
window_rect
))
if
(
old_window_rect
&&
old_whole_rect
&&
(
IsRectEmpty
(
old_window_rect
)
!=
IsRectEmpty
(
&
data
->
window_rect
)
||
old_window_rect
->
left
-
old_whole_rect
->
left
!=
data
->
window_rect
.
left
-
data
->
whole_rect
.
left
||
old_window_rect
->
top
-
old_whole_rect
->
top
!=
data
->
window_rect
.
top
-
data
->
whole_rect
.
top
))
sync_window_region
(
data
,
(
HRGN
)
1
);
sync_window_region
(
data
,
(
HRGN
)
1
);
TRACE
(
"win %p/%p whole_rect %s frame %s
\n
"
,
data
->
hwnd
,
data
->
cocoa_window
,
TRACE
(
"win %p/%p whole_rect %s frame %s
\n
"
,
data
->
hwnd
,
data
->
cocoa_window
,
...
@@ -1120,6 +1124,9 @@ void CDECL macdrv_SetWindowStyle(HWND hwnd, INT offset, STYLESTRUCT *style)
...
@@ -1120,6 +1124,9 @@ void CDECL macdrv_SetWindowStyle(HWND hwnd, INT offset, STYLESTRUCT *style)
sync_window_opacity
(
data
,
0
,
0
,
FALSE
,
0
);
sync_window_opacity
(
data
,
0
,
0
,
FALSE
,
0
);
if
(
data
->
surface
)
set_surface_use_alpha
(
data
->
surface
,
FALSE
);
if
(
data
->
surface
)
set_surface_use_alpha
(
data
->
surface
,
FALSE
);
}
}
if
(
offset
==
GWL_EXSTYLE
&&
(
changed
&
WS_EX_LAYOUTRTL
))
sync_window_region
(
data
,
(
HRGN
)
1
);
}
}
release_win_data
(
data
);
release_win_data
(
data
);
...
@@ -1371,7 +1378,7 @@ LRESULT CDECL macdrv_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
...
@@ -1371,7 +1378,7 @@ LRESULT CDECL macdrv_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
if
((
data
=
get_win_data
(
hwnd
)))
if
((
data
=
get_win_data
(
hwnd
)))
{
{
if
(
data
->
cocoa_window
&&
data
->
on_screen
)
if
(
data
->
cocoa_window
&&
data
->
on_screen
)
sync_window_position
(
data
,
SWP_NOZORDER
|
SWP_NOACTIVATE
,
NULL
);
sync_window_position
(
data
,
SWP_NOZORDER
|
SWP_NOACTIVATE
,
NULL
,
NULL
);
release_win_data
(
data
);
release_win_data
(
data
);
}
}
SendMessageW
(
hwnd
,
WM_DISPLAYCHANGE
,
wp
,
lp
);
SendMessageW
(
hwnd
,
WM_DISPLAYCHANGE
,
wp
,
lp
);
...
@@ -1557,7 +1564,7 @@ void CDECL macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags,
...
@@ -1557,7 +1564,7 @@ void CDECL macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags,
thread_data
->
current_event
->
type
!=
WINDOW_DID_MINIMIZE
&&
thread_data
->
current_event
->
type
!=
WINDOW_DID_MINIMIZE
&&
thread_data
->
current_event
->
type
!=
WINDOW_DID_UNMINIMIZE
))
thread_data
->
current_event
->
type
!=
WINDOW_DID_UNMINIMIZE
))
{
{
sync_window_position
(
data
,
swp_flags
,
&
old_window_rect
);
sync_window_position
(
data
,
swp_flags
,
&
old_window_rect
,
&
old_whole_rect
);
set_cocoa_window_properties
(
data
);
set_cocoa_window_properties
(
data
);
}
}
...
...
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