Re: bug in gtk 1.2 still in gtk 1.3 - code example to show it



Manuel Clos <llanero jazzfree com> writes:

> Hi all,
> 
> I have many times reported that if you got the mouse just where the
> button is going to appear (gdm, nautilus-installer, ...) you won't be
> able to click the button, it is confusing and anoying.

Was it filed in the bug tracker for GTK+? [ currently bugzilla.gnome.org ]
If not, it was, for all practical purposes, not reported.

BTW - the proper place for discussion of GTK+ issues is gtk-list.
(Or gtk-devel-list if you want to suggest changes to GTK+)
 
> Here is a simple example showing it. It raises a big window with a
> button on it (set_sensitive = false). After 2 seconds, a timeout makes
> the button sensitive. If you have the mouse over the button before the
> timeout sets it sensitive, you WON'T be able to click the button, it
> will refuse to do so. Leaving the button and entering it again makes
> it work.

Errr, sensitivity a completely different issue (probably a bug,
though a very hard one to fix.) Feel free to file that one in the 
bug tracker.

I see no problems with window being mapped - as the attached variant of
your test case shows.
 
> gcc button.c `gtk-config --cflags gtk` `gtk-config --libs gtk` -o button-bug
> 
> gcc button.c `pkg-config --cflags gtk+-2.0` `pkg-config --libs
> gtk+-2.0` -o button-bug

[ Hint, add -Wall to you flags when you compile programs like this. ]

Regards,
                                        Owen

============

#include <gtk/gtk.h>

int active_button(gpointer foo)
{
	gtk_widget_set_sensitive((GtkWidget *)foo, 1);
	g_print("button activated!\n");
	return 0;
}

int main (int argc, char **argv)
{
	GtkWidget *window;
	GtkWidget *button;

	gtk_init(&argc, &argv);

	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

	gtk_widget_set_usize(window, gdk_screen_width(), gdk_screen_height());

	button = gtk_button_new_with_label("Hello!");
	
	gtk_container_add(GTK_CONTAINER (window), button);

	gtk_widget_show(button);
	gtk_widget_show(window);

	gtk_main();

	return 0;
}






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]