summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog23
-rw-r--r--ChangeLog.pre-2-023
-rw-r--r--ChangeLog.pre-2-1023
-rw-r--r--ChangeLog.pre-2-223
-rw-r--r--ChangeLog.pre-2-423
-rw-r--r--ChangeLog.pre-2-623
-rw-r--r--ChangeLog.pre-2-823
-rw-r--r--docs/Changes-2.0.txt2
-rw-r--r--gtk/gtkfixed.c44
-rw-r--r--gtk/gtkfixed.h3
-rw-r--r--gtk/gtkplug.c15
11 files changed, 222 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d1d82e3dd5..f4505662d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+Mon Nov 19 17:11:23 2001 Owen Taylor <otaylor@redhat.com>
+
+ (Fixes related to #64428, Michael Meeks)
+
+ * gtk/gtkplug.c (gtk_plug_set_is_child): Unmap the
+ widget, so it gets mapped again properly when we
+ add to a parent.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ plug->socket_window.
+
+ * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Set
+ socket_window to NULL, not FALSE.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ socket->same_app to TRUE. (#64612)
+
+Mon Nov 19 15:50:41 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfixed.[ch] docs/Changes-2.0.txt: Add
+ gtk_fixed_set/get_has_window() to remove criticism
+ about GTK_WIDGET_SET_FLAGS() hacks.
+
2001-11-19 Michael Natterer <mitch@gimp.org>
* gtk/gtknotebook.c: show notebook->event_window with
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index d1d82e3dd5..f4505662d4 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,26 @@
+Mon Nov 19 17:11:23 2001 Owen Taylor <otaylor@redhat.com>
+
+ (Fixes related to #64428, Michael Meeks)
+
+ * gtk/gtkplug.c (gtk_plug_set_is_child): Unmap the
+ widget, so it gets mapped again properly when we
+ add to a parent.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ plug->socket_window.
+
+ * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Set
+ socket_window to NULL, not FALSE.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ socket->same_app to TRUE. (#64612)
+
+Mon Nov 19 15:50:41 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfixed.[ch] docs/Changes-2.0.txt: Add
+ gtk_fixed_set/get_has_window() to remove criticism
+ about GTK_WIDGET_SET_FLAGS() hacks.
+
2001-11-19 Michael Natterer <mitch@gimp.org>
* gtk/gtknotebook.c: show notebook->event_window with
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index d1d82e3dd5..f4505662d4 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,26 @@
+Mon Nov 19 17:11:23 2001 Owen Taylor <otaylor@redhat.com>
+
+ (Fixes related to #64428, Michael Meeks)
+
+ * gtk/gtkplug.c (gtk_plug_set_is_child): Unmap the
+ widget, so it gets mapped again properly when we
+ add to a parent.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ plug->socket_window.
+
+ * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Set
+ socket_window to NULL, not FALSE.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ socket->same_app to TRUE. (#64612)
+
+Mon Nov 19 15:50:41 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfixed.[ch] docs/Changes-2.0.txt: Add
+ gtk_fixed_set/get_has_window() to remove criticism
+ about GTK_WIDGET_SET_FLAGS() hacks.
+
2001-11-19 Michael Natterer <mitch@gimp.org>
* gtk/gtknotebook.c: show notebook->event_window with
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index d1d82e3dd5..f4505662d4 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,26 @@
+Mon Nov 19 17:11:23 2001 Owen Taylor <otaylor@redhat.com>
+
+ (Fixes related to #64428, Michael Meeks)
+
+ * gtk/gtkplug.c (gtk_plug_set_is_child): Unmap the
+ widget, so it gets mapped again properly when we
+ add to a parent.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ plug->socket_window.
+
+ * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Set
+ socket_window to NULL, not FALSE.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ socket->same_app to TRUE. (#64612)
+
+Mon Nov 19 15:50:41 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfixed.[ch] docs/Changes-2.0.txt: Add
+ gtk_fixed_set/get_has_window() to remove criticism
+ about GTK_WIDGET_SET_FLAGS() hacks.
+
2001-11-19 Michael Natterer <mitch@gimp.org>
* gtk/gtknotebook.c: show notebook->event_window with
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index d1d82e3dd5..f4505662d4 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,26 @@
+Mon Nov 19 17:11:23 2001 Owen Taylor <otaylor@redhat.com>
+
+ (Fixes related to #64428, Michael Meeks)
+
+ * gtk/gtkplug.c (gtk_plug_set_is_child): Unmap the
+ widget, so it gets mapped again properly when we
+ add to a parent.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ plug->socket_window.
+
+ * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Set
+ socket_window to NULL, not FALSE.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ socket->same_app to TRUE. (#64612)
+
+Mon Nov 19 15:50:41 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfixed.[ch] docs/Changes-2.0.txt: Add
+ gtk_fixed_set/get_has_window() to remove criticism
+ about GTK_WIDGET_SET_FLAGS() hacks.
+
2001-11-19 Michael Natterer <mitch@gimp.org>
* gtk/gtknotebook.c: show notebook->event_window with
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index d1d82e3dd5..f4505662d4 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,26 @@
+Mon Nov 19 17:11:23 2001 Owen Taylor <otaylor@redhat.com>
+
+ (Fixes related to #64428, Michael Meeks)
+
+ * gtk/gtkplug.c (gtk_plug_set_is_child): Unmap the
+ widget, so it gets mapped again properly when we
+ add to a parent.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ plug->socket_window.
+
+ * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Set
+ socket_window to NULL, not FALSE.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ socket->same_app to TRUE. (#64612)
+
+Mon Nov 19 15:50:41 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfixed.[ch] docs/Changes-2.0.txt: Add
+ gtk_fixed_set/get_has_window() to remove criticism
+ about GTK_WIDGET_SET_FLAGS() hacks.
+
2001-11-19 Michael Natterer <mitch@gimp.org>
* gtk/gtknotebook.c: show notebook->event_window with
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index d1d82e3dd5..f4505662d4 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,26 @@
+Mon Nov 19 17:11:23 2001 Owen Taylor <otaylor@redhat.com>
+
+ (Fixes related to #64428, Michael Meeks)
+
+ * gtk/gtkplug.c (gtk_plug_set_is_child): Unmap the
+ widget, so it gets mapped again properly when we
+ add to a parent.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ plug->socket_window.
+
+ * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Set
+ socket_window to NULL, not FALSE.
+
+ * gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
+ socket->same_app to TRUE. (#64612)
+
+Mon Nov 19 15:50:41 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfixed.[ch] docs/Changes-2.0.txt: Add
+ gtk_fixed_set/get_has_window() to remove criticism
+ about GTK_WIDGET_SET_FLAGS() hacks.
+
2001-11-19 Michael Natterer <mitch@gimp.org>
* gtk/gtknotebook.c: show notebook->event_window with
diff --git a/docs/Changes-2.0.txt b/docs/Changes-2.0.txt
index fb0c732279..da9e9a37c5 100644
--- a/docs/Changes-2.0.txt
+++ b/docs/Changes-2.0.txt
@@ -537,7 +537,7 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
GtkFixed is a little special; it is now created by default as
a NO_WINDOW widget, but if you do
- GTK_WIDGET_UNSET_FLAGS (fixed, GTK_WIDGET_NO_WINDOW)
+ gtk_fixed_set_has_window (fixed, TRUE);
after creating a fixed widget, it will create a window and
handle it properly.
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 8f5dd6d4d0..c16aa2300f 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -505,3 +505,47 @@ gtk_fixed_forall (GtkContainer *container,
(* callback) (child->widget, callback_data);
}
}
+
+/**
+ * gtk_fixed_set_has_window:
+ * @fixed: a #GtkFixed
+ * @has_window: %TRUE if a separate window should be created
+ *
+ * Sets whether a #GtkFixed widget is created with a separate
+ * #GdkWindow for widget->window or not. (By default, it will be
+ * created with no separate #GdkWindow). This function must be called
+ * while the is not realized, for instance, immediately after the
+ * window is created.
+ **/
+void
+gtk_fixed_set_has_window (GtkFixed *fixed,
+ gboolean has_window)
+{
+ g_return_if_fail (GTK_IS_FIXED (fixed));
+ g_return_if_fail (!GTK_WIDGET_REALIZED (fixed));
+
+ if (!has_window != GTK_WIDGET_NO_WINDOW (fixed))
+ {
+ if (has_window)
+ GTK_WIDGET_UNSET_FLAGS (fixed, GTK_NO_WINDOW);
+ else
+ GTK_WIDGET_SET_FLAGS (fixed, GTK_NO_WINDOW);
+ }
+}
+
+/**
+ * gtk_fixed_get_has_window:
+ * @fixed: a #GtkWidget
+ *
+ * Gets whether the #GtkFixed has it's own #GdkWindow.
+ * See gdk_fixed_set_has_window().
+ *
+ * Return value:
+ **/
+gboolean
+gtk_fixed_get_has_window (GtkFixed *fixed)
+{
+ g_return_if_fail (GTK_IS_FIXED (fixed));
+
+ return !GTK_WIDGET_NO_WINDOW (fixed);
+}
diff --git a/gtk/gtkfixed.h b/gtk/gtkfixed.h
index 6e0bc593a4..ba07df8cbb 100644
--- a/gtk/gtkfixed.h
+++ b/gtk/gtkfixed.h
@@ -79,6 +79,9 @@ void gtk_fixed_move (GtkFixed *fixed,
GtkWidget *widget,
gint x,
gint y);
+void gtk_fixed_set_has_window (GtkFixed *fixed,
+ gboolean has_window);
+gboolean gtk_fixed_get_has_window (GtkFixed *fixed);
#ifdef __cplusplus
}
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index f937fa4569..c04aa81ab9 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -180,6 +180,14 @@ gtk_plug_set_is_child (GtkPlug *plug,
plug->modality_group = NULL;
}
+ /* As a toplevel, the MAPPED flag doesn't correspond
+ * to whether the widget->window is mapped; we unmap
+ * here, but don't bother remapping -- we will get mapped
+ * by gtk_widget_set_parent ().
+ */
+ if (GTK_WIDGET_MAPPED (plug))
+ gtk_widget_unmap (GTK_WIDGET (plug));
+
GTK_WIDGET_UNSET_FLAGS (plug, GTK_TOPLEVEL);
gtk_container_set_resize_mode (GTK_CONTAINER (plug), GTK_RESIZE_PARENT);
@@ -218,8 +226,11 @@ _gtk_plug_add_to_socket (GtkPlug *plug,
gtk_plug_set_is_child (plug, TRUE);
plug->same_app = TRUE;
+ socket->same_app = TRUE;
socket->plug_widget = widget;
+ plug->socket_window = GTK_WIDGET (socket)->window;
+
if (GTK_WIDGET_REALIZED (widget))
gdk_window_reparent (widget->window, plug->socket_window, 0, 0);
@@ -229,7 +240,7 @@ _gtk_plug_add_to_socket (GtkPlug *plug,
}
/**
- * _gtk_plug_add_to_socket:
+ * _gtk_plug_remove_from_socket:
* @plug: a #GtkPlug
* @socket: a #GtkSocket
*
@@ -267,7 +278,7 @@ _gtk_plug_remove_from_socket (GtkPlug *plug,
socket->same_app = FALSE;
plug->same_app = FALSE;
- plug->socket_window = FALSE;
+ plug->socket_window = NULL;
gtk_plug_set_is_child (plug, FALSE);