Commit 995d97b0 authored by Tim Janik's avatar Tim Janik Committed by Tim Janik
Browse files

major overhaul of the code, fixed all known bugs (hopefully ;).

Sat Mar 21 22:54:31 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkhandlebox.h:
        * gtk/gtkhandlebox.c: major overhaul of the code, fixed all
        known bugs (hopefully ;).

Sat Mar 20 15:33:17 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c (gtk_widget_real_show): queue the resize for the
        parent.

Thu Mar 19 02:00:50 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c (gtk_widget_unrealize): unset flags after emission,
        especially GTK_MAPPED, since that might not have been taken care of
        by an UNMAP emission.
parent a7960ed9
This diff is collapsed.
......@@ -47,16 +47,15 @@ struct _GtkHandleBox
{
GtkBin bin;
GdkWindow *steady_window; /* the window that stays in the parent container */
GtkWidget *float_window;
GtkRequisition real_requisition;
guint is_being_dragged : 1;
guint is_onroot : 1;
guint overlap_attaches : 1;
GdkWindow *bin_window; /* parent window for children */
GdkWindow *float_window;
guint handle_position : 2;
guint float_window_mapped : 1;
guint child_detached : 1;
guint in_drag : 1;
GdkCursor *fleur_cursor;
gint dragoff_x, dragoff_y; /* start drag position (wrt widget->window) */
gint steady_x, steady_y; /* origin of stedy_window (wrt the root window) */
};
struct _GtkHandleBoxClass
......
......@@ -1436,7 +1436,10 @@ gtk_widget_unrealize (GtkWidget *widget)
gtk_widget_shape_combine_mask (widget, NULL, -1, -1);
if (GTK_WIDGET_REALIZED (widget))
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[UNREALIZE]);
{
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[UNREALIZE]);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
}
}
/*****************************************
......@@ -3449,7 +3452,7 @@ gtk_widget_real_show (GtkWidget *widget)
if (widget->parent)
{
gtk_widget_queue_resize (widget);
gtk_widget_queue_resize (widget->parent);
if (GTK_WIDGET_MAPPED (widget->parent))
gtk_widget_map (widget);
......
......@@ -1464,6 +1464,7 @@ create_handle_box ()
{
static GtkWidget* window = NULL;
GtkWidget *handle_box;
GtkWidget *handle_box2;
GtkWidget *hbox;
GtkWidget *toolbar;
GtkWidget *label;
......@@ -1512,8 +1513,20 @@ create_handle_box ()
"detached");
gtk_widget_show (handle_box);
handle_box2 = gtk_handle_box_new ();
gtk_container_add (GTK_CONTAINER (handle_box), handle_box2);
gtk_signal_connect (GTK_OBJECT (handle_box2),
"child_attached",
GTK_SIGNAL_FUNC (handle_box_child_signal),
"attached");
gtk_signal_connect (GTK_OBJECT (handle_box2),
"child_detached",
GTK_SIGNAL_FUNC (handle_box_child_signal),
"detached");
gtk_widget_show (handle_box2);
label = gtk_label_new ("Fooo!");
gtk_container_add (GTK_CONTAINER (handle_box), label);
gtk_container_add (GTK_CONTAINER (handle_box2), label);
gtk_widget_show (label);
}
......
......@@ -1464,6 +1464,7 @@ create_handle_box ()
{
static GtkWidget* window = NULL;
GtkWidget *handle_box;
GtkWidget *handle_box2;
GtkWidget *hbox;
GtkWidget *toolbar;
GtkWidget *label;
......@@ -1512,8 +1513,20 @@ create_handle_box ()
"detached");
gtk_widget_show (handle_box);
handle_box2 = gtk_handle_box_new ();
gtk_container_add (GTK_CONTAINER (handle_box), handle_box2);
gtk_signal_connect (GTK_OBJECT (handle_box2),
"child_attached",
GTK_SIGNAL_FUNC (handle_box_child_signal),
"attached");
gtk_signal_connect (GTK_OBJECT (handle_box2),
"child_detached",
GTK_SIGNAL_FUNC (handle_box_child_signal),
"detached");
gtk_widget_show (handle_box2);
label = gtk_label_new ("Fooo!");
gtk_container_add (GTK_CONTAINER (handle_box), label);
gtk_container_add (GTK_CONTAINER (handle_box2), label);
gtk_widget_show (label);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment