Index: gnome-panel//gnome-panel/ChangeLog
===================================================================
RCS file: /export/cvs/gnome-2.0/gnome-panel/gnome-panel/ChangeLog,v
retrieving revision 1.2236
diff -p -u -5 -r1.2236 ChangeLog
--- gnome-panel//gnome-panel/ChangeLog	2003/10/06 13:23:30	1.2236
+++ gnome-panel//gnome-panel/ChangeLog	2003/10/07 13:22:43
@@ -1,5 +1,13 @@
+2003-10-07  Arvind Samptur  <arvind.samptur@wipro.com>
+
+	* panel-toplevel.c : (panel_toplevel_push_autohide_disabler)
+	(panel_toplevel_pop_autohide_disabler) : Use them to increment and decrement
+	the open drawers  count attached to a toplevel panel.
+	(panel_toplevel_get_autohide_disabled): Returns True if panel has open drawers.
+	(panel_toplevel_unhide) panel_toplevel_hide) : Use the above methods.
+
 2003-10-06  Arvind Samptur  <arvind.samptur@wipro.com>
 
 	* panel-widget.[ch] : (panel_widget_register_open_dialog):
 	Register the open dialog in to the list of open dialogs.
 	(panel_widget_destroy_open_dialogs) : On destroying the panel,
Index: gnome-panel//gnome-panel/panel-toplevel.c
===================================================================
RCS file: /export/cvs/gnome-2.0/gnome-panel/gnome-panel/panel-toplevel.c,v
retrieving revision 1.37
diff -p -u -5 -r1.37 panel-toplevel.c
--- gnome-panel//gnome-panel/panel-toplevel.c	2003/09/19 23:52:15	1.37
+++ gnome-panel//gnome-panel/panel-toplevel.c	2003/10/07 13:22:44
@@ -131,10 +131,11 @@ struct _PanelToplevelPrivate {
 
 	PanelToplevel          *attach_toplevel;
 	gulong                  attach_toplevel_signals [N_ATTACH_TOPLEVEL_SIGNALS];
 	GtkWidget              *attach_widget;
 	gulong                  attach_widget_signals [N_ATTACH_WIDGET_SIGNALS];
+	gint			n_autohide_disablers;
 
 	guint                   auto_hide : 1;
 	guint                   animate : 1;
 	guint                   buttons_enabled : 1;
 	guint                   arrows_enabled : 1;
@@ -1009,11 +1010,34 @@ panel_toplevel_calc_floating (PanelTople
 	else
 		toplevel->priv->floating =
 			(x > SNAP_TOLERANCE) && (x < (screen_width - toplevel->priv->geometry.width - SNAP_TOLERANCE));
 }
 
+static void 
+panel_toplevel_push_autohide_disabler (PanelToplevel *toplevel)
+{
+	g_return_if_fail  (toplevel != NULL);
+
+	toplevel->priv->n_autohide_disablers++;
+}
+
+static void
+panel_toplevel_pop_autohide_disabler (PanelToplevel *toplevel)
+{
+	g_return_if_fail  (toplevel != NULL);
+
+	if (toplevel->priv->n_autohide_disablers > 0)
+		toplevel->priv->n_autohide_disablers--;		
+}
+
 static gboolean
+panel_toplevel_get_autohide_disabled (PanelToplevel *toplevel)
+{
+	return toplevel->priv->n_autohide_disablers > 0 ? TRUE : FALSE;
+}
+
+static gboolean
 panel_toplevel_hide_button_event (PanelToplevel  *toplevel,
 				  GdkEventButton *event,
 				  GtkButton      *button)
 {
 	if (event->button == 1)
@@ -3028,10 +3052,13 @@ panel_toplevel_hide (PanelToplevel    *t
 	if (toplevel->priv->state != PANEL_STATE_NORMAL)
 		return;
 
 	g_signal_emit (toplevel, toplevel_signals [HIDE_SIGNAL], 0);
 
+	if (toplevel->priv->attach_toplevel)
+		panel_toplevel_pop_autohide_disabler (toplevel->priv->attach_toplevel);
+
 	if (auto_hide)
 		toplevel->priv->state = PANEL_STATE_AUTO_HIDDEN;
 	else {
 		if (direction == -1) {
 			if (toplevel->priv->orientation & PANEL_VERTICAL_MASK)
@@ -3104,10 +3131,13 @@ panel_toplevel_unhide (PanelToplevel *to
 
 	toplevel->priv->state = PANEL_STATE_NORMAL;
 
 	panel_toplevel_update_hide_buttons (toplevel);
 
+	if (toplevel->priv->attach_toplevel)
+		panel_toplevel_push_autohide_disabler (toplevel->priv->attach_toplevel);
+
 	if (toplevel->priv->animate && GTK_WIDGET_REALIZED (toplevel))
 		panel_toplevel_start_animation (toplevel);
 	else
 		gtk_widget_show (GTK_WIDGET (toplevel));
 
@@ -3159,11 +3189,12 @@ panel_toplevel_queue_auto_hide (PanelTop
 	g_return_if_fail (PANEL_IS_TOPLEVEL (toplevel));
 
 	if ( ! toplevel->priv->auto_hide ||
 	    toplevel->priv->hide_timeout ||
 	    toplevel->priv->state != PANEL_STATE_NORMAL ||
-	    panel_toplevel_contains_pointer (toplevel))
+	    panel_toplevel_contains_pointer (toplevel) ||
+	    panel_toplevel_get_autohide_disabled (toplevel))
 		return;
 
 	if (toplevel->priv->unhide_timeout)
 		g_source_remove (toplevel->priv->unhide_timeout);
 	toplevel->priv->unhide_timeout = 0;
@@ -3948,10 +3979,11 @@ panel_toplevel_instance_init (PanelTople
 	toplevel->priv->hide_button_left   = NULL;
 	toplevel->priv->hide_button_right  = NULL;
 
 	toplevel->priv->attach_toplevel = NULL;
 	toplevel->priv->attach_widget   = NULL;
+	toplevel->priv->n_autohide_disablers = 0;
 
 	for (i = 0; i < N_ATTACH_TOPLEVEL_SIGNALS; i++)
 		toplevel->priv->attach_toplevel_signals [i] = 0;
 	for (i = 0; i < N_ATTACH_WIDGET_SIGNALS; i++)
 		toplevel->priv->attach_widget_signals [i] = 0;
