forked from AuroraMiddleware/gtk
window: Change behavior of gdk_window_begin_draw_frame()
(1) Require a native window (2) Create the drawing context before calling begin_paint().
This commit is contained in:
parent
a860bbbe46
commit
9c041f6bcc
@ -2910,8 +2910,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,
|
||||
@ -2920,6 +2918,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user