Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4749)

Unified Diff: chrome/browser/cocoa/bookmark_bar_folder_controller.mm

Issue 1547010: Set bookmark bar menu windows to the correct level.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/bookmark_bar_folder_controller.mm
===================================================================
--- chrome/browser/cocoa/bookmark_bar_folder_controller.mm (revision 43292)
+++ chrome/browser/cocoa/bookmark_bar_folder_controller.mm (working copy)
@@ -213,6 +213,12 @@
return newWindowTopLeft;
}
+// Set our window level to the right spot so we're above the menubar, dock, etc.
+// Factored out so we can override/noop in a unit test.
+- (void)configureWindowLevel {
+ [[self window] setLevel:NSPopUpMenuWindowLevel];
+}
+
// Determine window size and position.
// Create buttons for all our nodes.
// TODO(jrg): break up into more and smaller routines for easier unit testing.
@@ -304,15 +310,7 @@
}
[[self window] setFrame:windowFrame display:YES];
-
- // This is what we want, but it won't work so long as we're a child
- // window of something at a different level. To fix (make not a
- // child) would break other things (e.g. Expose'). I really need a
- // modal loop for the bookmark menus. TODO(jrg)
- // [[self window] setLevel:NSPopUpMenuWindowLevel];
-
- [[parentController_ parentWindow] addChildWindow:[self window]
- ordered:NSWindowAbove];
+ [self configureWindowLevel];
}
// Start a "scroll up" timer.
@@ -461,7 +459,6 @@
// Delegate callback.
- (void)windowWillClose:(NSNotification*)notification {
[parentController_ childFolderWillClose:self];
- [[self parentWindow] removeChildWindow:[self window]];
[self closeBookmarkFolder:self];
[self autorelease];
}
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_folder_controller.h ('k') | chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698