summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/window
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-16 21:32:10 +0200
committerTor Lillqvist <tml@iki.fi>2013-03-16 21:32:10 +0200
commit861fc6ce60171e964e68bcb7681626fe28fd1cb2 (patch)
tree886a99fae8d55bd44b2a8613c389bc6aa8c6f71a /vcl/unx/generic/window
parentec4977278ba3d153f0913c72450e72a6ed21d593 (diff)
Bin some pointless comments and ASCII graphics
Change-Id: Ib7b176eb1889ebd94d4b628899011de9ebbb3dbd
Diffstat (limited to 'vcl/unx/generic/window')
-rw-r--r--vcl/unx/generic/window/salframe.cxx82
1 files changed, 7 insertions, 75 deletions
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 50f2aef1d185..524717b558c1 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -78,7 +78,6 @@
using namespace vcl_sal;
using namespace vcl;
-// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#define CLIENT_EVENTS StructureNotifyMask \
| SubstructureNotifyMask \
| KeyPressMask \
@@ -94,14 +93,10 @@ using namespace vcl;
| PropertyChangeMask \
| ColormapChangeMask
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
static XLIB_Window hPresentationWindow = None, hPresFocusWindow = None;
static ::std::list< XLIB_Window > aPresentationReparentList;
static int nVisibleFloats = 0;
-// -=-= C++ statics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
static void doReparentPresentationDialogues( SalDisplay* pDisplay )
{
GetGenericData()->ErrorTrapPush();
@@ -132,9 +127,6 @@ static void doReparentPresentationDialogues( SalDisplay* pDisplay )
GetGenericData()->ErrorTrapPop();
}
-// -=-= SalFrame / X11SalFrame =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
bool X11SalFrame::IsOverrideRedirect() const
{
return
@@ -199,9 +191,6 @@ void X11SalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
GetGenericData()->ErrorTrapPop();
}
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemParentData* pParentData, bool bUseGeometry )
{
if( nXScreen.getXScreen() >= GetDisplay()->GetXScreenCount() )
@@ -622,7 +611,6 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
SetPointer( POINTER_ARROW );
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
X11SalFrame::X11SalFrame( SalFrame *pParent, sal_uLong nSalFrameStyle,
SystemParentData* pSystemParent ) :
m_nXScreen( 0 )
@@ -784,8 +772,6 @@ X11SalFrame::~X11SalFrame()
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
void X11SalFrame::SetExtendedFrameStyle( SalExtStyle nStyle )
{
if( nStyle != mnExtStyle && ! IsChildWindow() )
@@ -795,8 +781,6 @@ void X11SalFrame::SetExtendedFrameStyle( SalExtStyle nStyle )
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
const SystemChildData* X11SalFrame::GetSystemData() const
{
X11SalFrame *pFrame = const_cast<X11SalFrame*>(this);
@@ -854,15 +838,11 @@ void X11SalFrame::updateGraphics( bool bClear )
pFreeGraphics_->SetDrawable( aDrawable, m_nXScreen );
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
void X11SalFrame::Enable( sal_Bool /*bEnable*/ )
{
// NYI: enable/disable frame
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
void X11SalFrame::SetIcon( sal_uInt16 nIcon )
{
if ( ! IsChildWindow() )
@@ -972,8 +952,6 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon )
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight )
{
if( ! IsChildWindow() )
@@ -1023,7 +1001,7 @@ void X11SalFrame::SetMinClientSize( long nWidth, long nHeight )
}
// Show + Pos (x,y,z) + Size (width,height)
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
void X11SalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
{
if( ( bVisible && bMapped_ )
@@ -1248,7 +1226,6 @@ void X11SalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::ToTop( sal_uInt16 nFlags )
{
if( ( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN )
@@ -1282,12 +1259,12 @@ void X11SalFrame::ToTop( sal_uInt16 nFlags )
XSetInputFocus( GetXDisplay(), aToTopWindow, RevertToParent, CurrentTime );
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
void X11SalFrame::GetWorkArea( Rectangle& rWorkArea )
{
rWorkArea = pDisplay_->getWMAdaptor()->getWorkArea( 0 );
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
void X11SalFrame::GetClientSize( long &rWidth, long &rHeight )
{
if( ! bViewable_ )
@@ -1310,8 +1287,6 @@ void X11SalFrame::GetClientSize( long &rWidth, long &rHeight )
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
void X11SalFrame::Center( )
{
int nX, nY, nScreenWidth, nScreenHeight;
@@ -1427,7 +1402,6 @@ void X11SalFrame::Center( )
SetPosSize( Rectangle( aPoint, Size( maGeometry.nWidth, maGeometry.nHeight ) ) );
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::updateScreenNumber()
{
if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 )
@@ -1448,7 +1422,6 @@ void X11SalFrame::updateScreenNumber()
maGeometry.nDisplayScreenNumber = m_nXScreen.getXScreen();
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
if( nStyle_ & SAL_FRAME_STYLE_PLUG )
@@ -1494,7 +1467,6 @@ void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
bDefaultPosition_ = False;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::SetAlwaysOnTop( sal_Bool bOnTop )
{
if( ! IsOverrideRedirect() )
@@ -1504,8 +1476,6 @@ void X11SalFrame::SetAlwaysOnTop( sal_Bool bOnTop )
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
#define _FRAMESTATE_MASK_GEOMETRY \
(SAL_FRAMESTATE_MASK_X | SAL_FRAMESTATE_MASK_Y | \
SAL_FRAMESTATE_MASK_WIDTH | SAL_FRAMESTATE_MASK_HEIGHT)
@@ -1664,7 +1634,6 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
sal_Bool X11SalFrame::GetWindowState( SalFrameState* pState )
{
if( SHOWSTATE_MINIMIZED == nShowState_ )
@@ -1707,8 +1676,6 @@ sal_Bool X11SalFrame::GetWindowState( SalFrameState* pState )
return sal_True;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
// native menu implementation - currently empty
void X11SalFrame::DrawMenuBar()
{
@@ -1718,7 +1685,6 @@ void X11SalFrame::SetMenu( SalMenu* )
{
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::GetPosSize( Rectangle &rPosSize )
{
if( maGeometry.nWidth < 1 || maGeometry.nHeight < 1 )
@@ -1734,7 +1700,6 @@ void X11SalFrame::GetPosSize( Rectangle &rPosSize )
Size( maGeometry.nWidth, maGeometry.nHeight ) );
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::SetSize( const Size &rSize )
{
if( rSize.Width() > 0 && rSize.Height() > 0 )
@@ -1778,10 +1743,6 @@ void X11SalFrame::SetSize( const Size &rSize )
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
{
XWindowChanges values;
@@ -1903,7 +1864,6 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
mpInputContext->SetICFocus ( this );
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::Minimize()
{
if( IsSysChildWindow() )
@@ -1921,7 +1881,6 @@ void X11SalFrame::Minimize()
nShowState_ = SHOWSTATE_MINIMIZED;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::Maximize()
{
if( IsSysChildWindow() )
@@ -1937,7 +1896,6 @@ void X11SalFrame::Maximize()
pDisplay_->getWMAdaptor()->maximizeFrame( this, true, true );
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::Restore()
{
if( IsSysChildWindow() )
@@ -1959,8 +1917,6 @@ void X11SalFrame::Restore()
pDisplay_->getWMAdaptor()->maximizeFrame( this, false, false );
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
void X11SalFrame::SetScreenNumber( unsigned int nNewScreen )
{
if( nNewScreen == maGeometry.nDisplayScreenNumber )
@@ -2022,9 +1978,6 @@ void X11SalFrame::updateWMClass()
XFree( pClass );
}
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
void X11SalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nScreen )
{
if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 )
@@ -2176,7 +2129,6 @@ MessageToXAutoLock( Display *p_display, int n_message )
return True;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::StartPresentation( sal_Bool bStart )
{
I18NStatus::get().show( !bStart, I18NStatus::presentation );
@@ -2288,7 +2240,7 @@ void X11SalFrame::StartPresentation( sal_Bool bStart )
}
// Pointer
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
void X11SalFrame::SetPointer( PointerStyle ePointerStyle )
{
hCursor_ = pDisplay_->GetPointer( ePointerStyle );
@@ -2344,7 +2296,7 @@ X11SalFrame::HandleExtTextEvent (XClientMessageEvent *pEvent)
#endif /* defined(__synchronous_extinput__) */
// PostEvent
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
sal_Bool X11SalFrame::PostEvent( void *pData )
{
GetDisplay()->SendInternalEvent( this, pData );
@@ -2352,7 +2304,7 @@ sal_Bool X11SalFrame::PostEvent( void *pData )
}
// Title
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
void X11SalFrame::SetTitle( const rtl::OUString& rTitle )
{
if( ! ( IsChildWindow() || (nStyle_ & SAL_FRAME_STYLE_FLOAT ) ) )
@@ -2377,9 +2329,6 @@ void X11SalFrame::Sync()
}
// Keyboard
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-// -----------------------------------------------------------------------
void X11SalFrame::SetInputContext( SalInputContext* pContext )
{
@@ -2446,7 +2395,6 @@ LanguageType X11SalFrame::GetInputLanguage()
}
// Settings
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
inline Color getColorFromLong( long nColor )
{
@@ -2465,8 +2413,6 @@ void X11SalFrame::CaptureMouse( sal_Bool bCapture )
nCaptured_ = pDisplay_->CaptureMouse( bCapture ? this : NULL );
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
void X11SalFrame::SetParent( SalFrame* pNewParent )
{
if( mpParent != pNewParent )
@@ -2577,7 +2523,7 @@ bool X11SalFrame::SetPluginParent( SystemParentData* pNewParent )
}
// Event Handling
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
static sal_uInt16 sal_GetCode( int state )
{
sal_uInt16 nCode = 0;
@@ -2604,8 +2550,6 @@ static sal_uInt16 sal_GetCode( int state )
return nCode;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
SalFrame::SalPointerState X11SalFrame::GetPointerState()
{
SalPointerState aState;
@@ -3024,7 +2968,6 @@ bool X11SalFrame::endUnicodeSequence()
return bWasInput;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
{
KeySym nKeySym;
@@ -3305,8 +3248,6 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
return True;
}
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
{
// ReflectionX in Windows mode changes focus while mouse is grabbed
@@ -3376,8 +3317,6 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
return 0;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
long X11SalFrame::HandleExposeEvent( XEvent *pEvent )
{
XRectangle aRect = { 0, 0, 0, 0 };
@@ -3508,7 +3447,6 @@ void X11SalFrame::setPendingSizeEvent()
mPendingSizeEvent = true;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
{
// NOTE: if you add more tests in this function, make sure to update size_event_predicate()
@@ -3603,7 +3541,6 @@ IMPL_LINK_NOARG(X11SalFrame, HandleAlwaysOnTopRaise)
return 0;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
{
Display *pDisplay = pEvent->display;
@@ -3797,13 +3734,11 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
return 1;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleColormapEvent( XColormapEvent* )
{
return 0;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent )
{
Atom actual_type;
@@ -3841,7 +3776,6 @@ long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent )
return 1;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
{
const WMAdaptor& rWMAdaptor( *pDisplay_->getWMAdaptor() );
@@ -3903,8 +3837,6 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
return 0;
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
extern "C"
{
Bool call_checkKeyReleaseForRepeat( Display* pDisplay, XEvent* pCheck, XPointer pX11SalFrame )