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
177b67e6
Commit
177b67e6
authored
Jan 21, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Jan 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Make each Mac driver window track the HWND it's associated with.
parent
207c4d19
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
4 deletions
+20
-4
cocoa_window.h
dlls/winemac.drv/cocoa_window.h
+1
-0
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+17
-2
macdrv_cocoa.h
dlls/winemac.drv/macdrv_cocoa.h
+1
-1
window.c
dlls/winemac.drv/window.c
+1
-1
No files found.
dlls/winemac.drv/cocoa_window.h
View file @
177b67e6
...
...
@@ -32,6 +32,7 @@
BOOL
floating
;
WineWindow
*
latentParentWindow
;
void
*
hwnd
;
WineEventQueue
*
queue
;
void
*
surface
;
...
...
dlls/winemac.drv/cocoa_window.m
View file @
177b67e6
...
...
@@ -66,6 +66,7 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
@property
(
nonatomic
)
BOOL
floating
;
@property
(
retain
,
nonatomic
)
NSWindow
*
latentParentWindow
;
@property
(
nonatomic
)
void
*
hwnd
;
@property
(
retain
,
nonatomic
)
WineEventQueue
*
queue
;
@property
(
nonatomic
)
void
*
surface
;
...
...
@@ -162,7 +163,7 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
@implementation
WineWindow
@synthesize
disabled
,
noActivate
,
floating
,
latentParentWindow
,
queue
;
@synthesize
disabled
,
noActivate
,
floating
,
latentParentWindow
,
hwnd
,
queue
;
@synthesize
surface
,
surface_mutex
;
@synthesize
shape
,
shapeChangedSinceLastDraw
;
@synthesize
colorKeyed
,
colorKeyRed
,
colorKeyGreen
,
colorKeyBlue
;
...
...
@@ -170,6 +171,7 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
+
(
WineWindow
*
)
createWindowWithFeatures
:(
const
struct
macdrv_window_features
*
)
wf
windowFrame
:(
NSRect
)
window_frame
hwnd
:(
void
*
)
hwnd
queue
:(
WineEventQueue
*
)
queue
{
WineWindow
*
window
;
...
...
@@ -195,6 +197,7 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
[
window
setHasShadow
:
wf
->
shadow
];
[
window
setColorSpace
:[
NSColorSpace
genericRGBColorSpace
]];
[
window
setDelegate
:
window
];
window
.
hwnd
=
hwnd
;
window
.
queue
=
queue
;
contentView
=
[[[
WineContentView
alloc
]
initWithFrame
:
NSZeroRect
]
autorelease
];
...
...
@@ -447,13 +450,14 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
* title bar, close box, etc.).
*/
macdrv_window
macdrv_create_cocoa_window
(
const
struct
macdrv_window_features
*
wf
,
CGRect
frame
,
macdrv_event_queue
queue
)
CGRect
frame
,
void
*
hwnd
,
macdrv_event_queue
queue
)
{
__block
WineWindow
*
window
;
OnMainThread
(
^
{
window
=
[[
WineWindow
createWindowWithFeatures
:
wf
windowFrame
:
NSRectFromCGRect
(
frame
)
hwnd
:
hwnd
queue
:(
WineEventQueue
*
)
queue
]
retain
];
});
...
...
@@ -478,6 +482,17 @@ void macdrv_destroy_cocoa_window(macdrv_window w)
}
/***********************************************************************
* macdrv_get_window_hwnd
*
* Get the hwnd that was set for the window at creation.
*/
void
*
macdrv_get_window_hwnd
(
macdrv_window
w
)
{
WineWindow
*
window
=
(
WineWindow
*
)
w
;
return
window
.
hwnd
;
}
/***********************************************************************
* macdrv_set_cocoa_window_features
*
* Update a Cocoa window's features.
...
...
dlls/winemac.drv/macdrv_cocoa.h
View file @
177b67e6
...
...
@@ -161,7 +161,7 @@ struct macdrv_window_state {
};
extern
macdrv_window
macdrv_create_cocoa_window
(
const
struct
macdrv_window_features
*
wf
,
CGRect
frame
,
macdrv_event_queue
queue
)
DECLSPEC_HIDDEN
;
CGRect
frame
,
void
*
hwnd
,
macdrv_event_queue
queue
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_destroy_cocoa_window
(
macdrv_window
w
)
DECLSPEC_HIDDEN
;
extern
void
*
macdrv_get_window_hwnd
(
macdrv_window
w
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_set_cocoa_window_features
(
macdrv_window
w
,
...
...
dlls/winemac.drv/window.c
View file @
177b67e6
...
...
@@ -511,7 +511,7 @@ static void create_cocoa_window(struct macdrv_win_data *data)
TRACE
(
"creating %p window %s whole %s client %s
\n
"
,
data
->
hwnd
,
wine_dbgstr_rect
(
&
data
->
window_rect
),
wine_dbgstr_rect
(
&
data
->
whole_rect
),
wine_dbgstr_rect
(
&
data
->
client_rect
));
data
->
cocoa_window
=
macdrv_create_cocoa_window
(
&
wf
,
frame
,
thread_data
->
queue
);
data
->
cocoa_window
=
macdrv_create_cocoa_window
(
&
wf
,
frame
,
data
->
hwnd
,
thread_data
->
queue
);
if
(
!
data
->
cocoa_window
)
goto
done
;
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