[gtk+/wip/otte/vulkan: 16/42] window: Change behavior of gdk_window_begin_draw_frame()



commit 00f83180dbd03bb4138247aea63a477c32940f67
Author: Benjamin Otte <otte redhat com>
Date:   Sun Nov 20 20:42:37 2016 +0100

    window: Change behavior of gdk_window_begin_draw_frame()
    
    (1) Require a native window
    (2) Create the drawing context before calling begin_paint().

 gdk/gdkwindow.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 9ddec1b..b646458 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2909,8 +2909,6 @@ gdk_window_begin_draw_frame (GdkWindow            *window,
       return NULL;
     }
 
-  gdk_window_begin_paint_internal (window, region);
-
   context = g_object_new (GDK_TYPE_DRAWING_CONTEXT,
                           "window", window,
                           "clip", region,
@@ -2919,6 +2917,8 @@ gdk_window_begin_draw_frame (GdkWindow            *window,
   /* Do not take a reference, to avoid creating cycles */
   window->drawing_context = context;
 
+  gdk_window_begin_paint_internal (window, region);
+
   return context;
 }
 


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