[gtk+] gdk/quartz: Fix mixup in attributes usage creating window implementation
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk/quartz: Fix mixup in attributes usage creating window implementation
- Date: Sun, 22 Feb 2015 18:44:11 +0000 (UTC)
commit fb581a1084ed8949c6b8c666f07a3239153c03f6
Author: Thibault Saunier <tsaunier gnome org>
Date: Sun Feb 22 13:01:17 2015 +0100
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
gdk/quartz/gdkwindow-quartz.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 2a2444e..6306034 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]