Index: modules/overlay/overlay-parent.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay-parent.css,v
retrieving revision 1.15
diff -u -r1.15 overlay-parent.css
--- modules/overlay/overlay-parent.css	8 Jun 2010 05:16:29 -0000	1.15
+++ modules/overlay/overlay-parent.css	1 Sep 2010 21:38:37 -0000
@@ -1,5 +1,28 @@
 /* $Id: overlay-parent.css,v 1.15 2010/06/08 05:16:29 webchick Exp $ */
 
+#overlay-disable-link a {
+  position: absolute !important;
+  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
+  clip: rect(1px, 1px, 1px, 1px);
+}
+
+#overlay-disable-link a:active,
+#overlay-disable-link a:focus {
+  background: #666666;
+  clip: auto;
+  color: #fff;
+  display: block;
+  left: 50%;
+  margin-left: -25%;
+  margin-top: 2em;
+  max-width: 700px;
+  opacity: .9;
+  outline: 0;
+  padding: 1em;
+  position: fixed;
+  width: 50%;
+}
+
 html.overlay-open,
 html.overlay-open body {
   height: 100%;
Index: modules/overlay/overlay.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay.module,v
retrieving revision 1.31
diff -u -r1.31 overlay.module
--- modules/overlay/overlay.module	31 Aug 2010 15:04:09 -0000	1.31
+++ modules/overlay/overlay.module	1 Sep 2010 21:38:37 -0000
@@ -7,6 +7,21 @@
  */
 
 /**
+ * Current user has not yet set his overlay preference.
+ */
+define('OVERLAY_PREFERENCE_INITIAL', -1);
+
+/**
+ * Current user prefers not to use the overlay.
+ */
+define('OVERLAY_PREFERENCE_DISABLED', 0);
+
+/**
+ * Current user prefers to use the overlay.
+ */
+define('OVERLAY_PREFERENCE_ENABLED', 1);
+
+/**
  * Implements hook_help().
  */
 function overlay_help($path, $arg) {
@@ -75,7 +90,7 @@
         '#type' => 'checkbox',
         '#title' => t('Use the overlay for administrative pages.'),
         '#description' => t('Show administrative pages on top of the page you started from.'),
-        '#default_value' => isset($account->data['overlay']) ? $account->data['overlay'] : 1,
+        '#default_value' => isset($account->data['overlay']) ? $account->data['overlay'] : OVERLAY_PREFERENCE_ENABLED,
       );
     }
   }
@@ -105,8 +120,8 @@
 
   // Only act if the user has access to the overlay and a mode was not already
   // set. Other modules can also enable the overlay directly for other uses.
-  $use_overlay = !isset($user->data['overlay']) || $user->data['overlay'];
-  if (empty($mode) && user_access('access overlay') && $use_overlay) {
+  $use_overlay = !isset($user->data['overlay']) || $user->data['overlay'] == OVERLAY_PREFERENCE_ENABLED;
+  if (empty($mode) && $use_overlay && user_access('access overlay')) {
     $current_path = current_path();
     // After overlay is enabled on the modules page, redirect to
     // <front>#overlay=admin/modules to actually enable the overlay.
@@ -245,6 +260,8 @@
  * Implements hook_page_alter().
  */
 function overlay_page_alter(&$page) {
+  global $user;
+
   // If we are limiting rendering to a subset of page regions, deny access to
   // all other regions so that they will not be processed.
   if ($regions_to_render = overlay_get_regions_to_render()) {
@@ -254,10 +271,31 @@
     }
   }
 
-  if (overlay_get_mode() == 'child') {
+  $mode = overlay_get_mode();
+  if ($mode == 'child') {
     // Add the overlay wrapper before the html wrapper.
     array_unshift($page['#theme_wrappers'], 'overlay');
   }
+  elseif ($mode == 'parent') {
+    $overlay_preference_initial = !isset($user->data['overlay']) || $user->data['overlay'] == OVERLAY_PREFERENCE_INITIAL;
+    if ($overlay_preference_initial && user_access('access overlay')) {
+
+      $page['page_top']['disable_overlay'] = array(
+        '#type' => 'link',
+        '#title' => t('If you are having problems accessing administrative pages (which are currently opening in an overlay on top of your website) or if you want to dismiss this message, you can set your overlay preferences on your user account page.'),
+        '#href' => 'user/' . $user->uid . '/edit',
+        '#options' => array(
+          'query' => drupal_get_destination(),
+          'fragment' => 'edit-overlay-control',
+          // Add the overlay-exclude class so the page won't be opened in the overlay.
+          'attributes' => array('class' => array('overlay-exclude')),
+        ),
+        '#prefix' => '<div id="overlay-disable-link">',
+        '#suffix' => '</div>',
+        '#weight' => -99,
+      );
+    }
+  }
 }
 
 /**
