mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 06:10:21 +00:00
[macos] Use FullSizeContent for CSD
This commit is contained in:
parent
9b9e8b385e
commit
a6ce506714
@ -398,8 +398,7 @@ typedef NSString *CALayerContentsGravity;
|
|||||||
* in from a display-side change. We need to request a layout in
|
* in from a display-side change. We need to request a layout in
|
||||||
* addition to the configure event.
|
* addition to the configure event.
|
||||||
*/
|
*/
|
||||||
if (GDK_IS_MACOS_TOPLEVEL_SURFACE (gdk_surface) &&
|
if (GDK_IS_MACOS_TOPLEVEL_SURFACE (gdk_surface))
|
||||||
GDK_MACOS_TOPLEVEL_SURFACE (gdk_surface)->decorated)
|
|
||||||
gdk_surface_request_layout (GDK_SURFACE (gdk_surface));
|
gdk_surface_request_layout (GDK_SURFACE (gdk_surface));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -875,12 +874,21 @@ typedef NSString *CALayerContentsGravity;
|
|||||||
{
|
{
|
||||||
NSWindowStyleMask style_mask = [self styleMask];
|
NSWindowStyleMask style_mask = [self styleMask];
|
||||||
|
|
||||||
[self setHasShadow:decorated];
|
|
||||||
|
|
||||||
if (decorated)
|
if (decorated)
|
||||||
style_mask |= NSWindowStyleMaskTitled;
|
{
|
||||||
|
style_mask &= ~NSWindowStyleMaskFullSizeContentView;
|
||||||
|
[self setTitleVisibility:NSWindowTitleVisible];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
style_mask &= ~NSWindowStyleMaskTitled;
|
{
|
||||||
|
style_mask |= NSWindowStyleMaskFullSizeContentView;
|
||||||
|
[self setTitleVisibility:NSWindowTitleHidden];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self setTitlebarAppearsTransparent:!decorated];
|
||||||
|
[[self standardWindowButton:NSWindowCloseButton] setHidden:!decorated];
|
||||||
|
[[self standardWindowButton:NSWindowMiniaturizeButton] setHidden:!decorated];
|
||||||
|
[[self standardWindowButton:NSWindowZoomButton] setHidden:!decorated];
|
||||||
|
|
||||||
[self setStyleMask:style_mask];
|
[self setStyleMask:style_mask];
|
||||||
}
|
}
|
||||||
|
@ -2972,6 +2972,10 @@ gtk_window_supports_client_shadow (GtkWindow *window)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_MACOS
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2983,9 +2987,13 @@ gtk_window_enable_csd (GtkWindow *window)
|
|||||||
|
|
||||||
/* We need a visual with alpha for client shadows */
|
/* We need a visual with alpha for client shadows */
|
||||||
if (priv->use_client_shadow)
|
if (priv->use_client_shadow)
|
||||||
gtk_widget_add_css_class (widget, "csd");
|
{
|
||||||
|
gtk_widget_add_css_class (widget, "csd");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
gtk_widget_add_css_class (widget, "solid-csd");
|
{
|
||||||
|
/* gtk_widget_add_css_class (widget, "solid-csd"); */
|
||||||
|
}
|
||||||
|
|
||||||
priv->client_decorated = TRUE;
|
priv->client_decorated = TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user