зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug 279510: remove all the pre-Carbon code and TARGET_CARBON #idfefs from gfx. Patch by Ludovic Hirlimann <qa-mozilla@hirlimann.net>, r=pink, sr=me
This commit is contained in:
Родитель
9b5c166e58
Коммит
0b4bfa2a81
|
@ -36,11 +36,7 @@
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#include "nsScreenMac.h"
|
#include "nsScreenMac.h"
|
||||||
#if TARGET_CARBON
|
|
||||||
#include <MacWindows.h>
|
#include <MacWindows.h>
|
||||||
#else
|
|
||||||
#include <Menus.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
nsScreenMac :: nsScreenMac ( GDHandle inScreen )
|
nsScreenMac :: nsScreenMac ( GDHandle inScreen )
|
||||||
: mScreen(inScreen)
|
: mScreen(inScreen)
|
||||||
|
@ -81,11 +77,7 @@ nsScreenMac :: GetAvailRect(PRInt32 *outLeft, PRInt32 *outTop, PRInt32 *outWidth
|
||||||
{
|
{
|
||||||
Rect adjustedRect;
|
Rect adjustedRect;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
|
||||||
::GetAvailableWindowPositioningBounds ( mScreen, &adjustedRect );
|
::GetAvailableWindowPositioningBounds ( mScreen, &adjustedRect );
|
||||||
#else
|
|
||||||
SubtractMenuBar ( (**mScreen).gdRect, &adjustedRect );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
*outLeft = adjustedRect.left;
|
*outLeft = adjustedRect.left;
|
||||||
*outTop = adjustedRect.top;
|
*outTop = adjustedRect.top;
|
||||||
|
@ -115,23 +107,3 @@ nsScreenMac :: GetColorDepth(PRInt32 *aColorDepth)
|
||||||
|
|
||||||
} // GetColorDepth
|
} // GetColorDepth
|
||||||
|
|
||||||
|
|
||||||
#if !TARGET_CARBON
|
|
||||||
|
|
||||||
//
|
|
||||||
// SubtractMenuBar
|
|
||||||
//
|
|
||||||
// Take out the menu bar from the reported size of this screen, but only
|
|
||||||
// if it is the primary screen
|
|
||||||
//
|
|
||||||
void
|
|
||||||
nsScreenMac :: SubtractMenuBar ( const Rect & inScreenRect, Rect* outAdjustedRect )
|
|
||||||
{
|
|
||||||
// if the screen we're being asked about is the main screen (ie, has the menu
|
|
||||||
// bar), then subract out the menubar from the rect that we're returning.
|
|
||||||
*outAdjustedRect = inScreenRect;
|
|
||||||
if ( IsPrimaryScreen() )
|
|
||||||
outAdjustedRect->top += ::GetMBarHeight();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -55,11 +55,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
#if !TARGET_CARBON
|
|
||||||
// Take out the menu bar from the reported size of this screen.
|
|
||||||
void SubtractMenuBar ( const Rect & inScreenRect, Rect* outAdjustedRect ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// are we the primary screen? Needed so we can sub out the menubar if
|
// are we the primary screen? Needed so we can sub out the menubar if
|
||||||
// asked.
|
// asked.
|
||||||
PRBool IsPrimaryScreen ( ) const { return (mScreen == ::GetMainDevice()); }
|
PRBool IsPrimaryScreen ( ) const { return (mScreen == ::GetMainDevice()); }
|
||||||
|
|
Загрузка…
Ссылка в новой задаче