mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +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
|
||||
* addition to the configure event.
|
||||
*/
|
||||
if (GDK_IS_MACOS_TOPLEVEL_SURFACE (gdk_surface) &&
|
||||
GDK_MACOS_TOPLEVEL_SURFACE (gdk_surface)->decorated)
|
||||
if (GDK_IS_MACOS_TOPLEVEL_SURFACE (gdk_surface))
|
||||
gdk_surface_request_layout (GDK_SURFACE (gdk_surface));
|
||||
}
|
||||
|
||||
@ -875,12 +874,21 @@ typedef NSString *CALayerContentsGravity;
|
||||
{
|
||||
NSWindowStyleMask style_mask = [self styleMask];
|
||||
|
||||
[self setHasShadow:decorated];
|
||||
|
||||
if (decorated)
|
||||
style_mask |= NSWindowStyleMaskTitled;
|
||||
{
|
||||
style_mask &= ~NSWindowStyleMaskFullSizeContentView;
|
||||
[self setTitleVisibility:NSWindowTitleVisible];
|
||||
}
|
||||
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];
|
||||
}
|
||||
|
@ -2972,6 +2972,10 @@ gtk_window_supports_client_shadow (GtkWindow *window)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_MACOS
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -2983,9 +2987,13 @@ gtk_window_enable_csd (GtkWindow *window)
|
||||
|
||||
/* We need a visual with alpha for client shadows */
|
||||
if (priv->use_client_shadow)
|
||||
gtk_widget_add_css_class (widget, "csd");
|
||||
{
|
||||
gtk_widget_add_css_class (widget, "csd");
|
||||
}
|
||||
else
|
||||
gtk_widget_add_css_class (widget, "solid-csd");
|
||||
{
|
||||
/* gtk_widget_add_css_class (widget, "solid-csd"); */
|
||||
}
|
||||
|
||||
priv->client_decorated = TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user