winemac: Change macdrv_create_view() to not add the new view to a window's content view.
Callers can use macdrv_set_view_superview() to do that separately. Signed-off-by: Ken Thomases <ken@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ca49b8070c
commit
eef99122f7
|
@ -3212,14 +3212,13 @@ void macdrv_set_window_min_max_sizes(macdrv_window w, CGSize min_size, CGSize ma
|
|||
/***********************************************************************
|
||||
* macdrv_create_view
|
||||
*
|
||||
* Creates and returns a view in the specified rect of the window. The
|
||||
* Creates and returns a view with the specified frame rect. The
|
||||
* caller is responsible for calling macdrv_dispose_view() on the view
|
||||
* when it is done with it.
|
||||
*/
|
||||
macdrv_view macdrv_create_view(macdrv_window w, CGRect rect)
|
||||
macdrv_view macdrv_create_view(CGRect rect)
|
||||
{
|
||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
WineWindow* window = (WineWindow*)w;
|
||||
__block WineContentView* view;
|
||||
|
||||
if (CGRectIsNull(rect)) rect = CGRectZero;
|
||||
|
@ -3238,8 +3237,6 @@ macdrv_view macdrv_create_view(macdrv_window w, CGRect rect)
|
|||
selector:@selector(updateGLContexts)
|
||||
name:NSApplicationDidChangeScreenParametersNotification
|
||||
object:NSApp];
|
||||
[[window contentView] addSubview:view];
|
||||
[window updateForGLSubviews];
|
||||
});
|
||||
|
||||
[pool release];
|
||||
|
|
|
@ -511,7 +511,7 @@ extern void macdrv_set_window_color_key(macdrv_window w, CGFloat keyRed, CGFloat
|
|||
extern void macdrv_window_use_per_pixel_alpha(macdrv_window w, int use_per_pixel_alpha) DECLSPEC_HIDDEN;
|
||||
extern void macdrv_give_cocoa_window_focus(macdrv_window w, int activate) DECLSPEC_HIDDEN;
|
||||
extern void macdrv_set_window_min_max_sizes(macdrv_window w, CGSize min_size, CGSize max_size) DECLSPEC_HIDDEN;
|
||||
extern macdrv_view macdrv_create_view(macdrv_window w, CGRect rect) DECLSPEC_HIDDEN;
|
||||
extern macdrv_view macdrv_create_view(CGRect rect) DECLSPEC_HIDDEN;
|
||||
extern void macdrv_dispose_view(macdrv_view v) DECLSPEC_HIDDEN;
|
||||
extern void macdrv_set_view_frame(macdrv_view v, CGRect rect) DECLSPEC_HIDDEN;
|
||||
extern void macdrv_set_view_superview(macdrv_view v, macdrv_view s, macdrv_window w, macdrv_view p, macdrv_view n) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -1600,13 +1600,14 @@ static BOOL set_win_format(struct macdrv_win_data *data, int format)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
data->gl_view = macdrv_create_view(cocoa_window, cgrect_from_rect(data->gl_rect));
|
||||
data->gl_view = macdrv_create_view(cgrect_from_rect(data->gl_rect));
|
||||
if (!data->gl_view)
|
||||
{
|
||||
WARN("failed to create GL view for window %p rect %s\n", cocoa_window, wine_dbgstr_rect(&data->gl_rect));
|
||||
return FALSE;
|
||||
}
|
||||
macdrv_set_view_hidden(data->gl_view, FALSE);
|
||||
macdrv_set_view_superview(data->gl_view, NULL, cocoa_window, NULL, NULL);
|
||||
|
||||
TRACE("created GL view %p in window %p at %s\n", data->gl_view, cocoa_window,
|
||||
wine_dbgstr_rect(&data->gl_rect));
|
||||
|
|
Loading…
Reference in New Issue