Commit 3f5ad789 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Fix usage of compat GTK_TYPE_ macros without including gtkobject.h.

Thu Sep 19 16:39:29 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtksettings.h (GTK_SETTINGS_GET_CLASS): Fix
        usage of compat GTK_TYPE_ macros without including
        gtkobject.h.

        * gdk/x11/gdkevents-x11.[ch]: Set a flag when initializing
        to avoid having extra settings-notify events sent
        when not needed.
parent 1e3c6144
Thu Sep 19 16:39:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.h (GTK_SETTINGS_GET_CLASS): Fix
usage of compat GTK_TYPE_ macros without including
gtkobject.h.
* gdk/x11/gdkevents-x11.[ch]: Set a flag when initializing
to avoid having extra settings-notify events sent
when not needed.
2002-09-17 Matthias Clasen <maclas@gmx.de>
* gtk/stock-icons/stock_color_picker_25.png:
......
Thu Sep 19 16:39:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.h (GTK_SETTINGS_GET_CLASS): Fix
usage of compat GTK_TYPE_ macros without including
gtkobject.h.
* gdk/x11/gdkevents-x11.[ch]: Set a flag when initializing
to avoid having extra settings-notify events sent
when not needed.
2002-09-17 Matthias Clasen <maclas@gmx.de>
* gtk/stock-icons/stock_color_picker_25.png:
......
Thu Sep 19 16:39:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.h (GTK_SETTINGS_GET_CLASS): Fix
usage of compat GTK_TYPE_ macros without including
gtkobject.h.
* gdk/x11/gdkevents-x11.[ch]: Set a flag when initializing
to avoid having extra settings-notify events sent
when not needed.
2002-09-17 Matthias Clasen <maclas@gmx.de>
* gtk/stock-icons/stock_color_picker_25.png:
......
Thu Sep 19 16:39:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.h (GTK_SETTINGS_GET_CLASS): Fix
usage of compat GTK_TYPE_ macros without including
gtkobject.h.
* gdk/x11/gdkevents-x11.[ch]: Set a flag when initializing
to avoid having extra settings-notify events sent
when not needed.
2002-09-17 Matthias Clasen <maclas@gmx.de>
* gtk/stock-icons/stock_color_picker_25.png:
......
Thu Sep 19 16:39:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.h (GTK_SETTINGS_GET_CLASS): Fix
usage of compat GTK_TYPE_ macros without including
gtkobject.h.
* gdk/x11/gdkevents-x11.[ch]: Set a flag when initializing
to avoid having extra settings-notify events sent
when not needed.
2002-09-17 Matthias Clasen <maclas@gmx.de>
* gtk/stock-icons/stock_color_picker_25.png:
......
Thu Sep 19 16:39:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.h (GTK_SETTINGS_GET_CLASS): Fix
usage of compat GTK_TYPE_ macros without including
gtkobject.h.
* gdk/x11/gdkevents-x11.[ch]: Set a flag when initializing
to avoid having extra settings-notify events sent
when not needed.
2002-09-17 Matthias Clasen <maclas@gmx.de>
* gtk/stock-icons/stock_color_picker_25.png:
......
......@@ -146,12 +146,16 @@ void
_gdk_x11_events_init_screen (GdkScreen *screen)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
/* Keep a flag to avoid extra notifies that we don't need
*/
screen_x11->xsettings_in_init = TRUE;
screen_x11->xsettings_client = xsettings_client_new (screen_x11->xdisplay,
screen_x11->screen_num,
gdk_xsettings_notify_cb,
gdk_xsettings_watch_cb,
screen);
screen_x11->xsettings_in_init = FALSE;
}
void
......@@ -2212,8 +2216,12 @@ gdk_xsettings_notify_cb (const char *name,
{
GdkEvent new_event;
GdkScreen *screen = data;
GdkScreenX11 *screen_x11 = data;
int i;
if (screen_x11->xsettings_in_init)
return;
new_event.type = GDK_SETTING;
new_event.setting.window = gdk_screen_get_root_window (screen);
new_event.setting.send_event = FALSE;
......@@ -2226,6 +2234,7 @@ gdk_xsettings_notify_cb (const char *name,
break;
}
if (!new_event.setting.name)
return;
......
......@@ -71,6 +71,7 @@ struct _GdkScreenX11
/* X settings */
XSettingsClient *xsettings_client;
guint xsettings_in_init : 1;
/* Xinerama */
gint num_monitors;
......
......@@ -20,18 +20,16 @@
#include <gtk/gtkrc.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
G_BEGIN_DECLS
/* -- type macros --- */
#define GTK_TYPE_SETTINGS (gtk_settings_get_type ())
#define GTK_SETTINGS(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SETTINGS, GtkSettings))
#define GTK_SETTINGS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SETTINGS, GtkSettingsClass))
#define GTK_IS_SETTINGS(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SETTINGS))
#define GTK_IS_SETTINGS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SETTINGS))
#define GTK_SETTINGS_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_SETTINGS, GtkSettingsClass))
#define GTK_TYPE_SETTINGS (gtk_settings_get_type ())
#define GTK_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SETTINGS, GtkSettings))
#define GTK_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SETTINGS, GtkSettingsClass))
#define GTK_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SETTINGS))
#define GTK_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SETTINGS))
#define GTK_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SETTINGS, GtkSettingsClass))
/* --- typedefs --- */
......@@ -124,8 +122,6 @@ gboolean _gtk_settings_parse_convert (GtkRcPropertyParser parser,
GValue *dest_value);
#ifdef __cplusplus
}
#endif /* __cplusplus */
G_END_DECLS
#endif /* __GTK_SETTINGS_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment