summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-02-27 02:39:28 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-02-27 02:39:28 +0000
commit46e0b468ed8a0745c4df3fbbf0ecf60cb307c148 (patch)
tree038185fc811fdd2bbb056d4ff1d8a78ce4abfc72
parenta3cf1957cb5b9621fc4a20098362f488966400ee (diff)
downloadgdk-pixbuf-46e0b468ed8a0745c4df3fbbf0ecf60cb307c148.tar.gz
We can't maintain a flag in gtk_window_focus_in/out, because GtkPlug and
Mon Feb 26 21:36:11 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.[ch] (gtk_window_focus_in/out_event): We can't maintain a flag in gtk_window_focus_in/out, because GtkPlug and cut-and-pastes of GtkPlug override these methods and don't chain up. So back out recent change adding such a flag, and instead recycle the hack GtkPlug uses of making GTK_WIDGET_HAS_FOCUS on the top level represent this information
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.pre-2-010
-rw-r--r--ChangeLog.pre-2-1010
-rw-r--r--ChangeLog.pre-2-210
-rw-r--r--ChangeLog.pre-2-410
-rw-r--r--ChangeLog.pre-2-610
-rw-r--r--ChangeLog.pre-2-810
-rw-r--r--gtk/gtkplug.c1
-rw-r--r--gtk/gtkwindow.c11
-rw-r--r--gtk/gtkwindow.h1
10 files changed, 76 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 30396f563..b6dda6286 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Mon Feb 26 21:36:11 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.[ch] (gtk_window_focus_in/out_event): We can't
+ maintain a flag in gtk_window_focus_in/out, because
+ GtkPlug and cut-and-pastes of GtkPlug override these
+ methods and don't chain up. So back out recent change
+ adding such a flag, and instead recycle the hack
+ GtkPlug uses of making GTK_WIDGET_HAS_FOCUS on the
+ top level represent this information
+
Fri Feb 23 15:06:48 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktree.c (gtk_tree_class_init): Do the setting
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 30396f563..b6dda6286 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,13 @@
+Mon Feb 26 21:36:11 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.[ch] (gtk_window_focus_in/out_event): We can't
+ maintain a flag in gtk_window_focus_in/out, because
+ GtkPlug and cut-and-pastes of GtkPlug override these
+ methods and don't chain up. So back out recent change
+ adding such a flag, and instead recycle the hack
+ GtkPlug uses of making GTK_WIDGET_HAS_FOCUS on the
+ top level represent this information
+
Fri Feb 23 15:06:48 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktree.c (gtk_tree_class_init): Do the setting
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 30396f563..b6dda6286 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,13 @@
+Mon Feb 26 21:36:11 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.[ch] (gtk_window_focus_in/out_event): We can't
+ maintain a flag in gtk_window_focus_in/out, because
+ GtkPlug and cut-and-pastes of GtkPlug override these
+ methods and don't chain up. So back out recent change
+ adding such a flag, and instead recycle the hack
+ GtkPlug uses of making GTK_WIDGET_HAS_FOCUS on the
+ top level represent this information
+
Fri Feb 23 15:06:48 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktree.c (gtk_tree_class_init): Do the setting
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 30396f563..b6dda6286 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,13 @@
+Mon Feb 26 21:36:11 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.[ch] (gtk_window_focus_in/out_event): We can't
+ maintain a flag in gtk_window_focus_in/out, because
+ GtkPlug and cut-and-pastes of GtkPlug override these
+ methods and don't chain up. So back out recent change
+ adding such a flag, and instead recycle the hack
+ GtkPlug uses of making GTK_WIDGET_HAS_FOCUS on the
+ top level represent this information
+
Fri Feb 23 15:06:48 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktree.c (gtk_tree_class_init): Do the setting
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 30396f563..b6dda6286 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,13 @@
+Mon Feb 26 21:36:11 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.[ch] (gtk_window_focus_in/out_event): We can't
+ maintain a flag in gtk_window_focus_in/out, because
+ GtkPlug and cut-and-pastes of GtkPlug override these
+ methods and don't chain up. So back out recent change
+ adding such a flag, and instead recycle the hack
+ GtkPlug uses of making GTK_WIDGET_HAS_FOCUS on the
+ top level represent this information
+
Fri Feb 23 15:06:48 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktree.c (gtk_tree_class_init): Do the setting
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 30396f563..b6dda6286 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,13 @@
+Mon Feb 26 21:36:11 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.[ch] (gtk_window_focus_in/out_event): We can't
+ maintain a flag in gtk_window_focus_in/out, because
+ GtkPlug and cut-and-pastes of GtkPlug override these
+ methods and don't chain up. So back out recent change
+ adding such a flag, and instead recycle the hack
+ GtkPlug uses of making GTK_WIDGET_HAS_FOCUS on the
+ top level represent this information
+
Fri Feb 23 15:06:48 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktree.c (gtk_tree_class_init): Do the setting
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 30396f563..b6dda6286 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,13 @@
+Mon Feb 26 21:36:11 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.[ch] (gtk_window_focus_in/out_event): We can't
+ maintain a flag in gtk_window_focus_in/out, because
+ GtkPlug and cut-and-pastes of GtkPlug override these
+ methods and don't chain up. So back out recent change
+ adding such a flag, and instead recycle the hack
+ GtkPlug uses of making GTK_WIDGET_HAS_FOCUS on the
+ top level represent this information
+
Fri Feb 23 15:06:48 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktree.c (gtk_tree_class_init): Do the setting
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 4ee45b873..c2412e23d 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -366,6 +366,7 @@ gtk_plug_focus_in_event (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (widget))
{
GTK_OBJECT_SET_FLAGS (widget, GTK_HAS_FOCUS);
+
window = GTK_WINDOW (widget);
if (window->focus_widget && !GTK_WIDGET_HAS_FOCUS (window->focus_widget))
{
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 9a600deb6..d6e29ea14 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1325,8 +1325,7 @@ gtk_window_focus_in_event (GtkWidget *widget,
*/
if (GTK_WIDGET_VISIBLE (widget))
{
- window->window_has_focus = TRUE;
-
+ GTK_OBJECT_SET_FLAGS (widget, GTK_HAS_FOCUS);
window = GTK_WINDOW (widget);
if (window->focus_widget &&
window->focus_widget != widget &&
@@ -1356,8 +1355,8 @@ gtk_window_focus_out_event (GtkWidget *widget,
window = GTK_WINDOW (widget);
- window->window_has_focus = FALSE;
-
+ GTK_OBJECT_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
+
if (window->focus_widget &&
window->focus_widget != widget &&
GTK_WIDGET_HAS_FOCUS (window->focus_widget))
@@ -1473,7 +1472,7 @@ gtk_window_real_set_focus (GtkWindow *window,
GTK_WIDGET_SET_FLAGS (window->default_widget, GTK_HAS_DEFAULT);
}
- if (window->window_has_focus)
+ if (GTK_WIDGET_HAS_FOCUS (window))
{
event.type = GDK_FOCUS_CHANGE;
event.window = window->focus_widget->window;
@@ -1497,7 +1496,7 @@ gtk_window_real_set_focus (GtkWindow *window,
GTK_WIDGET_UNSET_FLAGS (window->default_widget, GTK_HAS_DEFAULT);
}
- if (window->window_has_focus)
+ if (GTK_WIDGET_HAS_FOCUS (window))
{
event.type = GDK_FOCUS_CHANGE;
event.window = window->focus_widget->window;
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index dfdadcf16..53d22948a 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -77,7 +77,6 @@ struct _GtkWindow
*/
guint use_uposition : 1;
guint modal : 1;
- guint window_has_focus : 1;
};
struct _GtkWindowClass