Details

[Home]

Issue of the Implementation # D0155

Brief

Incorrect default value of 'events' property of GtkWidget objects

Detailed Description

The default value of the property 'events' should be GDK_STRUCTURE_MASK, but it is 0.

Problem location(s) in the standard

LSB that refers http://library.gnome.org/devel/gtk/2.8/GtkWidget.html

Example

#include <gtk/gtk.h>
#include <glib.h>
#include <stdio.h>

int main (int argc, char **argv)
{
	GtkWidget *window = NULL;
	GdkEventMask get_val = -1;
	
	gtk_init(&argc, &argv);
		
	window = g_object_new(GTK_TYPE_WINDOW, NULL);
	if(window == NULL)
	{
		printf("The g_object_new function returns NULL, unable to create a GtkWidget.\n");
	}
	
	g_object_get(window, "events", &get_val, NULL);
	
	if(get_val != GDK_STRUCTURE_MASK)
	{
		printf("The default value of the property 'events' should be GDK_STRUCTURE_MASK, but it is %d.\n", get_val);
	}	

	if(window != NULL)
	{
		gtk_widget_destroy(window);
	}
	
	return 0;
}

Component

gtk+ 2.21 or early

Accepted

Gnome Bugzilla, 623927

[Home]