SalFrame Handle* methods can return bool
Change-Id: Ia28463e1c83aa496e8c389d1614f9b8a78100994 Reviewed-on: https://gerrit.libreoffice.org/41209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -272,8 +272,8 @@ public:
|
|||||||
// Call the callback set; this sometimes necessary for implementation classes
|
// Call the callback set; this sometimes necessary for implementation classes
|
||||||
// that should not know more than necessary about the SalFrame implementation
|
// that should not know more than necessary about the SalFrame implementation
|
||||||
// (e.g. input methods, printer update handlers).
|
// (e.g. input methods, printer update handlers).
|
||||||
long CallCallback( SalEvent nEvent, const void* pEvent ) const
|
bool CallCallback( SalEvent nEvent, const void* pEvent ) const
|
||||||
{ return m_pProc ? long(m_pProc( m_pWindow, nEvent, pEvent )) : 0; }
|
{ return m_pProc && m_pProc( m_pWindow, nEvent, pEvent ); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@@ -546,7 +546,7 @@ public:
|
|||||||
//to GtkData to rethrow them after the gsignal is processed when its safe
|
//to GtkData to rethrow them after the gsignal is processed when its safe
|
||||||
//to do so again in our own code after the g_main_context_iteration call
|
//to do so again in our own code after the g_main_context_iteration call
|
||||||
//which triggers the gsignals.
|
//which triggers the gsignals.
|
||||||
long CallCallbackExc(SalEvent nEvent, const void* pEvent) const;
|
bool CallCallbackExc(SalEvent nEvent, const void* pEvent) const;
|
||||||
|
|
||||||
|
|
||||||
static void KeyCodeToGdkKey(const vcl::KeyCode& rKeyCode,
|
static void KeyCodeToGdkKey(const vcl::KeyCode& rKeyCode,
|
||||||
|
@@ -146,14 +146,14 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public NativeWindowHandl
|
|||||||
void RestackChildren( ::Window* pTopLevelWindows, int nTopLevelWindows );
|
void RestackChildren( ::Window* pTopLevelWindows, int nTopLevelWindows );
|
||||||
void RestackChildren();
|
void RestackChildren();
|
||||||
|
|
||||||
long HandleKeyEvent ( XKeyEvent *pEvent );
|
bool HandleKeyEvent ( XKeyEvent *pEvent );
|
||||||
long HandleMouseEvent ( XEvent *pEvent );
|
bool HandleMouseEvent ( XEvent *pEvent );
|
||||||
long HandleFocusEvent ( XFocusChangeEvent const *pEvent );
|
bool HandleFocusEvent ( XFocusChangeEvent const *pEvent );
|
||||||
long HandleExposeEvent ( XEvent *pEvent );
|
bool HandleExposeEvent ( XEvent *pEvent );
|
||||||
long HandleSizeEvent ( XConfigureEvent *pEvent );
|
bool HandleSizeEvent ( XConfigureEvent *pEvent );
|
||||||
long HandleStateEvent ( XPropertyEvent *pEvent );
|
bool HandleStateEvent ( XPropertyEvent *pEvent );
|
||||||
long HandleReparentEvent ( XReparentEvent *pEvent );
|
bool HandleReparentEvent ( XReparentEvent *pEvent );
|
||||||
long HandleClientMessage ( XClientMessageEvent*pEvent );
|
bool HandleClientMessage ( XClientMessageEvent*pEvent );
|
||||||
|
|
||||||
DECL_LINK( HandleAlwaysOnTopRaise, Timer*, void );
|
DECL_LINK( HandleAlwaysOnTopRaise, Timer*, void );
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ public:
|
|||||||
X11SalFrame( SalFrame* pParent, SalFrameStyleFlags nSalFrameStyle, SystemParentData* pSystemParent = nullptr );
|
X11SalFrame( SalFrame* pParent, SalFrameStyleFlags nSalFrameStyle, SystemParentData* pSystemParent = nullptr );
|
||||||
virtual ~X11SalFrame() override;
|
virtual ~X11SalFrame() override;
|
||||||
|
|
||||||
long Dispatch( XEvent *pEvent );
|
bool Dispatch( XEvent *pEvent );
|
||||||
void Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nScreen,
|
void Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nScreen,
|
||||||
SystemParentData* pParentData, bool bUseGeometry = false );
|
SystemParentData* pParentData, bool bUseGeometry = false );
|
||||||
|
|
||||||
|
@@ -2624,14 +2624,14 @@ Bool compressWheelEvents( Display*, XEvent* event, XPointer p )
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
|
bool X11SalFrame::HandleMouseEvent( XEvent *pEvent )
|
||||||
{
|
{
|
||||||
SalMouseEvent aMouseEvt = {0, 0, 0, 0, 0};
|
SalMouseEvent aMouseEvt = {0, 0, 0, 0, 0};
|
||||||
SalEvent nEvent = SalEvent::NONE;
|
SalEvent nEvent = SalEvent::NONE;
|
||||||
bool bClosePopups = false;
|
bool bClosePopups = false;
|
||||||
|
|
||||||
if( nVisibleFloats && pEvent->type == EnterNotify )
|
if( nVisibleFloats && pEvent->type == EnterNotify )
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
if( LeaveNotify == pEvent->type || EnterNotify == pEvent->type )
|
if( LeaveNotify == pEvent->type || EnterNotify == pEvent->type )
|
||||||
{
|
{
|
||||||
@@ -2650,7 +2650,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
|
|||||||
* hopefully this workaround will not break anything.
|
* hopefully this workaround will not break anything.
|
||||||
*/
|
*/
|
||||||
if( pEvent->xcrossing.mode == NotifyGrab || pEvent->xcrossing.mode == NotifyUngrab )
|
if( pEvent->xcrossing.mode == NotifyGrab || pEvent->xcrossing.mode == NotifyUngrab )
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
aMouseEvt.mnX = pEvent->xcrossing.x;
|
aMouseEvt.mnX = pEvent->xcrossing.x;
|
||||||
aMouseEvt.mnY = pEvent->xcrossing.y;
|
aMouseEvt.mnY = pEvent->xcrossing.y;
|
||||||
@@ -2797,7 +2797,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
|
|||||||
pEvent->xbutton.button == Button7 );
|
pEvent->xbutton.button == Button7 );
|
||||||
|
|
||||||
if( pEvent->type == ButtonRelease )
|
if( pEvent->type == ButtonRelease )
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
static sal_uLong nLines = 0;
|
static sal_uLong nLines = 0;
|
||||||
if( ! nLines )
|
if( ! nLines )
|
||||||
@@ -2836,7 +2836,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int nRet = 0;
|
bool nRet = false;
|
||||||
if( nEvent == SalEvent::MouseLeave
|
if( nEvent == SalEvent::MouseLeave
|
||||||
|| ( aMouseEvt.mnX < nWidth_ && aMouseEvt.mnX > -1 &&
|
|| ( aMouseEvt.mnX < nWidth_ && aMouseEvt.mnX > -1 &&
|
||||||
aMouseEvt.mnY < nHeight_ && aMouseEvt.mnY > -1 )
|
aMouseEvt.mnY < nHeight_ && aMouseEvt.mnY > -1 )
|
||||||
@@ -2973,7 +2973,7 @@ bool X11SalFrame::endUnicodeSequence()
|
|||||||
return bWasInput;
|
return bWasInput;
|
||||||
}
|
}
|
||||||
|
|
||||||
long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
|
bool X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
|
||||||
{
|
{
|
||||||
if( pEvent->type == KeyRelease )
|
if( pEvent->type == KeyRelease )
|
||||||
{
|
{
|
||||||
@@ -3032,7 +3032,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( ignore ) // This autorepeating keyrelease is followed by another keypress.
|
if( ignore ) // This autorepeating keyrelease is followed by another keypress.
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
KeySym nKeySym;
|
KeySym nKeySym;
|
||||||
@@ -3065,12 +3065,12 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
|
|||||||
{
|
{
|
||||||
// fallback, this should never ever be called
|
// fallback, this should never ever be called
|
||||||
Status nStatus = 0;
|
Status nStatus = 0;
|
||||||
nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen, &nUnmodifiedKeySym, &nStatus );
|
nKeySym = pDisplay_->GetKeySym( pEvent, pPrintable, &nLen, &nUnmodifiedKeySym, &nStatus );
|
||||||
}
|
}
|
||||||
|
|
||||||
SalKeyEvent aKeyEvt;
|
SalKeyEvent aKeyEvt;
|
||||||
sal_uInt16 nKeyCode;
|
sal_uInt16 nKeyCode;
|
||||||
sal_uInt16 nModCode = 0;
|
sal_uInt16 nModCode = 0;
|
||||||
char aDummy;
|
char aDummy;
|
||||||
|
|
||||||
if( pEvent->state & ShiftMask )
|
if( pEvent->state & ShiftMask )
|
||||||
@@ -3087,7 +3087,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
|
|||||||
|| nKeySym == XK_Control_L || nKeySym == XK_Control_R
|
|| nKeySym == XK_Control_L || nKeySym == XK_Control_R
|
||||||
|| nKeySym == XK_Alt_L || nKeySym == XK_Alt_R
|
|| nKeySym == XK_Alt_L || nKeySym == XK_Alt_R
|
||||||
|| nKeySym == XK_Meta_L || nKeySym == XK_Meta_R
|
|| nKeySym == XK_Meta_L || nKeySym == XK_Meta_R
|
||||||
|| nKeySym == XK_Super_L || nKeySym == XK_Super_R )
|
|| nKeySym == XK_Super_L || nKeySym == XK_Super_R )
|
||||||
{
|
{
|
||||||
SalKeyModEvent aModEvt;
|
SalKeyModEvent aModEvt;
|
||||||
aModEvt.mbDown = false; // auto-accelerator feature not supported here.
|
aModEvt.mbDown = false; // auto-accelerator feature not supported here.
|
||||||
@@ -3158,9 +3158,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
|
|||||||
|
|
||||||
aModEvt.mnCode = nModCode;
|
aModEvt.mnCode = nModCode;
|
||||||
|
|
||||||
int nRet = CallCallback( SalEvent::KeyModChange, &aModEvt );
|
return CallCallback( SalEvent::KeyModChange, &aModEvt );
|
||||||
|
|
||||||
return nRet;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mbSendExtKeyModChange = false;
|
mbSendExtKeyModChange = false;
|
||||||
@@ -3185,7 +3183,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
|
|||||||
nKeyString = KeysymToUnicode (nKeySym);
|
nKeyString = KeysymToUnicode (nKeySym);
|
||||||
// if we have nothing we give up
|
// if we have nothing we give up
|
||||||
if( !nKeyCode && !nLen && !nKeyString)
|
if( !nKeyCode && !nLen && !nKeyString)
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
vcl::DeletionListener aDeleteWatch( this );
|
vcl::DeletionListener aDeleteWatch( this );
|
||||||
|
|
||||||
@@ -3195,24 +3193,24 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
|
|||||||
if( nSeqKeyCode == KEY_U )
|
if( nSeqKeyCode == KEY_U )
|
||||||
{
|
{
|
||||||
beginUnicodeSequence();
|
beginUnicodeSequence();
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
else if( nSeqKeyCode >= KEY_0 && nSeqKeyCode <= KEY_9 )
|
else if( nSeqKeyCode >= KEY_0 && nSeqKeyCode <= KEY_9 )
|
||||||
{
|
{
|
||||||
if( appendUnicodeSequence( u'0' + sal_Unicode(nSeqKeyCode - KEY_0) ) )
|
if( appendUnicodeSequence( u'0' + sal_Unicode(nSeqKeyCode - KEY_0) ) )
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
else if( nSeqKeyCode >= KEY_A && nSeqKeyCode <= KEY_F )
|
else if( nSeqKeyCode >= KEY_A && nSeqKeyCode <= KEY_F )
|
||||||
{
|
{
|
||||||
if( appendUnicodeSequence( u'a' + sal_Unicode(nSeqKeyCode - KEY_A) ) )
|
if( appendUnicodeSequence( u'a' + sal_Unicode(nSeqKeyCode - KEY_A) ) )
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
endUnicodeSequence();
|
endUnicodeSequence();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aDeleteWatch.isDeleted() )
|
if( aDeleteWatch.isDeleted() )
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
rtl_TextEncoding nEncoding = osl_getThreadTextEncoding();
|
rtl_TextEncoding nEncoding = osl_getThreadTextEncoding();
|
||||||
|
|
||||||
@@ -3311,14 +3309,14 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
|
|||||||
}
|
}
|
||||||
|
|
||||||
free (pBuffer);
|
free (pBuffer);
|
||||||
return True;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
long X11SalFrame::HandleFocusEvent( XFocusChangeEvent const *pEvent )
|
bool X11SalFrame::HandleFocusEvent( XFocusChangeEvent const *pEvent )
|
||||||
{
|
{
|
||||||
// ReflectionX in Windows mode changes focus while mouse is grabbed
|
// ReflectionX in Windows mode changes focus while mouse is grabbed
|
||||||
if( nVisibleFloats > 0 && GetDisplay()->getWMAdaptor()->getWindowManagerName() == "ReflectionX Windows" )
|
if( nVisibleFloats > 0 && GetDisplay()->getWMAdaptor()->getWindowManagerName() == "ReflectionX Windows" )
|
||||||
return 1;
|
return true;
|
||||||
|
|
||||||
/* ignore focusout resulting from keyboard grabs
|
/* ignore focusout resulting from keyboard grabs
|
||||||
* we do not grab it and are not interested when
|
* we do not grab it and are not interested when
|
||||||
@@ -3350,7 +3348,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent const *pEvent )
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
if( hPresentationWindow != None && hPresentationWindow != GetShellWindow() )
|
if( hPresentationWindow != None && hPresentationWindow != GetShellWindow() )
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
if( FocusIn == pEvent->type )
|
if( FocusIn == pEvent->type )
|
||||||
{
|
{
|
||||||
@@ -3358,7 +3356,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent const *pEvent )
|
|||||||
mbInputFocus = True;
|
mbInputFocus = True;
|
||||||
ImplSVData* pSVData = ImplGetSVData();
|
ImplSVData* pSVData = ImplGetSVData();
|
||||||
|
|
||||||
long nRet = CallCallback( SalEvent::GetFocus, nullptr );
|
bool nRet = CallCallback( SalEvent::GetFocus, nullptr );
|
||||||
if ((mpParent != nullptr && nStyle_ == SalFrameStyleFlags::NONE)
|
if ((mpParent != nullptr && nStyle_ == SalFrameStyleFlags::NONE)
|
||||||
&& pSVData->maWinData.mpFirstFloat )
|
&& pSVData->maWinData.mpFirstFloat )
|
||||||
{
|
{
|
||||||
@@ -3377,13 +3375,13 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent const *pEvent )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
long X11SalFrame::HandleExposeEvent( XEvent *pEvent )
|
bool X11SalFrame::HandleExposeEvent( XEvent *pEvent )
|
||||||
{
|
{
|
||||||
XRectangle aRect = { 0, 0, 0, 0 };
|
XRectangle aRect = { 0, 0, 0, 0 };
|
||||||
sal_uInt16 nCount = 0;
|
sal_uInt16 nCount = 0;
|
||||||
|
|
||||||
if( pEvent->type == Expose )
|
if( pEvent->type == Expose )
|
||||||
{
|
{
|
||||||
@@ -3414,14 +3412,14 @@ long X11SalFrame::HandleExposeEvent( XEvent *pEvent )
|
|||||||
if( nCount )
|
if( nCount )
|
||||||
// wait for last expose rectangle, do not wait for resize timer
|
// wait for last expose rectangle, do not wait for resize timer
|
||||||
// if a completed graphics expose sequence is available
|
// if a completed graphics expose sequence is available
|
||||||
return 1;
|
return true;
|
||||||
|
|
||||||
SalPaintEvent aPEvt( maPaintRegion.Left(), maPaintRegion.Top(), maPaintRegion.GetWidth(), maPaintRegion.GetHeight() );
|
SalPaintEvent aPEvt( maPaintRegion.Left(), maPaintRegion.Top(), maPaintRegion.GetWidth(), maPaintRegion.GetHeight() );
|
||||||
|
|
||||||
CallCallback( SalEvent::Paint, &aPEvt );
|
CallCallback( SalEvent::Paint, &aPEvt );
|
||||||
maPaintRegion = tools::Rectangle();
|
maPaintRegion = tools::Rectangle();
|
||||||
|
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void X11SalFrame::RestackChildren( ::Window* pTopLevelWindows, int nTopLevelWindows )
|
void X11SalFrame::RestackChildren( ::Window* pTopLevelWindows, int nTopLevelWindows )
|
||||||
@@ -3509,7 +3507,7 @@ void X11SalFrame::setPendingSizeEvent()
|
|||||||
mPendingSizeEvent = true;
|
mPendingSizeEvent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
|
bool X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
|
||||||
{
|
{
|
||||||
// NOTE: if you add more tests in this function, make sure to update size_event_predicate()
|
// NOTE: if you add more tests in this function, make sure to update size_event_predicate()
|
||||||
// so that it finds exactly the same events
|
// so that it finds exactly the same events
|
||||||
@@ -3521,14 +3519,14 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// could be as well a sys-child window (aka SalObject)
|
// could be as well a sys-child window (aka SalObject)
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ( nStyle_ & SalFrameStyleFlags::PLUG ) && pEvent->window == GetShellWindow() )
|
if( ( nStyle_ & SalFrameStyleFlags::PLUG ) && pEvent->window == GetShellWindow() )
|
||||||
{
|
{
|
||||||
// just update the children's positions
|
// just update the children's positions
|
||||||
RestackChildren();
|
RestackChildren();
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pEvent->window == GetForeignParent() )
|
if( pEvent->window == GetForeignParent() )
|
||||||
@@ -3553,7 +3551,7 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
|
|||||||
maGeometry.nY = pEvent->y;
|
maGeometry.nY = pEvent->y;
|
||||||
CallCallback( SalEvent::Move, nullptr );
|
CallCallback( SalEvent::Move, nullptr );
|
||||||
}
|
}
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check size hints in first time SalFrame::Show
|
// check size hints in first time SalFrame::Show
|
||||||
@@ -3568,7 +3566,7 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
|
|||||||
XEvent dummy;
|
XEvent dummy;
|
||||||
XCheckIfEvent( GetXDisplay(), &dummy, size_event_predicate, reinterpret_cast< XPointer >( this ));
|
XCheckIfEvent( GetXDisplay(), &dummy, size_event_predicate, reinterpret_cast< XPointer >( this ));
|
||||||
if( mPendingSizeEvent )
|
if( mPendingSizeEvent )
|
||||||
return 1;
|
return true;
|
||||||
|
|
||||||
nWidth_ = pEvent->width;
|
nWidth_ = pEvent->width;
|
||||||
nHeight_ = pEvent->height;
|
nHeight_ = pEvent->height;
|
||||||
@@ -3592,7 +3590,7 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
|
|||||||
else if( bMoved && bSized )
|
else if( bMoved && bSized )
|
||||||
CallCallback( SalEvent::MoveResize, nullptr );
|
CallCallback( SalEvent::MoveResize, nullptr );
|
||||||
|
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(X11SalFrame, HandleAlwaysOnTopRaise, Timer *, void)
|
IMPL_LINK_NOARG(X11SalFrame, HandleAlwaysOnTopRaise, Timer *, void)
|
||||||
@@ -3601,7 +3599,7 @@ IMPL_LINK_NOARG(X11SalFrame, HandleAlwaysOnTopRaise, Timer *, void)
|
|||||||
ToTop( SalFrameToTop::NONE );
|
ToTop( SalFrameToTop::NONE );
|
||||||
}
|
}
|
||||||
|
|
||||||
long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
|
bool X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
|
||||||
{
|
{
|
||||||
Display *pDisplay = pEvent->display;
|
Display *pDisplay = pEvent->display;
|
||||||
::Window hWM_Parent;
|
::Window hWM_Parent;
|
||||||
@@ -3668,7 +3666,7 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
|
|||||||
aPresentationReparentList.remove( GetStackingWindow() );
|
aPresentationReparentList.remove( GetStackingWindow() );
|
||||||
mhStackingWindow = None;
|
mhStackingWindow = None;
|
||||||
GetGenericData()->ErrorTrapPop();
|
GetGenericData()->ErrorTrapPop();
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3782,10 +3780,10 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
|
|||||||
|
|
||||||
GetGenericData()->ErrorTrapPop();
|
GetGenericData()->ErrorTrapPop();
|
||||||
|
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent )
|
bool X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent )
|
||||||
{
|
{
|
||||||
Atom actual_type;
|
Atom actual_type;
|
||||||
int actual_format;
|
int actual_format;
|
||||||
@@ -3806,7 +3804,7 @@ long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent )
|
|||||||
&prop )
|
&prop )
|
||||||
|| ! prop
|
|| ! prop
|
||||||
)
|
)
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
DBG_ASSERT( actual_type == pEvent->atom
|
DBG_ASSERT( actual_type == pEvent->atom
|
||||||
&& 32 == actual_format
|
&& 32 == actual_format
|
||||||
@@ -3819,10 +3817,10 @@ long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent )
|
|||||||
nShowState_ = SHOWSTATE_MINIMIZED;
|
nShowState_ = SHOWSTATE_MINIMIZED;
|
||||||
|
|
||||||
XFree( prop );
|
XFree( prop );
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
|
bool X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
|
||||||
{
|
{
|
||||||
const WMAdaptor& rWMAdaptor( *pDisplay_->getWMAdaptor() );
|
const WMAdaptor& rWMAdaptor( *pDisplay_->getWMAdaptor() );
|
||||||
|
|
||||||
@@ -3830,14 +3828,14 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
|
|||||||
if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::SAL_EXTTEXTEVENT ) )
|
if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::SAL_EXTTEXTEVENT ) )
|
||||||
{
|
{
|
||||||
HandleExtTextEvent (pEvent);
|
HandleExtTextEvent (pEvent);
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::SAL_QUITEVENT ) )
|
else if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::SAL_QUITEVENT ) )
|
||||||
{
|
{
|
||||||
SAL_WARN( "vcl", "X11SalFrame::Dispatch Quit" );
|
SAL_WARN( "vcl", "X11SalFrame::Dispatch Quit" );
|
||||||
Close(); // ???
|
Close(); // ???
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
else if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::WM_PROTOCOLS ) )
|
else if( pEvent->message_type == rWMAdaptor.getAtom( WMAdaptor::WM_PROTOCOLS ) )
|
||||||
{
|
{
|
||||||
@@ -3850,7 +3848,7 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
|
|||||||
if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_DELETE_WINDOW ) )
|
if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_DELETE_WINDOW ) )
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
else if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_TAKE_FOCUS ) )
|
else if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_TAKE_FOCUS ) )
|
||||||
{
|
{
|
||||||
@@ -3880,12 +3878,12 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
|
|||||||
HandleFocusEvent( &aEvent );
|
HandleFocusEvent( &aEvent );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
long X11SalFrame::Dispatch( XEvent *pEvent )
|
bool X11SalFrame::Dispatch( XEvent *pEvent )
|
||||||
{
|
{
|
||||||
long nRet = 0;
|
bool nRet = false;
|
||||||
|
|
||||||
if( -1 == nCaptured_ )
|
if( -1 == nCaptured_ )
|
||||||
{
|
{
|
||||||
@@ -3952,7 +3950,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
|
|||||||
}
|
}
|
||||||
bMapped_ = true;
|
bMapped_ = true;
|
||||||
bViewable_ = true;
|
bViewable_ = true;
|
||||||
nRet = 1;
|
nRet = true;
|
||||||
if ( mpInputContext != nullptr )
|
if ( mpInputContext != nullptr )
|
||||||
mpInputContext->Map( this );
|
mpInputContext->Map( this );
|
||||||
CallCallback( SalEvent::Resize, nullptr );
|
CallCallback( SalEvent::Resize, nullptr );
|
||||||
@@ -4011,7 +4009,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
|
|||||||
{
|
{
|
||||||
bMapped_ = false;
|
bMapped_ = false;
|
||||||
bViewable_ = false;
|
bViewable_ = false;
|
||||||
nRet = 1;
|
nRet = true;
|
||||||
if ( mpInputContext != nullptr )
|
if ( mpInputContext != nullptr )
|
||||||
mpInputContext->Unmap( this );
|
mpInputContext->Unmap( this );
|
||||||
CallCallback( SalEvent::Resize, nullptr );
|
CallCallback( SalEvent::Resize, nullptr );
|
||||||
@@ -4026,7 +4024,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
|
|||||||
|
|
||||||
case VisibilityNotify:
|
case VisibilityNotify:
|
||||||
nVisibility_ = pEvent->xvisibility.state;
|
nVisibility_ = pEvent->xvisibility.state;
|
||||||
nRet = 1;
|
nRet = true;
|
||||||
if( bAlwaysOnTop_
|
if( bAlwaysOnTop_
|
||||||
&& bMapped_
|
&& bMapped_
|
||||||
&& ! GetDisplay()->getWMAdaptor()->isAlwaysOnTopOK()
|
&& ! GetDisplay()->getWMAdaptor()->isAlwaysOnTopOK()
|
||||||
@@ -4042,7 +4040,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ColormapNotify:
|
case ColormapNotify:
|
||||||
nRet = 0;
|
nRet = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PropertyNotify:
|
case PropertyNotify:
|
||||||
|
@@ -4332,9 +4332,9 @@ void GtkSalFrame::signalDragDataGet(GtkWidget* /*widget*/, GdkDragContext* /*con
|
|||||||
pThis->m_pDragSource->dragDataGet(data, info);
|
pThis->m_pDragSource->dragDataGet(data, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
long GtkSalFrame::CallCallbackExc(SalEvent nEvent, const void* pEvent) const
|
bool GtkSalFrame::CallCallbackExc(SalEvent nEvent, const void* pEvent) const
|
||||||
{
|
{
|
||||||
long nRet = 0;
|
bool nRet = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
nRet = CallCallback(nEvent, pEvent);
|
nRet = CallCallback(nEvent, pEvent);
|
||||||
|
Reference in New Issue
Block a user