]> Pileus Git - ~andy/gtk/commitdiff
Test for window == NULL in a number of cases.
authorOwen Taylor <otaylor@redhat.com>
Wed, 25 Apr 2001 16:17:46 +0000 (16:17 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 25 Apr 2001 16:17:46 +0000 (16:17 +0000)
Wed Apr 25 12:16:36 2001  Owen Taylor  <otaylor@redhat.com>

* gdk/X11/gdkevents-x11.c (gdk_event_translate): Test for
window == NULL in a number of cases.

* tests/testdnd.c: Set module path for gdk-pixbuf.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/x11/gdkevents-x11.c
tests/testdnd.c

index c323b48a74914c2d6a3c6d50269ff63e2a6464e3..624238df19a2b96e76595aaa88bd8ff837ce707a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+Wed Apr 25 12:16:36 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/X11/gdkevents-x11.c (gdk_event_translate): Test for 
+       window == NULL in a number of cases.
+
+       * tests/testdnd.c: Set module path for gdk-pixbuf.
+
+Thu Apr 19 16:11:07 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am xembed.h: File containing #defines
+       for XEMBED protocol.
+
+       * gtk/gtkplug.[ch] gtk/gtksocket.[ch]: 
+
+       - Change protocol from old plug/socket specific protocol
+         to XEMBED draft
+       - Various fixes to work with GTK+-2.0
+
+       Still quite a bit of work to do here to handle initiation
+       from the socket side (as specified by XEMBED), to handle
+       the more advanced features of XEMBED, and to figure out
+       a good way to handle same-app embedding with less overhead
+       than using full XEMBED.
+
+Wed Apr 18 16:04:28 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.[ch] (gtk_window_real_set_focus): Keep
+       track of whether the toplevel has the focus; only send
+       focus-in events to the focus widget when the window
+       actually has the focus.
+
 2001-04-25  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtkwindow.h: set_decorations_hint and set_functions_hint
index c323b48a74914c2d6a3c6d50269ff63e2a6464e3..624238df19a2b96e76595aaa88bd8ff837ce707a 100644 (file)
@@ -1,3 +1,34 @@
+Wed Apr 25 12:16:36 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/X11/gdkevents-x11.c (gdk_event_translate): Test for 
+       window == NULL in a number of cases.
+
+       * tests/testdnd.c: Set module path for gdk-pixbuf.
+
+Thu Apr 19 16:11:07 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am xembed.h: File containing #defines
+       for XEMBED protocol.
+
+       * gtk/gtkplug.[ch] gtk/gtksocket.[ch]: 
+
+       - Change protocol from old plug/socket specific protocol
+         to XEMBED draft
+       - Various fixes to work with GTK+-2.0
+
+       Still quite a bit of work to do here to handle initiation
+       from the socket side (as specified by XEMBED), to handle
+       the more advanced features of XEMBED, and to figure out
+       a good way to handle same-app embedding with less overhead
+       than using full XEMBED.
+
+Wed Apr 18 16:04:28 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.[ch] (gtk_window_real_set_focus): Keep
+       track of whether the toplevel has the focus; only send
+       focus-in events to the focus widget when the window
+       actually has the focus.
+
 2001-04-25  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtkwindow.h: set_decorations_hint and set_functions_hint
index c323b48a74914c2d6a3c6d50269ff63e2a6464e3..624238df19a2b96e76595aaa88bd8ff837ce707a 100644 (file)
@@ -1,3 +1,34 @@
+Wed Apr 25 12:16:36 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/X11/gdkevents-x11.c (gdk_event_translate): Test for 
+       window == NULL in a number of cases.
+
+       * tests/testdnd.c: Set module path for gdk-pixbuf.
+
+Thu Apr 19 16:11:07 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am xembed.h: File containing #defines
+       for XEMBED protocol.
+
+       * gtk/gtkplug.[ch] gtk/gtksocket.[ch]: 
+
+       - Change protocol from old plug/socket specific protocol
+         to XEMBED draft
+       - Various fixes to work with GTK+-2.0
+
+       Still quite a bit of work to do here to handle initiation
+       from the socket side (as specified by XEMBED), to handle
+       the more advanced features of XEMBED, and to figure out
+       a good way to handle same-app embedding with less overhead
+       than using full XEMBED.
+
+Wed Apr 18 16:04:28 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.[ch] (gtk_window_real_set_focus): Keep
+       track of whether the toplevel has the focus; only send
+       focus-in events to the focus widget when the window
+       actually has the focus.
+
 2001-04-25  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtkwindow.h: set_decorations_hint and set_functions_hint
index c323b48a74914c2d6a3c6d50269ff63e2a6464e3..624238df19a2b96e76595aaa88bd8ff837ce707a 100644 (file)
@@ -1,3 +1,34 @@
+Wed Apr 25 12:16:36 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/X11/gdkevents-x11.c (gdk_event_translate): Test for 
+       window == NULL in a number of cases.
+
+       * tests/testdnd.c: Set module path for gdk-pixbuf.
+
+Thu Apr 19 16:11:07 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am xembed.h: File containing #defines
+       for XEMBED protocol.
+
+       * gtk/gtkplug.[ch] gtk/gtksocket.[ch]: 
+
+       - Change protocol from old plug/socket specific protocol
+         to XEMBED draft
+       - Various fixes to work with GTK+-2.0
+
+       Still quite a bit of work to do here to handle initiation
+       from the socket side (as specified by XEMBED), to handle
+       the more advanced features of XEMBED, and to figure out
+       a good way to handle same-app embedding with less overhead
+       than using full XEMBED.
+
+Wed Apr 18 16:04:28 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.[ch] (gtk_window_real_set_focus): Keep
+       track of whether the toplevel has the focus; only send
+       focus-in events to the focus widget when the window
+       actually has the focus.
+
 2001-04-25  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtkwindow.h: set_decorations_hint and set_functions_hint
index c323b48a74914c2d6a3c6d50269ff63e2a6464e3..624238df19a2b96e76595aaa88bd8ff837ce707a 100644 (file)
@@ -1,3 +1,34 @@
+Wed Apr 25 12:16:36 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/X11/gdkevents-x11.c (gdk_event_translate): Test for 
+       window == NULL in a number of cases.
+
+       * tests/testdnd.c: Set module path for gdk-pixbuf.
+
+Thu Apr 19 16:11:07 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am xembed.h: File containing #defines
+       for XEMBED protocol.
+
+       * gtk/gtkplug.[ch] gtk/gtksocket.[ch]: 
+
+       - Change protocol from old plug/socket specific protocol
+         to XEMBED draft
+       - Various fixes to work with GTK+-2.0
+
+       Still quite a bit of work to do here to handle initiation
+       from the socket side (as specified by XEMBED), to handle
+       the more advanced features of XEMBED, and to figure out
+       a good way to handle same-app embedding with less overhead
+       than using full XEMBED.
+
+Wed Apr 18 16:04:28 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.[ch] (gtk_window_real_set_focus): Keep
+       track of whether the toplevel has the focus; only send
+       focus-in events to the focus widget when the window
+       actually has the focus.
+
 2001-04-25  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtkwindow.h: set_decorations_hint and set_functions_hint
index c323b48a74914c2d6a3c6d50269ff63e2a6464e3..624238df19a2b96e76595aaa88bd8ff837ce707a 100644 (file)
@@ -1,3 +1,34 @@
+Wed Apr 25 12:16:36 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/X11/gdkevents-x11.c (gdk_event_translate): Test for 
+       window == NULL in a number of cases.
+
+       * tests/testdnd.c: Set module path for gdk-pixbuf.
+
+Thu Apr 19 16:11:07 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am xembed.h: File containing #defines
+       for XEMBED protocol.
+
+       * gtk/gtkplug.[ch] gtk/gtksocket.[ch]: 
+
+       - Change protocol from old plug/socket specific protocol
+         to XEMBED draft
+       - Various fixes to work with GTK+-2.0
+
+       Still quite a bit of work to do here to handle initiation
+       from the socket side (as specified by XEMBED), to handle
+       the more advanced features of XEMBED, and to figure out
+       a good way to handle same-app embedding with less overhead
+       than using full XEMBED.
+
+Wed Apr 18 16:04:28 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.[ch] (gtk_window_real_set_focus): Keep
+       track of whether the toplevel has the focus; only send
+       focus-in events to the focus widget when the window
+       actually has the focus.
+
 2001-04-25  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtkwindow.h: set_decorations_hint and set_functions_hint
index c323b48a74914c2d6a3c6d50269ff63e2a6464e3..624238df19a2b96e76595aaa88bd8ff837ce707a 100644 (file)
@@ -1,3 +1,34 @@
+Wed Apr 25 12:16:36 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/X11/gdkevents-x11.c (gdk_event_translate): Test for 
+       window == NULL in a number of cases.
+
+       * tests/testdnd.c: Set module path for gdk-pixbuf.
+
+Thu Apr 19 16:11:07 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/Makefile.am xembed.h: File containing #defines
+       for XEMBED protocol.
+
+       * gtk/gtkplug.[ch] gtk/gtksocket.[ch]: 
+
+       - Change protocol from old plug/socket specific protocol
+         to XEMBED draft
+       - Various fixes to work with GTK+-2.0
+
+       Still quite a bit of work to do here to handle initiation
+       from the socket side (as specified by XEMBED), to handle
+       the more advanced features of XEMBED, and to figure out
+       a good way to handle same-app embedding with less overhead
+       than using full XEMBED.
+
+Wed Apr 18 16:04:28 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.[ch] (gtk_window_real_set_focus): Keep
+       track of whether the toplevel has the focus; only send
+       focus-in events to the focus widget when the window
+       actually has the focus.
+
 2001-04-25  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtkwindow.h: set_decorations_hint and set_functions_hint
index 22eb7a31798362d77d524ccdf67eb15b6ab349cb..8767c33a7006a2316a95fbb264c6934ea18347af 100644 (file)
@@ -756,7 +756,8 @@ gdk_event_translate (GdkEvent *event,
                           xevent->xcrossing.subwindow));
 
       /* Handle focusing (in the case where no window manager is running */
