winemac: Remove now unnecessary cocoa window surface pointer.

This commit is contained in:
Rémi Bernon 2024-06-21 10:15:12 +02:00 committed by Alexandre Julliard
parent 66051c2aa1
commit 22c517319a
5 changed files with 1 additions and 24 deletions

View file

@ -44,9 +44,6 @@ @interface WineWindow : NSPanel <NSWindowDelegate>
void* hwnd;
WineEventQueue* queue;
void* surface;
pthread_mutex_t* surface_mutex;
CGDirectDisplayID _lastDisplayID;
NSTimeInterval _lastDisplayTime;

View file

@ -410,8 +410,6 @@ @interface WineWindow ()
@property (nonatomic) void* hwnd;
@property (retain, readwrite, nonatomic) WineEventQueue* queue;
@property (nonatomic) void* surface;
@property (nonatomic) BOOL shapeChangedSinceLastDraw;
@property (readonly, nonatomic) BOOL needsTransparency;
@ -527,7 +525,7 @@ - (void) updateLayer
if ([window contentView] != self)
return;
if (window.closing || !window.surface)
if (window.closing)
return;
imageRect = layer.bounds;
@ -1021,7 +1019,6 @@ @implementation WineWindow
@synthesize disabled, noForeground, preventsAppActivation, floating, fullscreen, fakingClose, closing, latentParentWindow, hwnd, queue;
@synthesize drawnSinceShown;
@synthesize surface;
@synthesize shapeChangedSinceLastDraw;
@synthesize colorKeyed, colorKeyRed, colorKeyGreen, colorKeyBlue;
@synthesize usePerPixelAlpha;
@ -3500,20 +3497,6 @@ void macdrv_set_cocoa_parent_window(macdrv_window w, macdrv_window parent)
});
}
/***********************************************************************
* macdrv_set_window_surface
*/
void macdrv_set_window_surface(macdrv_window w, struct window_surface *window_surface)
{
@autoreleasepool
{
WineWindow* window = (WineWindow*)w;
OnMainThread(^{
window.surface = window_surface;
});
}
}
/***********************************************************************
* macdrv_window_set_color_image

View file

@ -552,7 +552,6 @@ extern void macdrv_order_cocoa_window(macdrv_window w, macdrv_window prev,
extern void macdrv_set_cocoa_window_frame(macdrv_window w, const CGRect* new_frame);
extern void macdrv_get_cocoa_window_frame(macdrv_window w, CGRect* out_frame);
extern void macdrv_set_cocoa_parent_window(macdrv_window w, macdrv_window parent);
extern void macdrv_set_window_surface(macdrv_window w, struct window_surface *window_surface);
extern void macdrv_window_set_color_image(macdrv_window w, CGImageRef image, CGRect rect, CGRect dirty);
extern void macdrv_set_window_shape(macdrv_window w, const CGRect *rects, int count);
extern void macdrv_set_window_alpha(macdrv_window w, CGFloat alpha);

View file

@ -317,7 +317,6 @@ BOOL macdrv_CreateLayeredWindow(HWND hwnd, const RECT *window_rect, COLORREF col
if (!surface || !EqualRect(&surface->rect, &rect))
{
data->surface = create_surface(data->hwnd, data->cocoa_window, &rect, NULL, TRUE);
macdrv_set_window_surface(data->cocoa_window, data->surface);
if (surface) window_surface_release(surface);
surface = data->surface;
if (data->unminimized_surface)

View file

@ -2011,7 +2011,6 @@ void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags,
}
else
{
macdrv_set_window_surface(data->cocoa_window, surface);
if (data->unminimized_surface)
{
window_surface_release(data->unminimized_surface);