summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2015-02-22 13:01:17 +0100
committerThibault Saunier <tsaunier@gnome.org>2015-02-22 15:50:39 +0100
commitfb581a1084ed8949c6b8c666f07a3239153c03f6 (patch)
tree1cdb60708f60c068396a82245389c80cdc6d094f
parent77c982ed3f7fb2c8dc6956a71b79378cb2c09fbf (diff)
downloadgtk+-fb581a1084ed8949c6b8c666f07a3239153c03f6.tar.gz
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
-rw-r--r--gdk/quartz/gdkwindow-quartz.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 2a2444ef74..6306034bce 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -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;
}