Index: modules/overlay/overlay.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay.module,v
retrieving revision 1.1
diff -u -p -r1.1 overlay.module
--- modules/overlay/overlay.module	2 Dec 2009 07:28:22 -0000	1.1
+++ modules/overlay/overlay.module	9 Dec 2009 22:06:21 -0000
@@ -72,7 +72,7 @@ function overlay_init() {
  * Implements hook_exit().
  *
  * When viewing an overlay child page, check if we need to trigger a refresh of
- * the supplemental regions of the overlay on the next page request.
+ * the parent window on the next page request.
  */
 function overlay_exit() {
   // Check that we are in an overlay child page. Note that this should never
@@ -81,15 +81,15 @@ function overlay_exit() {
   if (overlay_get_mode() == 'child') {
     // Load any markup that was stored earlier in the page request, via calls
     // to overlay_store_rendered_content(). If none was stored, this is not a
-    // page request where we expect any changes to the overlay supplemental
-    // regions to have occurred, so we do not need to proceed any further.
+    // page request where we expect any changes to the parent window to have
+    // occurred, so we do not need to proceed any further.
     $original_markup = overlay_get_rendered_content();
     if (!empty($original_markup)) {
       // Compare the original markup to the current markup that we get from
-      // rendering each overlay supplemental region now. If they don't match,
+      // rendering each parent window region now. If they don't match,
       // something must have changed, so we request a refresh of that region
       // within the parent window on the next page request.
-      foreach (overlay_supplemental_regions() as $region) {
+      foreach (overlay_parent_window_regions() as $region) {
         if (!isset($original_markup[$region]) || $original_markup[$region] != overlay_render_region($region)) {
           overlay_request_refresh($region);
         }
@@ -475,14 +475,14 @@ function overlay_overlay_child_initializ
   // request.
   overlay_trigger_regions_to_refresh();
   // If this is a POST request, or a GET request with a token parameter, we
-  // have an indication that something in the supplemental regions of the
-  // overlay might change during the current page request. We therefore store
-  // the initial rendered content of those regions here, so that we can compare
-  // it to the same content rendered in overlay_exit(), at the end of the page
-  // request. This allows us to check if anything actually did change, and, if
-  // so, trigger an AJAX refresh of the parent window.
+  // have an indication that the content of one of the parent window's regions
+  // might change during the current page request. We therefore store the
+  // initial rendered content of each of the parent window's regions here, so
+  // that we can compare it to the same content rendered in overlay_exit(), at
+  // the end of the page request. This allows us to check if anything actually
+  // did change, and, if so, trigger an AJAX refresh of the parent window.
   if (!empty($_POST) || isset($_GET['token'])) {
-    foreach (overlay_supplemental_regions() as $region) {
+    foreach (overlay_parent_window_regions() as $region) {
       overlay_store_rendered_content($region, overlay_render_region($region));
     }
   }
@@ -546,32 +546,25 @@ function overlay_close_dialog($redirect 
  *   An array of region names that correspond to those which appear in the
  *   overlay, within the theme that is being used to display the current page.
  *
- * @see overlay_supplemental_regions()
+ * @see overlay_parent_window_regions()
  */
 function overlay_regions() {
   return _overlay_region_list('overlay_regions');
 }
 
 /**
- * Returns a list of supplemental page regions for the overlay.
+ * Returns a list of page regions in the overlay parent window.
  *
- * Supplemental overlay regions are those which are technically part of the
- * parent window, but appear to the user as being related to the overlay
- * (usually because they are displayed next to, rather than underneath, the
- * main overlay regions) and therefore need to be dynamically refreshed if any
- * administrative actions taken within the overlay change their contents.
- *
- * An example of a typical overlay supplemental region would be the 'page_top'
- * region, in the case where a toolbar is being displayed there.
+ * @todo: Actually deal with different themes.
  *
  * @return
- *   An array of region names that correspond to supplemental overlay regions,
- *   within the theme that is being used to display the current page.
+ *   An array of region names that correspond to the parent window's regions,
+ *   within the theme that is being used to display the parent window.
  *
  * @see overlay_regions()
  */
-function overlay_supplemental_regions() {
-  return _overlay_region_list('overlay_supplemental_regions');
+function overlay_parent_window_regions() {
+  return _overlay_region_list('regions');
 }
 
 /**
@@ -579,14 +572,14 @@ function overlay_supplemental_regions() 
  *
  * @param $type
  *   The type of regions to return. This can either be 'overlay_regions' or
- *   'overlay_supplemental_regions'.
+ *   'regions'.
  *
  * @return
  *   An array of region names of the given type, within the theme that is being
  *   used to display the current page.
  *
  * @see overlay_regions()
- * @see overlay_supplemental_regions()
+ * @see overlay_parent_window_regions()
  */
 function _overlay_region_list($type) {
   // Obtain the current theme. We need to first make sure the theme system is
@@ -596,7 +589,8 @@ function _overlay_region_list($type) {
   $theme = $themes[$GLOBALS['theme']];
   // Return the list of regions stored within the theme's info array, or an
   // empty array if no regions of the appropriate type are defined.
-  return !empty($theme->info[$type]) ? $theme->info[$type] : array();
+  $regions = !empty($theme->info[$type]) ? $theme->info[$type] : array();
+  return $type == 'regions' ? array_keys($regions) : $regions;
 }
 
 /**
@@ -650,6 +644,8 @@ function overlay_set_regions_to_render($
  * supported; the region will be rendered by this function, but the main page
  * content will not appear in it.
  *
+ * @todo: We need to remove the above limitation, or something.
+ *
  * @param $region
  *   The name of the page region that should be rendered.
  *
Index: modules/toolbar/toolbar.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.module,v
retrieving revision 1.26
diff -u -p -r1.26 toolbar.module
--- modules/toolbar/toolbar.module	4 Dec 2009 16:49:47 -0000	1.26
+++ modules/toolbar/toolbar.module	9 Dec 2009 22:06:21 -0000
@@ -151,19 +151,6 @@ function toolbar_preprocess_html(&$vars)
 }
 
 /**
- * Implements hook_system_info_alter().
- *
- * If the overlay module is enabled, indicate that the 'page_top' region (in
- * which the toolbar will be displayed) is one of the overlay supplemental
- * regions that should be refreshed whenever its content is updated.
- */
-function toolbar_system_info_alter(&$info, $file, $type) {
-  if (module_exists('overlay') && $type == 'theme') {
-    $info['overlay_supplemental_regions'][] = 'page_top';
-  }
-}
-
-/**
  * Build the admin menu as a structured array ready for drupal_render().
  */
 function toolbar_build() {
