(Fixes related to #64428, Michael Meeks)
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.
This commit is contained in:
parent
2268abe48f
commit
0e8a7fb48e
23
ChangeLog
23
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>
|
2001-11-19 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* gtk/gtknotebook.c: show notebook->event_window with
|
* gtk/gtknotebook.c: show notebook->event_window with
|
||||||
|
@ -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>
|
2001-11-19 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* gtk/gtknotebook.c: show notebook->event_window with
|
* gtk/gtknotebook.c: show notebook->event_window with
|
||||||
|
@ -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>
|
2001-11-19 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* gtk/gtknotebook.c: show notebook->event_window with
|
* gtk/gtknotebook.c: show notebook->event_window with
|
||||||
|
@ -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>
|
2001-11-19 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* gtk/gtknotebook.c: show notebook->event_window with
|
* gtk/gtknotebook.c: show notebook->event_window with
|
||||||
|
@ -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>
|
2001-11-19 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* gtk/gtknotebook.c: show notebook->event_window with
|
* gtk/gtknotebook.c: show notebook->event_window with
|
||||||
|
@ -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>
|
2001-11-19 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* gtk/gtknotebook.c: show notebook->event_window with
|
* gtk/gtknotebook.c: show notebook->event_window with
|
||||||
|
@ -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>
|
2001-11-19 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* gtk/gtknotebook.c: show notebook->event_window with
|
* gtk/gtknotebook.c: show notebook->event_window with
|
||||||
|
@ -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
|
GtkFixed is a little special; it is now created by default as
|
||||||
a NO_WINDOW widget, but if you do
|
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
|
after creating a fixed widget, it will create a window and
|
||||||
handle it properly.
|
handle it properly.
|
||||||
|
@ -505,3 +505,47 @@ gtk_fixed_forall (GtkContainer *container,
|
|||||||
(* callback) (child->widget, callback_data);
|
(* 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);
|
||||||
|
}
|
||||||
|
@ -79,6 +79,9 @@ void gtk_fixed_move (GtkFixed *fixed,
|
|||||||
GtkWidget *widget,
|
GtkWidget *widget,
|
||||||
gint x,
|
gint x,
|
||||||
gint y);
|
gint y);
|
||||||
|
void gtk_fixed_set_has_window (GtkFixed *fixed,
|
||||||
|
gboolean has_window);
|
||||||
|
gboolean gtk_fixed_get_has_window (GtkFixed *fixed);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -180,6 +180,14 @@ gtk_plug_set_is_child (GtkPlug *plug,
|
|||||||
plug->modality_group = NULL;
|
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_WIDGET_UNSET_FLAGS (plug, GTK_TOPLEVEL);
|
||||||
gtk_container_set_resize_mode (GTK_CONTAINER (plug), GTK_RESIZE_PARENT);
|
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);
|
gtk_plug_set_is_child (plug, TRUE);
|
||||||
plug->same_app = TRUE;
|
plug->same_app = TRUE;
|
||||||
|
socket->same_app = TRUE;
|
||||||
socket->plug_widget = widget;
|
socket->plug_widget = widget;
|
||||||
|
|
||||||
|
plug->socket_window = GTK_WIDGET (socket)->window;
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (widget))
|
if (GTK_WIDGET_REALIZED (widget))
|
||||||
gdk_window_reparent (widget->window, plug->socket_window, 0, 0);
|
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
|
* @plug: a #GtkPlug
|
||||||
* @socket: a #GtkSocket
|
* @socket: a #GtkSocket
|
||||||
*
|
*
|
||||||
@ -267,7 +278,7 @@ _gtk_plug_remove_from_socket (GtkPlug *plug,
|
|||||||
socket->same_app = FALSE;
|
socket->same_app = FALSE;
|
||||||
|
|
||||||
plug->same_app = FALSE;
|
plug->same_app = FALSE;
|
||||||
plug->socket_window = FALSE;
|
plug->socket_window = NULL;
|
||||||
|
|
||||||
gtk_plug_set_is_child (plug, FALSE);
|
gtk_plug_set_is_child (plug, FALSE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user