When window is maximized, position of ui seemed to be adjusted by nsNativeThemeWin::GetWidgetPadding().
Bug 1542668 Comment 12 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
When window is maximized, position of ui seemed to be adjusted by nsNativeThemeWin::GetWidgetPadding(). GetWidgetPadding() has the following comment. // XXX Maximized windows have an offscreen offset equal to // the border padding. This should be addressed in nsWindow, // but currently can't be, see UpdateNonClientMargins. https://searchfox.org/mozilla-central/source/widget/windows/nsNativeThemeWin.cpp#2080