зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug 325193: sheet shows up in lower left corner of the screen. Fixed by converting it to a modal dialog if its parent window is not visible.
This commit is contained in:
Родитель
face90c3bb
Коммит
cc3ed91dc6
|
@ -398,13 +398,16 @@ const int kLabelCheckboxAdjustment = 2; // # pixels the label must be pushed dow
|
||||||
|
|
||||||
- (int)runModalWindow:(NSWindow*)inDialog relativeToWindow:(NSWindow*)inParentWindow
|
- (int)runModalWindow:(NSWindow*)inDialog relativeToWindow:(NSWindow*)inParentWindow
|
||||||
{
|
{
|
||||||
// If there is already a modal window up, convert a sheet into a modal window,
|
if (inParentWindow)
|
||||||
// because AppKit will hang if you try to do this (possibly because we're using
|
{
|
||||||
// the deprecated and sucky runModalForWindow:relativeToWindow:).
|
// If there is already a modal window up, convert a sheet into a modal window,
|
||||||
// Also, if the parent window already has an attached sheet, also null out
|
// because AppKit will hang if you try to do this (possibly because we're using
|
||||||
// the parent and show this as a modal dialog.
|
// the deprecated and sucky runModalForWindow:relativeToWindow:).
|
||||||
if ([NSApp modalWindow] || (inParentWindow && [inParentWindow attachedSheet]))
|
// Also, if the parent window already has an attached sheet, or is not visible,
|
||||||
inParentWindow = nil;
|
// also null out the parent and show this as a modal dialog.
|
||||||
|
if ([NSApp modalWindow] || [inParentWindow attachedSheet] || ![inParentWindow isVisible])
|
||||||
|
inParentWindow = nil;
|
||||||
|
}
|
||||||
|
|
||||||
int result;
|
int result;
|
||||||
if (inParentWindow)
|
if (inParentWindow)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче