mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 17:30:10 +00:00
gtkmain: Rearrange code
Prevent a segfault in unknown circumstances, and break the ignore deprecations wrapper out from the if statement so that we don't cover too much ground by accident.
This commit is contained in:
parent
f4c2c4c667
commit
e76f41b788
@ -1647,8 +1647,15 @@ gtk_main_do_event (GdkEvent *event)
|
||||
break;
|
||||
|
||||
case GDK_EXPOSE:
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
if (event->any.window && gtk_widget_get_double_buffered (event_widget))
|
||||
if (event->any.window)
|
||||
{
|
||||
gboolean is_double_buffered;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
is_double_buffered = gtk_widget_get_double_buffered (event_widget);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
|
||||
if (is_double_buffered)
|
||||
{
|
||||
/* We handle exposes only on native windows, relying on the
|
||||
* draw() handler to propagate down to non-native windows.
|
||||
@ -1663,10 +1670,10 @@ gtk_main_do_event (GdkEvent *event)
|
||||
}
|
||||
}
|
||||
else
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
{
|
||||
gtk_widget_send_expose (event_widget, event);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GDK_PROPERTY_NOTIFY:
|
||||
|
Loading…
Reference in New Issue
Block a user