[gtk+/wip/otte/gl-drawing: 3/15] window: Change behavior of gdk_window_begin_draw_frame()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gl-drawing: 3/15] window: Change behavior of gdk_window_begin_draw_frame()
- Date: Wed, 23 Nov 2016 07:50:14 +0000 (UTC)
commit be766fd2ced4f922d48ad3608c1036194931998b
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 | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index ee93ade..2741d9c 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2894,6 +2894,8 @@ gdk_window_begin_draw_frame (GdkWindow *window,
GdkDrawingContext *context;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
+ g_return_val_if_fail (gdk_window_has_native (window), NULL);
+ g_return_val_if_fail (gdk_window_is_toplevel (window), NULL);
if (window->drawing_context != NULL)
{
@@ -2903,14 +2905,13 @@ gdk_window_begin_draw_frame (GdkWindow *window,
return NULL;
}
- if (gdk_window_has_native (window) && gdk_window_is_toplevel (window))
- gdk_window_begin_paint_internal (window, region);
-
context = GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_draw_context (window, region);
/* 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]