[gtk+/wip/mir2: 73/75] mir: use parent_window's impl for GDK_INPUT_ONLY windows



commit ce596da0d8eee33016bae8bda3d621860b45bccb
Author: William Hua <william attente ca>
Date:   Fri Nov 28 08:33:03 2014 -0500

    mir: use parent_window's impl for GDK_INPUT_ONLY windows
    
    Fixes a crash that occurs when the user selects text.

 gdk/mir/gdkmirdisplay.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/gdk/mir/gdkmirdisplay.c b/gdk/mir/gdkmirdisplay.c
index 5c27b53..cc92a53 100644
--- a/gdk/mir/gdkmirdisplay.c
+++ b/gdk/mir/gdkmirdisplay.c
@@ -416,9 +416,20 @@ gdk_mir_display_create_window_impl (GdkDisplay    *display,
   g_printerr (" location=(%d, %d)", window->x, window->y);
   g_printerr (" size=(%d, %d)", window->width, window->height);
   g_printerr ("\n");
-  if (attributes->wclass != GDK_INPUT_OUTPUT)
-    return;
-  window->impl = _gdk_mir_window_impl_new ();
+
+  if (attributes->wclass == GDK_INPUT_OUTPUT)
+    {
+      window->impl = _gdk_mir_window_impl_new ();
+      window->impl_window = window;
+    }
+  else /* attributes->wclass == GDK_INPUT_ONLY */
+    {
+      window->impl = g_object_ref (real_parent->impl);
+      window->impl_window = real_parent;
+
+      /* FIXME: this is called in gdk_window_new, which sets window->impl_window
+       * back to window after this function returns. */
+    }
 }
 
 static GdkKeymap *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]