Closed Bug 733627 Opened 12 years ago Closed 12 years ago

nsWindow::GetNonClientMargins() is using ::GetSystemMetrics(SM_CYFRAME) for both horizontal and vertical borders

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 7
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: masayuki, Assigned: jhk)

Details

(Whiteboard: [good first bug][mentor=masayuki][lang=c++])

Attachments

(1 file)

http://mxr.mozilla.org/mozilla-central/source/widget/windows/nsWindow.cpp#1933

1932 NS_IMETHODIMP
1933 nsWindow::GetNonClientMargins(nsIntMargin &margins)
1934 {
1935   nsWindow * window = GetTopLevelWindow(true);
1936   if (window && window != this) {
1937     return window->GetNonClientMargins(margins);
1938   }
1939 
1940   if (mCustomNonClient) {
1941     margins = mNonClientMargins;
1942     return NS_OK;
1943   }
1944 
1945   margins.top = GetSystemMetrics(SM_CYCAPTION);
1946   margins.bottom = GetSystemMetrics(SM_CYFRAME);
1947   margins.top += margins.bottom;
1948   margins.left = margins.right = GetSystemMetrics(SM_CYFRAME);
1949 
1950   return NS_OK;
1951 }

#1948 should be SM_CXFRAME.

I don't know how to set different size for both borders.
> I don't know how to set different size for both borders.
Long time ago, device pixels were not square on some video modes. (such as CGA 640 x 200 mode)
Whiteboard: [good first bug]
Whiteboard: [good first bug] → [good first bug][mentor=masayuki][lang=c++]
Attached patch Patch(v1)Splinter Review
Attachment #631355 - Flags: feedback?(masayuki)
Comment on attachment 631355 [details] [diff] [review]
Patch(v1)

Thank you for the patch. I think this is right. Requesting r to jimm.
Attachment #631355 - Flags: review?(jmathies)
Attachment #631355 - Flags: feedback?(masayuki)
Attachment #631355 - Flags: feedback+
Attachment #631355 - Flags: review?(jmathies) → review+
Landed on inbound. It'll be merged to mozilla-central in a day if it passes all tests.
https://hg.mozilla.org/integration/mozilla-inbound/rev/cf39986528f8

Thank you.
Assignee: nobody → jigneshhk1992
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/cf39986528f8
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: