Commit ca26902c authored by Tim Janik's avatar Tim Janik Committed by Tim Janik
Browse files

default initialize the generated ENTER_NOTIFY event with 0, otherwise not

Sat Feb 17 06:47:27 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkmenu.c (gtk_menu_motion_notify): default initialize the
        generated ENTER_NOTIFY event with 0, otherwise not explicitely
        setup fields contain garbage (e.g. subwindow, breaking
        gdk_drawable_ref() upon event copy).
        (gtk_menu_stop_navigating_submenu_cb): same here.

        * gtk/gtklist.c (gtk_list_vertical_timeout):
        * gtk/gtklist.c (gtk_list_horizontal_timeout):
        * gtk/gtkclist.c (vertical_timeout):
        * gtk/gtkclist.c (horizontal_timeout): change direct assignment
        default-zero-intialization for unions to memset(,0,), as unions are
        not fully default-zero-initialized by compilers (GdkEvent x = { 0, };
        has to become GdkEvent x; memset (&x, 0, sizeof (x)); )

        * gtk/gtktreeview.c (gtk_tree_view_set_rows_drag_source): scratch
        g_closure_sink() warning.

        * gtk/gtktreemodel.c (gtk_tree_model_get_valist):
        * gtk/gtktreestore.c (gtk_tree_store_set_valist):
        * gtk/gtkliststore.c (gtk_list_store_set_valist):
        fix G_VALUE_COLLECT() and G_VALUE_LCOPY() calls.
parent b10825d5
Sat Feb 17 06:47:27 2001 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c (gtk_menu_motion_notify): default initialize the
generated ENTER_NOTIFY event with 0, otherwise not explicitely
setup fields contain garbage (e.g. subwindow, breaking
gdk_drawable_ref() upon event copy).
(gtk_menu_stop_navigating_submenu_cb): same here.
* gtk/gtklist.c (gtk_list_vertical_timeout):
* gtk/gtklist.c (gtk_list_horizontal_timeout):
* gtk/gtkclist.c (vertical_timeout):
* gtk/gtkclist.c (horizontal_timeout): change direct assignment
default-zero-intialization for unions to memset(,0,), as unions are
not fully default-zero-initialized by compilers (GdkEvent x = { 0, };
has to become GdkEvent x; memset (&x, 0, sizeof (x)); )
* gtk/gtktreeview.c (gtk_tree_view_set_rows_drag_source): scratch
g_closure_sink() warning.
* gtk/gtktreemodel.c (gtk_tree_model_get_valist):
* gtk/gtktreestore.c (gtk_tree_store_set_valist):
* gtk/gtkliststore.c (gtk_list_store_set_valist):
fix G_VALUE_COLLECT() and G_VALUE_LCOPY() calls.
Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com> Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed * gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed
......
Sat Feb 17 06:47:27 2001 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c (gtk_menu_motion_notify): default initialize the
generated ENTER_NOTIFY event with 0, otherwise not explicitely
setup fields contain garbage (e.g. subwindow, breaking
gdk_drawable_ref() upon event copy).
(gtk_menu_stop_navigating_submenu_cb): same here.
* gtk/gtklist.c (gtk_list_vertical_timeout):
* gtk/gtklist.c (gtk_list_horizontal_timeout):
* gtk/gtkclist.c (vertical_timeout):
* gtk/gtkclist.c (horizontal_timeout): change direct assignment
default-zero-intialization for unions to memset(,0,), as unions are
not fully default-zero-initialized by compilers (GdkEvent x = { 0, };
has to become GdkEvent x; memset (&x, 0, sizeof (x)); )
* gtk/gtktreeview.c (gtk_tree_view_set_rows_drag_source): scratch
g_closure_sink() warning.
* gtk/gtktreemodel.c (gtk_tree_model_get_valist):
* gtk/gtktreestore.c (gtk_tree_store_set_valist):
* gtk/gtkliststore.c (gtk_list_store_set_valist):
fix G_VALUE_COLLECT() and G_VALUE_LCOPY() calls.
Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com> Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed * gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed
......
Sat Feb 17 06:47:27 2001 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c (gtk_menu_motion_notify): default initialize the
generated ENTER_NOTIFY event with 0, otherwise not explicitely
setup fields contain garbage (e.g. subwindow, breaking
gdk_drawable_ref() upon event copy).
(gtk_menu_stop_navigating_submenu_cb): same here.
* gtk/gtklist.c (gtk_list_vertical_timeout):
* gtk/gtklist.c (gtk_list_horizontal_timeout):
* gtk/gtkclist.c (vertical_timeout):
* gtk/gtkclist.c (horizontal_timeout): change direct assignment
default-zero-intialization for unions to memset(,0,), as unions are
not fully default-zero-initialized by compilers (GdkEvent x = { 0, };
has to become GdkEvent x; memset (&x, 0, sizeof (x)); )
* gtk/gtktreeview.c (gtk_tree_view_set_rows_drag_source): scratch
g_closure_sink() warning.
* gtk/gtktreemodel.c (gtk_tree_model_get_valist):
* gtk/gtktreestore.c (gtk_tree_store_set_valist):
* gtk/gtkliststore.c (gtk_list_store_set_valist):
fix G_VALUE_COLLECT() and G_VALUE_LCOPY() calls.
Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com> Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed * gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed
......
Sat Feb 17 06:47:27 2001 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c (gtk_menu_motion_notify): default initialize the
generated ENTER_NOTIFY event with 0, otherwise not explicitely
setup fields contain garbage (e.g. subwindow, breaking
gdk_drawable_ref() upon event copy).
(gtk_menu_stop_navigating_submenu_cb): same here.
* gtk/gtklist.c (gtk_list_vertical_timeout):
* gtk/gtklist.c (gtk_list_horizontal_timeout):
* gtk/gtkclist.c (vertical_timeout):
* gtk/gtkclist.c (horizontal_timeout): change direct assignment
default-zero-intialization for unions to memset(,0,), as unions are
not fully default-zero-initialized by compilers (GdkEvent x = { 0, };
has to become GdkEvent x; memset (&x, 0, sizeof (x)); )
* gtk/gtktreeview.c (gtk_tree_view_set_rows_drag_source): scratch
g_closure_sink() warning.
* gtk/gtktreemodel.c (gtk_tree_model_get_valist):
* gtk/gtktreestore.c (gtk_tree_store_set_valist):
* gtk/gtkliststore.c (gtk_list_store_set_valist):
fix G_VALUE_COLLECT() and G_VALUE_LCOPY() calls.
Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com> Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed * gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed
......
Sat Feb 17 06:47:27 2001 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c (gtk_menu_motion_notify): default initialize the
generated ENTER_NOTIFY event with 0, otherwise not explicitely
setup fields contain garbage (e.g. subwindow, breaking
gdk_drawable_ref() upon event copy).
(gtk_menu_stop_navigating_submenu_cb): same here.
* gtk/gtklist.c (gtk_list_vertical_timeout):
* gtk/gtklist.c (gtk_list_horizontal_timeout):
* gtk/gtkclist.c (vertical_timeout):
* gtk/gtkclist.c (horizontal_timeout): change direct assignment
default-zero-intialization for unions to memset(,0,), as unions are
not fully default-zero-initialized by compilers (GdkEvent x = { 0, };
has to become GdkEvent x; memset (&x, 0, sizeof (x)); )
* gtk/gtktreeview.c (gtk_tree_view_set_rows_drag_source): scratch
g_closure_sink() warning.
* gtk/gtktreemodel.c (gtk_tree_model_get_valist):
* gtk/gtktreestore.c (gtk_tree_store_set_valist):
* gtk/gtkliststore.c (gtk_list_store_set_valist):
fix G_VALUE_COLLECT() and G_VALUE_LCOPY() calls.
Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com> Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed * gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed
......
Sat Feb 17 06:47:27 2001 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c (gtk_menu_motion_notify): default initialize the
generated ENTER_NOTIFY event with 0, otherwise not explicitely
setup fields contain garbage (e.g. subwindow, breaking
gdk_drawable_ref() upon event copy).
(gtk_menu_stop_navigating_submenu_cb): same here.
* gtk/gtklist.c (gtk_list_vertical_timeout):
* gtk/gtklist.c (gtk_list_horizontal_timeout):
* gtk/gtkclist.c (vertical_timeout):
* gtk/gtkclist.c (horizontal_timeout): change direct assignment
default-zero-intialization for unions to memset(,0,), as unions are
not fully default-zero-initialized by compilers (GdkEvent x = { 0, };
has to become GdkEvent x; memset (&x, 0, sizeof (x)); )
* gtk/gtktreeview.c (gtk_tree_view_set_rows_drag_source): scratch
g_closure_sink() warning.
* gtk/gtktreemodel.c (gtk_tree_model_get_valist):
* gtk/gtktreestore.c (gtk_tree_store_set_valist):
* gtk/gtkliststore.c (gtk_list_store_set_valist):
fix G_VALUE_COLLECT() and G_VALUE_LCOPY() calls.
Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com> Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed * gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed
......
Sat Feb 17 06:47:27 2001 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c (gtk_menu_motion_notify): default initialize the
generated ENTER_NOTIFY event with 0, otherwise not explicitely
setup fields contain garbage (e.g. subwindow, breaking
gdk_drawable_ref() upon event copy).
(gtk_menu_stop_navigating_submenu_cb): same here.
* gtk/gtklist.c (gtk_list_vertical_timeout):
* gtk/gtklist.c (gtk_list_horizontal_timeout):
* gtk/gtkclist.c (vertical_timeout):
* gtk/gtkclist.c (horizontal_timeout): change direct assignment
default-zero-intialization for unions to memset(,0,), as unions are
not fully default-zero-initialized by compilers (GdkEvent x = { 0, };
has to become GdkEvent x; memset (&x, 0, sizeof (x)); )
* gtk/gtktreeview.c (gtk_tree_view_set_rows_drag_source): scratch
g_closure_sink() warning.
* gtk/gtktreemodel.c (gtk_tree_model_get_valist):
* gtk/gtktreestore.c (gtk_tree_store_set_valist):
* gtk/gtkliststore.c (gtk_list_store_set_valist):
fix G_VALUE_COLLECT() and G_VALUE_LCOPY() calls.
Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com> Fri Feb 16 17:49:59 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed * gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed
......
...@@ -7119,7 +7119,9 @@ move_vertical (GtkCList *clist, ...@@ -7119,7 +7119,9 @@ move_vertical (GtkCList *clist,
static gint static gint
horizontal_timeout (GtkCList *clist) horizontal_timeout (GtkCList *clist)
{ {
GdkEventMotion event = { 0 }; GdkEventMotion event;
memset (&event, 0, sizeof (event));
GDK_THREADS_ENTER (); GDK_THREADS_ENTER ();
...@@ -7138,7 +7140,9 @@ horizontal_timeout (GtkCList *clist) ...@@ -7138,7 +7140,9 @@ horizontal_timeout (GtkCList *clist)
static gint static gint
vertical_timeout (GtkCList *clist) vertical_timeout (GtkCList *clist)
{ {
GdkEventMotion event = { 0 }; GdkEventMotion event;
memset (&event, 0, sizeof (event));
GDK_THREADS_ENTER (); GDK_THREADS_ENTER ();
......
...@@ -2431,7 +2431,9 @@ gtk_list_move_focus_child (GtkList *list, ...@@ -2431,7 +2431,9 @@ gtk_list_move_focus_child (GtkList *list,
static gint static gint
gtk_list_horizontal_timeout (GtkWidget *list) gtk_list_horizontal_timeout (GtkWidget *list)
{ {
GdkEventMotion event = { 0 }; GdkEventMotion event;
memset (&event, 0, sizeof (event));
GDK_THREADS_ENTER (); GDK_THREADS_ENTER ();
...@@ -2450,7 +2452,9 @@ gtk_list_horizontal_timeout (GtkWidget *list) ...@@ -2450,7 +2452,9 @@ gtk_list_horizontal_timeout (GtkWidget *list)
static gint static gint
gtk_list_vertical_timeout (GtkWidget *list) gtk_list_vertical_timeout (GtkWidget *list)
{ {
GdkEventMotion event = { 0 }; GdkEventMotion event;
memset (&event, 0, sizeof (event));
GDK_THREADS_ENTER (); GDK_THREADS_ENTER ();
......
...@@ -651,7 +651,7 @@ gtk_list_store_set_valist (GtkListStore *list_store, ...@@ -651,7 +651,7 @@ gtk_list_store_set_valist (GtkListStore *list_store,
} }
g_value_init (&value, list_store->column_headers[column]); g_value_init (&value, list_store->column_headers[column]);
G_VALUE_COLLECT (&value, var_args, &error); G_VALUE_COLLECT (&value, var_args, 0, &error);
if (error) if (error)
{ {
g_warning ("%s: %s", G_STRLOC, error); g_warning ("%s: %s", G_STRLOC, error);
......
...@@ -1372,7 +1372,6 @@ gtk_menu_expose (GtkWidget *widget, ...@@ -1372,7 +1372,6 @@ gtk_menu_expose (GtkWidget *widget,
{ {
GtkMenuShell *menu_shell; GtkMenuShell *menu_shell;
GtkWidget *child; GtkWidget *child;
GdkEventExpose child_event;
GList *children; GList *children;
GtkMenu *menu; GtkMenu *menu;
...@@ -1385,9 +1384,9 @@ gtk_menu_expose (GtkWidget *widget, ...@@ -1385,9 +1384,9 @@ gtk_menu_expose (GtkWidget *widget,
if (GTK_WIDGET_DRAWABLE (widget)) if (GTK_WIDGET_DRAWABLE (widget))
{ {
gtk_menu_paint (widget); GdkEventExpose child_event = *event;
child_event = *event; gtk_menu_paint (widget);
children = menu_shell->children; children = menu_shell->children;
while (children) while (children)
...@@ -1544,7 +1543,8 @@ gtk_menu_motion_notify (GtkWidget *widget, ...@@ -1544,7 +1543,8 @@ gtk_menu_motion_notify (GtkWidget *widget,
event->y >= 0 && event->y < height) event->y >= 0 && event->y < height)
{ {
GdkEvent send_event; GdkEvent send_event;
memset (&send_event, 0, sizeof (send_event));
send_event.crossing.type = GDK_ENTER_NOTIFY; send_event.crossing.type = GDK_ENTER_NOTIFY;
send_event.crossing.window = event->window; send_event.crossing.window = event->window;
send_event.crossing.time = event->time; send_event.crossing.time = event->time;
...@@ -1790,8 +1790,6 @@ gtk_menu_stop_navigating_submenu (GtkMenu *menu) ...@@ -1790,8 +1790,6 @@ gtk_menu_stop_navigating_submenu (GtkMenu *menu)
static gboolean static gboolean
gtk_menu_stop_navigating_submenu_cb (gpointer user_data) gtk_menu_stop_navigating_submenu_cb (gpointer user_data)
{ {
GdkEventCrossing send_event;
GtkMenu *menu = user_data; GtkMenu *menu = user_data;
GdkWindow *child_window; GdkWindow *child_window;
...@@ -1803,6 +1801,9 @@ gtk_menu_stop_navigating_submenu_cb (gpointer user_data) ...@@ -1803,6 +1801,9 @@ gtk_menu_stop_navigating_submenu_cb (gpointer user_data)
if (child_window) if (child_window)
{ {
GdkEventCrossing send_event;
memset (&send_event, 0, sizeof (send_event));
send_event.window = child_window; send_event.window = child_window;
send_event.type = GDK_ENTER_NOTIFY; send_event.type = GDK_ENTER_NOTIFY;
send_event.time = GDK_CURRENT_TIME; /* Bogus */ send_event.time = GDK_CURRENT_TIME; /* Bogus */
......
...@@ -179,10 +179,11 @@ gtk_arg_proxy_set_property (GObject *object, ...@@ -179,10 +179,11 @@ gtk_arg_proxy_set_property (GObject *object,
const gchar *trailer) const gchar *trailer)
{ {
GtkObjectClass *class = g_type_class_peek (pspec->owner_type); GtkObjectClass *class = g_type_class_peek (pspec->owner_type);
GtkArg arg = { 0, }; GtkArg arg;
g_return_if_fail (class->set_arg != NULL); g_return_if_fail (class->set_arg != NULL);
memset (&arg, 0, sizeof (arg));
arg.type = G_VALUE_TYPE (value); arg.type = G_VALUE_TYPE (value);
gtk_arg_set_from_value (&arg, value, FALSE); gtk_arg_set_from_value (&arg, value, FALSE);
arg.name = pspec->name; arg.name = pspec->name;
...@@ -197,10 +198,11 @@ gtk_arg_proxy_get_property (GObject *object, ...@@ -197,10 +198,11 @@ gtk_arg_proxy_get_property (GObject *object,
const gchar *trailer) const gchar *trailer)
{ {
GtkObjectClass *class = g_type_class_peek (pspec->owner_type); GtkObjectClass *class = g_type_class_peek (pspec->owner_type);
GtkArg arg = { 0, }; GtkArg arg;
g_return_if_fail (class->get_arg != NULL); g_return_if_fail (class->get_arg != NULL);
memset (&arg, 0, sizeof (arg));
arg.type = G_VALUE_TYPE (value); arg.type = G_VALUE_TYPE (value);
arg.name = pspec->name; arg.name = pspec->name;
class->get_arg (GTK_OBJECT (object), &arg, property_id); class->get_arg (GTK_OBJECT (object), &arg, property_id);
......
...@@ -1199,7 +1199,7 @@ gtk_tree_model_get_valist (GtkTreeModel *tree_model, ...@@ -1199,7 +1199,7 @@ gtk_tree_model_get_valist (GtkTreeModel *tree_model,
gtk_tree_model_get_value (GTK_TREE_MODEL (tree_model), iter, column, &value); gtk_tree_model_get_value (GTK_TREE_MODEL (tree_model), iter, column, &value);
G_VALUE_LCOPY (&value, var_args, &error); G_VALUE_LCOPY (&value, var_args, 0, &error);
if (error) if (error)
{ {
g_warning ("%s: %s", G_STRLOC, error); g_warning ("%s: %s", G_STRLOC, error);
......
...@@ -659,7 +659,7 @@ gtk_tree_store_set_valist (GtkTreeStore *tree_store, ...@@ -659,7 +659,7 @@ gtk_tree_store_set_valist (GtkTreeStore *tree_store,
} }
g_value_init (&value, tree_store->column_headers[column]); g_value_init (&value, tree_store->column_headers[column]);
G_VALUE_COLLECT (&value, var_args, &error); G_VALUE_COLLECT (&value, var_args, 0, &error);
if (error) if (error)
{ {
g_warning ("%s: %s", G_STRLOC, error); g_warning ("%s: %s", G_STRLOC, error);
......
...@@ -5202,11 +5202,6 @@ remove_scroll_timeout (GtkTreeView *tree_view) ...@@ -5202,11 +5202,6 @@ remove_scroll_timeout (GtkTreeView *tree_view)
} }
} }
#ifdef __GNUC__
#warning "implement g_closure_sink"
#endif
#define g_closure_sink(c)
void void
gtk_tree_view_set_rows_drag_source (GtkTreeView *tree_view, gtk_tree_view_set_rows_drag_source (GtkTreeView *tree_view,
GdkModifierType start_button_mask, GdkModifierType start_button_mask,
......
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