diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-08-10 17:15:20 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-08-10 17:15:20 +0000 |
commit | a4a6a27c10d9d78034c759678be0ebf95ff3d76c (patch) | |
tree | 7f56f1334a659bb9de3c763e563fb272c2012c3b | |
parent | ce2bcee6d23561ec0336469246e068ce30fddb80 (diff) |
[Author: thakis]
Unset focus when hiding a per-tab sheet.
This is necessary so that when switching to a new tab using the
cmd-alt-right keyboard shortcut in chromium, the sheet in the previous
tab doesn't keep keyboard focus (which makes breaks cmd-l etc until the
window is clicked -- annoying).
R=thomasvl
DELTA=5 (5 added, 0 deleted, 0 changed)
-rw-r--r-- | AppKit/GTMWindowSheetController.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/AppKit/GTMWindowSheetController.m b/AppKit/GTMWindowSheetController.m index 4307d05..c69c158 100644 --- a/AppKit/GTMWindowSheetController.m +++ b/AppKit/GTMWindowSheetController.m @@ -221,6 +221,9 @@ willPositionSheet:(NSWindow*)sheet [sheetWindow setFrame:NSZeroRect display:NO]; [overlayWindow setIgnoresMouseEvents:YES]; + + // Make sure the now invisible sheet doesn't keep keyboard focus + [[overlayWindow parentWindow] makeKeyWindow]; } activeView_ = view; @@ -248,6 +251,8 @@ willPositionSheet:(NSWindow*)sheet [sheetWindow setAlphaValue:newSheetInfo->sheetAlpha_]; [self viewDidChangeSize:view]; + + [overlayWindow makeKeyWindow]; } } |