]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtksocket.c
entrycompletion: Don't reconnect signals all the time
[~andy/gtk] / gtk / gtksocket.c
index d7f6df6937c0f64aed6f5cb6043ac5128fc2c788..c497f5065eaf7936323909bccb456f485ad4f570 100644 (file)
@@ -12,8 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.Free
  */
 
 /* By Owen Taylor <otaylor@gtk.org>              98/4/4 */
@@ -38,6 +37,7 @@
 #include "gtkdnd.h"
 #include "gtkdebug.h"
 #include "gtkintl.h"
+#include "gtkmain.h"
 #include "gtkwidgetprivate.h"
 
 #include <gdk/gdkx.h>
@@ -380,7 +380,6 @@ static void
 gtk_socket_realize (GtkWidget *widget)
 {
   GtkAllocation allocation;
-  GtkSocket *socket = GTK_SOCKET (widget);
   GdkWindow *window;
   GdkWindowAttr attributes;
   XWindowAttributes xattrs;
@@ -404,7 +403,7 @@ gtk_socket_realize (GtkWidget *widget)
   window = gdk_window_new (gtk_widget_get_parent_window (widget),
                            &attributes, attributes_mask);
   gtk_widget_set_window (widget, window);
-  gdk_window_set_user_data (window, socket);
+  gtk_widget_register_window (widget, window);
 
   gtk_style_context_set_background (gtk_widget_get_style_context (widget),
                                     window);
@@ -439,7 +438,6 @@ gtk_socket_realize (GtkWidget *widget)
 
 /**
  * gtk_socket_end_embedding:
- *
  * @socket: a #GtkSocket
  *
  * Called to end the embedding of a plug in the socket.
@@ -731,7 +729,6 @@ find_accel_key (GtkAccelKey *key,
 
 /**
  * gtk_socket_add_grabbed_key:
- *
  * @socket: a #GtkSocket
  * @keyval: a key
  * @modifiers: modifiers for the key
@@ -770,7 +767,6 @@ gtk_socket_add_grabbed_key (GtkSocket       *socket,
 
 /**
  * gtk_socket_remove_grabbed_key:
- *
  * @socket: a #GtkSocket
  * @keyval: a key
  * @modifiers: modifiers for the key
@@ -917,11 +913,13 @@ gtk_socket_notify (GObject    *object,
 {
   if (strcmp (pspec->name, "is-focus") == 0)
     socket_update_focus_in (GTK_SOCKET (object));
+
+  if (G_OBJECT_CLASS (gtk_socket_parent_class)->notify)
+    G_OBJECT_CLASS (gtk_socket_parent_class)->notify (object, pspec);
 }
 
 /**
  * gtk_socket_claim_focus:
- *
  * @socket: a #GtkSocket
  * @send_event: huh?
  *
@@ -1008,11 +1006,10 @@ gtk_socket_forall (GtkContainer *container,
 
 /**
  * gtk_socket_add_window:
- *
  * @socket: a #GtkSocket
  * @xid: the native identifier for a window
  * @need_reparent: whether the socket's plug's window needs to be
- *                reparented to the socket
+ *                 reparented to the socket
  *
  * Adds a window to a GtkSocket.
  */
@@ -1145,7 +1142,6 @@ gtk_socket_add_window (GtkSocket       *socket,
 
 /**
  * gtk_socket_handle_map_request:
- *
  * @socket: a #GtkSocket
  *
  * Called from the GtkSocket backend when the plug has been mapped.
@@ -1165,7 +1161,6 @@ gtk_socket_handle_map_request (GtkSocket *socket)
 
 /**
  * gtk_socket_unmap_notify:
- *
  * @socket: a #GtkSocket
  *
  * Called from the GtkSocket backend when the plug has been unmapped ???
@@ -1183,7 +1178,6 @@ gtk_socket_unmap_notify (GtkSocket *socket)
 
 /**
  * gtk_socket_advance_toplevel_focus:
- *
  * @socket: a #GtkSocket
  * @direction: a direction
  *