Commit fb581a10 authored by Thibault Saunier's avatar Thibault Saunier

gdk/quartz: Fix mixup in attributes usage creating window implementation

First, attributes can be NULL (which is always the case when calling
gdk_window_ensure_native) so do not unconditionally dereference it.

Then the window_type should be taken directly from the GdkWindow as
in other backends (such as the X11 one for example).

https://bugzilla.gnome.org/show_bug.cgi?id=744942
parent 77c982ed
......@@ -818,7 +818,7 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
impl->view = NULL;
switch (attributes->window_type)
switch (window->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_TEMP:
......@@ -846,8 +846,9 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
window->width,
window->height);
if (attributes->window_type == GDK_WINDOW_TEMP ||
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN)
if (window->window_type == GDK_WINDOW_TEMP ||
((attributes_mask & GDK_WA_TYPE_HINT) &&
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN))
{
style_mask = NSBorderlessWindowMask;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment