diff gtk/dw.c @ 39:3aa9ef0b3996

Added focus fixes and set-focus fixes on all three platforms.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 19 Oct 2001 14:16:50 +0000
parents 360bc6a5f1c9
children 88c9c7410c22
line wrap: on
line diff
--- a/gtk/dw.c	Wed Oct 17 19:22:39 2001 +0000
+++ b/gtk/dw.c	Fri Oct 19 14:16:50 2001 +0000
@@ -307,6 +307,10 @@
 void _item_select_event(GtkWidget *widget, GtkWidget *child, gpointer data)
 {
 	SignalHandler *work = (SignalHandler *)data;
+	static int _dw_recursing = 0;
+
+	if(_dw_recursing)
+		return;
 
 	if(work)
 	{
@@ -314,6 +318,8 @@
 		GList *list;
 		int item = 0;
 
+		_dw_recursing = 1;
+
 		if(GTK_IS_COMBO(work->window))
 			list = GTK_LIST(GTK_COMBO(work->window)->list)->children;
 		else if(GTK_IS_LIST(widget))
@@ -332,6 +338,7 @@
 			item++;
 			list = list->next;
 		}
+		_dw_recursing = 0;
 	}
 }
 
@@ -4873,6 +4880,8 @@
 	else if(strcmp(signame, "set-focus") == 0)
 	{
 		thisname = "focus-in-event";
+		if(GTK_IS_COMBO(thiswindow))
+			thiswindow = GTK_COMBO(thiswindow)->entry;
 	}
 	else if(GTK_IS_TREE(thiswindow) && strcmp(signame, "tree-select") == 0)
 	{