]> Pileus Git - ~andy/gtk/commitdiff
Undo an accidental revert of fixes of May 16. (Caught by Padraig O'Briain)
authorOwen Taylor <otaylor@redhat.com>
Mon, 20 May 2002 15:51:46 +0000 (15:51 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 20 May 2002 15:51:46 +0000 (15:51 +0000)
Mon May 20 11:47:59 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkplug.c: Undo an accidental revert of
        fixes of May 16. (Caught by Padraig O'Briain)

        * gtk/gtkctree.c (cell_size_request): Fix bug where
        size request for text cells was being overwritten.
        (#82264, Graham Swallow.)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkctree.c
gtk/gtkplug.c

index 2516156ebb7a31678ab01dc29fe9caf494c7b89b..aa12f36918996038394d4da64f59de913318f09f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Mon May 20 11:47:59 2002  Owen Taylor  <otaylor@redhat.com>
+       * gtk/gtkplug.c: Undo an accidental revert of
+       fixes of May 16. (Caught by Padraig O'Briain)
+       * gtk/gtkctree.c (cell_size_request): Fix bug where
+       size request for text cells was being overwritten.
+       (#82264, Graham Swallow.)
+
 2002-05-18  Matthias Clasen  <maclas@gmx.de>
 
        * configure.in: Check for endianness. Sorry about REBUILD_PNGS...
index 2516156ebb7a31678ab01dc29fe9caf494c7b89b..aa12f36918996038394d4da64f59de913318f09f 100644 (file)
@@ -1,3 +1,12 @@
+Mon May 20 11:47:59 2002  Owen Taylor  <otaylor@redhat.com>
+       * gtk/gtkplug.c: Undo an accidental revert of
+       fixes of May 16. (Caught by Padraig O'Briain)
+       * gtk/gtkctree.c (cell_size_request): Fix bug where
+       size request for text cells was being overwritten.
+       (#82264, Graham Swallow.)
+
 2002-05-18  Matthias Clasen  <maclas@gmx.de>
 
        * configure.in: Check for endianness. Sorry about REBUILD_PNGS...
index 2516156ebb7a31678ab01dc29fe9caf494c7b89b..aa12f36918996038394d4da64f59de913318f09f 100644 (file)
@@ -1,3 +1,12 @@
+Mon May 20 11:47:59 2002  Owen Taylor  <otaylor@redhat.com>
+       * gtk/gtkplug.c: Undo an accidental revert of
+       fixes of May 16. (Caught by Padraig O'Briain)
+       * gtk/gtkctree.c (cell_size_request): Fix bug where
+       size request for text cells was being overwritten.
+       (#82264, Graham Swallow.)
+
 2002-05-18  Matthias Clasen  <maclas@gmx.de>
 
        * configure.in: Check for endianness. Sorry about REBUILD_PNGS...
index 2516156ebb7a31678ab01dc29fe9caf494c7b89b..aa12f36918996038394d4da64f59de913318f09f 100644 (file)
@@ -1,3 +1,12 @@
+Mon May 20 11:47:59 2002  Owen Taylor  <otaylor@redhat.com>
+       * gtk/gtkplug.c: Undo an accidental revert of
+       fixes of May 16. (Caught by Padraig O'Briain)
+       * gtk/gtkctree.c (cell_size_request): Fix bug where
+       size request for text cells was being overwritten.
+       (#82264, Graham Swallow.)
+
 2002-05-18  Matthias Clasen  <maclas@gmx.de>
 
        * configure.in: Check for endianness. Sorry about REBUILD_PNGS...
index 2516156ebb7a31678ab01dc29fe9caf494c7b89b..aa12f36918996038394d4da64f59de913318f09f 100644 (file)
@@ -1,3 +1,12 @@
+Mon May 20 11:47:59 2002  Owen Taylor  <otaylor@redhat.com>
+       * gtk/gtkplug.c: Undo an accidental revert of
+       fixes of May 16. (Caught by Padraig O'Briain)
+       * gtk/gtkctree.c (cell_size_request): Fix bug where
+       size request for text cells was being overwritten.
+       (#82264, Graham Swallow.)
+
 2002-05-18  Matthias Clasen  <maclas@gmx.de>
 
        * configure.in: Check for endianness. Sorry about REBUILD_PNGS...
index 2516156ebb7a31678ab01dc29fe9caf494c7b89b..aa12f36918996038394d4da64f59de913318f09f 100644 (file)
@@ -1,3 +1,12 @@
+Mon May 20 11:47:59 2002  Owen Taylor  <otaylor@redhat.com>
+       * gtk/gtkplug.c: Undo an accidental revert of
+       fixes of May 16. (Caught by Padraig O'Briain)
+       * gtk/gtkctree.c (cell_size_request): Fix bug where
+       size request for text cells was being overwritten.
+       (#82264, Graham Swallow.)
+
 2002-05-18  Matthias Clasen  <maclas@gmx.de>
 
        * configure.in: Check for endianness. Sorry about REBUILD_PNGS...
index ef034c662b703c8fa7f4b8fac686f07b51f0f7ab..787dce207c451e1f97a69fe5a88ca00f5cebdba5 100644 (file)
@@ -2905,8 +2905,6 @@ cell_size_request (GtkCList       *clist,
       requisition->height = MAX (requisition->height, height);
       break;
     default:
-      requisition->width  = 0;
-      requisition->height = 0;
       break;
     }
 
index 5d076a4acbb0554150029ec081d261e3b300b875..c74c7c47148c79278113f284bb2845909e100e05 100644 (file)
@@ -48,6 +48,8 @@ static void            gtk_plug_size_allocate         (GtkWidget        *widget,
                                                       GtkAllocation    *allocation);
 static gboolean        gtk_plug_key_press_event       (GtkWidget        *widget,
                                                       GdkEventKey      *event);
+static gboolean        gtk_plug_focus_event           (GtkWidget        *widget,
+                                                      GdkEventFocus    *event);
 static void            gtk_plug_set_focus             (GtkWindow        *window,
                                                       GtkWidget        *focus);
 static gboolean        gtk_plug_focus                 (GtkWidget        *widget,
@@ -123,6 +125,8 @@ gtk_plug_class_init (GtkPlugClass *class)
   widget_class->realize = gtk_plug_realize;
   widget_class->unrealize = gtk_plug_unrealize;
   widget_class->key_press_event = gtk_plug_key_press_event;
+  widget_class->focus_in_event = gtk_plug_focus_event;
+  widget_class->focus_out_event = gtk_plug_focus_event;
 
   widget_class->show = gtk_plug_show;
   widget_class->hide = gtk_plug_hide;
@@ -655,6 +659,17 @@ gtk_plug_key_press_event (GtkWidget   *widget,
     return FALSE;
 }
 
+static gboolean
+gtk_plug_focus_event (GtkWidget      *widget,
+                     GdkEventFocus  *event)
+{
+  /* We eat focus-in events and focus-out events, since they
+   * can be generated by something like a keyboard grab on
+   * a child of the plug.
+   */
+  return FALSE;
+}
+
 static void
 gtk_plug_set_focus (GtkWindow *window,
                    GtkWidget *focus)
@@ -1000,15 +1015,24 @@ handle_xembed_message (GtkPlug   *plug,
       
     case XEMBED_FOCUS_OUT:
       {
+       GtkWidget *widget = GTK_WIDGET (plug);
        GdkEvent event;
 
        event.focus_change.type = GDK_FOCUS_CHANGE;
-       event.focus_change.window = GTK_WIDGET (plug)->window;
+       event.focus_change.window = widget->window;
        event.focus_change.send_event = TRUE;
-       event.focus_change.in = (message == XEMBED_FOCUS_IN);
-
-       gtk_widget_event (GTK_WIDGET (plug), &event);
 
+       if (message == XEMBED_FOCUS_IN)
+         {
+           event.focus_change.in = TRUE;
+           GTK_WIDGET_CLASS (parent_class)->focus_in_event (widget, (GdkEventFocus *)&event);
+         }
+       else
+         {
+           event.focus_change.in = FALSE;
+           GTK_WIDGET_CLASS (parent_class)->focus_out_event (widget, (GdkEventFocus *)&event);
+         }
+       
        break;
       }