fix focus ring clipping with form autocomplete on 10.4. b=417124 r=smichaud sr=roc
This commit is contained in:
Родитель
c3eb9fd13c
Коммит
f8aa5a542c
|
@ -678,8 +678,22 @@ NS_IMETHODIMP nsCocoaWindow::Show(PRBool bState)
|
|||
// the NSApplication class (in header files generated using class-dump).
|
||||
// This workaround was "borrowed" from the Java Embedding Plugin (which
|
||||
// uses it for a different purpose).
|
||||
if (mWindowType == eWindowType_popup)
|
||||
if (mWindowType == eWindowType_popup) {
|
||||
[NSApp _removeWindowFromCache:mWindow];
|
||||
// Apple's focus ring APIs sometimes clip themselves when they draw under
|
||||
// other windows. Redraw the window that was likely under the popup to
|
||||
// get focus rings to draw correctly. Sometimes the window is not properly
|
||||
// the parent of the popup, so we can't just tell the parent to redraw.
|
||||
// We only have this problem on 10.4. See bug 417124.
|
||||
if (!nsToolkit::OnLeopardOrLater()) {
|
||||
NSWindow* keyWindow = [NSApp keyWindow];
|
||||
if (keyWindow)
|
||||
[keyWindow display];
|
||||
NSWindow* mainWindow = [NSApp mainWindow];
|
||||
if (mainWindow && mainWindow != keyWindow)
|
||||
[mainWindow display];
|
||||
}
|
||||
}
|
||||
|
||||
// it's very important to turn off mouse moved events when hiding a window, otherwise
|
||||
// the windows' tracking rects will interfere with each other. (bug 356528)
|
||||
|
|
Загрузка…
Ссылка в новой задаче