settings: Convert to GdkEvent API

This commit is contained in:
Matthias Clasen 2017-08-25 22:54:25 -04:00 committed by Carlos Garnacho
parent 7cbd35dd86
commit c68c754f3e
3 changed files with 10 additions and 5 deletions

View File

@ -1613,7 +1613,7 @@ gtk_main_do_event (GdkEvent *event)
if (event->type == GDK_SETTING)
{
_gtk_settings_handle_event (&event->setting);
_gtk_settings_handle_event (event);
return;
}

View File

@ -2009,15 +2009,20 @@ gtk_rc_property_parse_border (const GParamSpec *pspec,
}
void
_gtk_settings_handle_event (GdkEventSetting *event)
_gtk_settings_handle_event (GdkEvent *event)
{
GdkScreen *screen;
GtkSettings *settings;
GParamSpec *pspec;
const char *name;
screen = gdk_window_get_screen (event->window);
screen = gdk_window_get_screen (gdk_event_get_window (event));
settings = gtk_settings_get_for_screen (screen);
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (settings), event->name);
if (!gdk_event_get_setting (event, &name))
return;
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (settings), name);
if (!pspec)
return;

View File

@ -31,7 +31,7 @@ void _gtk_settings_set_property_value_from_rc (GtkSettings
const GtkSettingsValue *svalue);
void _gtk_settings_reset_rc_values (GtkSettings *settings);
void _gtk_settings_handle_event (GdkEventSetting *event);
void _gtk_settings_handle_event (GdkEvent *event);
GtkRcPropertyParser _gtk_rc_property_parser_from_type (GType type);
gboolean _gtk_settings_parse_convert (GtkRcPropertyParser parser,
const GValue *src_value,