macos: Let host determine window sizes
Clean up lastUnfullscreenFrame attribute, as we do not really need it. The application knows what to resize to.
This commit is contained in:
@@ -715,26 +715,16 @@ typedef NSString *CALayerContentsGravity;
|
||||
|
||||
-(void)setStyleMask:(NSWindowStyleMask)styleMask
|
||||
{
|
||||
gboolean was_fullscreen;
|
||||
gboolean is_fullscreen;
|
||||
gboolean was_opaque;
|
||||
gboolean is_opaque;
|
||||
|
||||
was_fullscreen = (([self styleMask] & NSWindowStyleMaskFullScreen) != 0);
|
||||
was_opaque = (([self styleMask] & NSWindowStyleMaskTitled) != 0);
|
||||
|
||||
[super setStyleMask:styleMask];
|
||||
|
||||
is_fullscreen = (([self styleMask] & NSWindowStyleMaskFullScreen) != 0);
|
||||
is_opaque = (([self styleMask] & NSWindowStyleMaskTitled) != 0);
|
||||
|
||||
if (was_fullscreen != is_fullscreen)
|
||||
{
|
||||
if (was_fullscreen)
|
||||
[self setFrame:lastUnfullscreenFrame display:NO];
|
||||
|
||||
_gdk_macos_surface_update_fullscreen_state (gdk_surface);
|
||||
}
|
||||
_gdk_macos_surface_update_fullscreen_state (gdk_surface);
|
||||
|
||||
if (was_opaque != is_opaque)
|
||||
{
|
||||
@@ -777,7 +767,6 @@ typedef NSString *CALayerContentsGravity;
|
||||
-(void)windowWillEnterFullScreen:(NSNotification *)aNotification
|
||||
{
|
||||
inFullscreenTransition = YES;
|
||||
lastUnfullscreenFrame = [self frame];
|
||||
}
|
||||
|
||||
-(void)windowDidEnterFullScreen:(NSNotification *)aNotification
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
|
||||
EdgeSnapping snapping;
|
||||
|
||||
NSRect lastUnfullscreenFrame;
|
||||
BOOL inFullscreenTransition;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,14 +56,6 @@ enum {
|
||||
|
||||
static GParamSpec *properties [LAST_PROP];
|
||||
|
||||
static gboolean
|
||||
window_is_fullscreen (GdkMacosSurface *self)
|
||||
{
|
||||
g_assert (GDK_IS_MACOS_SURFACE (self));
|
||||
|
||||
return ([self->window styleMask] & NSWindowStyleMaskFullScreen) != 0;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_macos_surface_request_frame (GdkMacosSurface *self)
|
||||
{
|
||||
@@ -758,7 +750,7 @@ _gdk_macos_surface_update_fullscreen_state (GdkMacosSurface *self)
|
||||
g_return_if_fail (GDK_IS_MACOS_SURFACE (self));
|
||||
|
||||
state = GDK_SURFACE (self)->state;
|
||||
is_fullscreen = window_is_fullscreen (self);
|
||||
is_fullscreen = ([self->window styleMask] & NSWindowStyleMaskFullScreen) != 0;
|
||||
was_fullscreen = (state & GDK_TOPLEVEL_STATE_FULLSCREEN) != 0;
|
||||
|
||||
if (is_fullscreen != was_fullscreen)
|
||||
|
||||
Reference in New Issue
Block a user