[gtk+/gtk-3.14] 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+/gtk-3.14] gdk/quartz: Fix mixup in attributes usage creating window implementation
- Date: Sun, 22 Feb 2015 18:38:23 +0000 (UTC)
commit e2d89d21d4eefab5b6800cb853080dafdb050ba8
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 7110d15..16dc024 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -873,7 +873,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:
@@ -901,8 +901,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]