-      if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD &&
+      if (window &&
+         GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD &&
          xevent->xcrossing.detail != NotifyInferior &&
          xevent->xcrossing.focus && !window_impl->has_focus)
        {
@@ -842,7 +843,8 @@ gdk_event_translate (GdkEvent *event,
                           xevent->xcrossing.detail, xevent->xcrossing.subwindow));
       
       /* Handle focusing (in the case where no window manager is running */
-      if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD &&
+      if (window &&
+         GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD &&
          xevent->xcrossing.detail != NotifyInferior &&
          xevent->xcrossing.focus && !window_impl->has_focus)
        {
@@ -922,7 +924,7 @@ gdk_event_translate (GdkEvent *event,
       GDK_NOTE (EVENTS,
                g_message ("focus in:\t\twindow: %ld", xevent->xfocus.window));
       
-      if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD)
+      if (window && GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD)
        {
          gboolean had_focus = HAS_FOCUS (window_impl);
          
@@ -951,7 +953,7 @@ gdk_event_translate (GdkEvent *event,
       GDK_NOTE (EVENTS,
                g_message ("focus out:\t\twindow: %ld", xevent->xfocus.window));
 
-      if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD)
+      if (window && GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD)
        {
          gboolean had_focus = HAS_FOCUS (window_impl);
            
@@ -1155,7 +1157,7 @@ gdk_event_translate (GdkEvent *event,
        * an unmap, it means we hid the window ourselves, so we
        * will have already flipped the iconified bit off.
        */
-      if (GDK_WINDOW_IS_MAPPED (window))
+      if (window && GDK_WINDOW_IS_MAPPED (window))
         gdk_synthesize_window_state (window,
                                      0,
                                      GDK_WINDOW_STATE_ICONIFIED);
@@ -1174,7 +1176,7 @@ gdk_event_translate (GdkEvent *event,
       event->any.window = window;
 
       /* Unset iconified if it was set */
-      if (((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_ICONIFIED)
+      if (window && (((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_ICONIFIED))
         gdk_synthesize_window_state (window,
                                      GDK_WINDOW_STATE_ICONIFIED,
                                      0);
index a35115fec14e9da4302f105cd5272ff1c19a4e64..c46eeb1ececc6e333927b9dae5b9630b59ca808d 100644 (file)
@@ -551,6 +551,17 @@ source_drag_data_delete  (GtkWidget          *widget,
   g_print ("Delete the data!\n");
 }
   
+void
+test_init ()
+{
+  if (g_file_test ("../gdk-pixbuf/.libs/libpixbufloader-pnm.so",
+                  G_FILE_TEST_EXISTS))
+    {
+      putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf/.libs");
+      putenv ("GTK_IM_MODULE_FILE=./gtk.immodules");
+    }
+}
+
 int 
 main (int argc, char **argv)
 {
@@ -562,6 +573,8 @@ main (int argc, char **argv)
   GdkPixmap *drag_icon;
   GdkPixmap *drag_mask;
 
+  test_init ();
+  
   gtk_init (&argc, &argv); 
 
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);