summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/window
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/aqua/source/window')
-rw-r--r--vcl/aqua/source/window/salframe.cxx26
-rwxr-xr-xvcl/aqua/source/window/salframeview.mm22
-rw-r--r--vcl/aqua/source/window/salmenu.cxx12
3 files changed, 48 insertions, 12 deletions
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 560d80fd75d5..9c713ea26a52 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -520,8 +520,16 @@ void AquaSalFrame::SetClientSize( long nWidth, long nHeight )
void AquaSalFrame::GetClientSize( long& rWidth, long& rHeight )
{
- rWidth = mbShown ? maGeometry.nWidth : 0;
- rHeight = mbShown ? maGeometry.nHeight : 0;
+ if( mbShown || mbInitShow )
+ {
+ rWidth = maGeometry.nWidth;
+ rHeight = maGeometry.nHeight;
+ }
+ else
+ {
+ rWidth = 0;
+ rHeight = 0;
+ }
}
// -----------------------------------------------------------------------
@@ -1174,7 +1182,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
getAppleScrollBarVariant();
// set scrollbar size
- aStyleSettings.SetScrollBarSize( [NSScroller scrollerWidth] );
+ aStyleSettings.SetScrollBarSize( static_cast<long int>([NSScroller scrollerWidth]) );
// images in menus false for MacOSX
aStyleSettings.SetUseImagesInMenus( false );
@@ -1195,7 +1203,15 @@ const SystemEnvData* AquaSalFrame::GetSystemData() const
void AquaSalFrame::Beep( SoundType eSoundType )
{
- NSBeep();
+ switch( eSoundType )
+ {
+ case SOUND_DISABLE:
+ // don't beep
+ break;
+ default:
+ NSBeep();
+ break;
+ }
}
// -----------------------------------------------------------------------
@@ -1232,7 +1248,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR
if( (nFlags & SAL_FRAME_POSSIZE_WIDTH) != 0 )
nX = mpParent->maGeometry.nWidth - nWidth-1 - nX;
else
- nX = mpParent->maGeometry.nWidth - aContentRect.size.width-1 - nX;
+ nX = mpParent->maGeometry.nWidth - static_cast<long int>( aContentRect.size.width-1) - nX;
}
NSRect aParentFrameRect = [mpParent->mpWindow frame];
aParentContentRect = [NSWindow contentRectForFrameRect: aParentFrameRect styleMask: mpParent->mnStyleMask];
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index 7de43d770385..c7facd8c6c09 100755
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -841,6 +841,16 @@ private:
if( pUnmodifiedString && [pUnmodifiedString length] == 1 )
{
+ /* #i103102# key events with command and alternate don't make it through
+ interpretKeyEvents (why ?). Try to dispatch them here first,
+ if not successful continue normally
+ */
+ if( (mpFrame->mnLastModifierFlags & (NSAlternateKeyMask | NSCommandKeyMask))
+ == (NSAlternateKeyMask | NSCommandKeyMask) )
+ {
+ if( [self sendSingleCharacter: mpLastEvent] )
+ return YES;
+ }
unichar keyChar = [pUnmodifiedString characterAtIndex: 0];
USHORT nKeyCode = ImplMapCharCode( keyChar );
@@ -1242,12 +1252,18 @@ private:
}
}
--(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar
+-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar
{
return [self sendKeyInputAndReleaseToFrame: nKeyCode character: aChar modifiers: mpFrame->mnLastModifierFlags];
}
--(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
+-(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
+{
+ return [self sendKeyToFrameDirect: nKeyCode character: aChar modifiers: nMod] ||
+ [self sendSingleCharacter: mpLastEvent];
+}
+
+-(MacOSBOOL)sendKeyToFrameDirect: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
{
YIELD_GUARD;
@@ -1283,7 +1299,7 @@ private:
// don't send unicodes in the private use area
if( keyChar >= 0xf700 && keyChar < 0xf780 )
keyChar = 0;
- MacOSBOOL bRet = [self sendKeyInputAndReleaseToFrame: nKeyCode character: keyChar];
+ MacOSBOOL bRet = [self sendKeyToFrameDirect: nKeyCode character: keyChar modifiers: mpFrame->mnLastModifierFlags];
mbInKeyInput = false;
return bRet;
diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx
index 4fafbbdbb4cf..5c838701933c 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -651,11 +651,9 @@ void AquaSalMenu::SetItemImage( unsigned nPos, SalMenuItem* pSMI, const Image& r
NSImage* pImage = CreateNSImage( rImage );
+ [pSalMenuItem->mpMenuItem setImage: pImage];
if( pImage )
- {
- [pSalMenuItem->mpMenuItem setImage: pImage];
[pImage release];
- }
}
void AquaSalMenu::SetItemText( unsigned i_nPos, SalMenuItem* i_pSalMenuItem, const XubString& i_rText )
@@ -894,7 +892,13 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_
aRect.origin.x -= i_pReferenceFrame->maGeometry.nX;
aRect.origin.y -= i_pReferenceFrame->maGeometry.nY + aRect.size.height;
- return Rectangle( Point( aRect.origin.x, aRect.origin.y ), Size( aRect.size.width, aRect.size.height ) );
+ return Rectangle( Point(static_cast<long int>(aRect.origin.x),
+ static_cast<long int>(aRect.origin.y)
+ ),
+ Size( static_cast<long int>(aRect.size.width),
+ static_cast<long int>(aRect.size.height)
+ )
+ );
}
// =======================================================================