mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
gdkwindow: Make the precondition of gdk_window_add_damage clearer
This commit is contained in:
parent
06cfaea553
commit
8eb092ea14
@ -3223,11 +3223,16 @@ gdk_window_add_damage (GdkWindow *toplevel,
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkEvent event = { 0, };
|
||||
|
||||
/* This function only makes sense for offscreen windows. */
|
||||
g_assert (gdk_window_is_offscreen (toplevel));
|
||||
|
||||
event.expose.type = GDK_DAMAGE;
|
||||
event.expose.window = toplevel;
|
||||
event.expose.send_event = FALSE;
|
||||
event.expose.region = damaged_region;
|
||||
cairo_region_get_extents (event.expose.region, &event.expose.area);
|
||||
|
||||
display = gdk_window_get_display (event.expose.window);
|
||||
_gdk_event_queue_append (display, gdk_event_copy (&event));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user