Closed Bug 356219 Opened 19 years ago Closed 19 years ago

window.minimize(), window.maximize() and window.restore() are not implemented in cocoa widget

Categories

(Core :: Widget: Cocoa, defect)

PowerPC
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: asaf, Assigned: jaas)

Details

Attachments

(1 file)

window.minimize(), window.maximize() and window.restore() are not implemented in cocoa widget.
Severity: normal → major
Flags: blocking1.9?
Attached patch fix v1.0Splinter Review
This seems to do the trick.
Attachment #241983 - Flags: review?(mano)
Comment on attachment 241983 [details] [diff] [review] fix v1.0 >Index: nsCocoaWindow.mm >=================================================================== >-// zoom/restore >-// > NS_METHOD nsCocoaWindow::SetSizeMode(PRInt32 aMode) > { Note bug 278777 somewhere here. >+ PRInt32 previousMode; >+ nsBaseWidget::GetSizeMode(&previousMode); >+ >+ if (!mWindow || NS_FAILED(nsBaseWidget::SetSizeMode(aMode))) >+ return NS_ERROR_FAILURE; >+ (!mWindow) cannot really happen, please make this >+ nsresult rv = nsBaseWidget::SetSizeMode(aMode); >+ NS_ENSURE_SUCCESS(rv, rv); >+ if (aMode == nsSizeMode_Normal) { >+ if ((previousMode == nsSizeMode_Maximized) && [mWindow isZoomed]) nit: get rid of the extra parentheses. r=mano otherwsie.
Attachment #241983 - Flags: review?(mano) → review+
Attachment #241983 - Flags: superreview?(mikepinkerton)
Comment on attachment 241983 [details] [diff] [review] fix v1.0 rs=pink
Attachment #241983 - Flags: superreview?(mikepinkerton) → superreview+
landed on trunk
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Flags: blocking1.9?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: