diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-28 10:48:32 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-06-01 20:46:25 +0200 |
commit | 2ca9d8c05443edf17b39a6b4fb4efc55478ff014 (patch) | |
tree | 54d39a950627d582154f32bed30c8a0b2aba96f5 /vcl/unx | |
parent | a973dd377e096f17f6c4a3d21ebc16ad4af03b57 (diff) |
tdf#117628 crash after closing media player with X11 backend
Change-Id: I812da5ddf7343573f93ea64e592442edb31cad2d
Reviewed-on: https://gerrit.libreoffice.org/54912
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
(cherry picked from commit d9c5e7f4aef8da58b2b59e3259d1704296648cbf)
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/window/salobj.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx index 9d0833094c1d..de41bc8bf8cb 100644 --- a/vcl/unx/generic/window/salobj.cxx +++ b/vcl/unx/generic/window/salobj.cxx @@ -62,7 +62,8 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p SalDisplay* pSalDisp = vcl_sal::getSalDisplay(GetGenericUnixSalData()); const SystemEnvData* pEnv = pParent->GetSystemData(); Display* pDisp = pSalDisp->GetDisplay(); - ::Window aObjectParent = (::Window)pEnv->aWindow; + ::Window aObjectParent = static_cast<::Window>(pEnv->aWindow); + pObject->maParentWin = aObjectParent; // find out on which screen that window is XWindowAttributes aParentAttr; @@ -235,8 +236,7 @@ X11SalObject::~X11SalObject() rObjects.remove( this ); GetGenericUnixSalData()->ErrorTrapPush(); - const SystemEnvData* pEnv = mpParent->GetSystemData(); - ::Window aObjectParent = (::Window)pEnv->aWindow; + ::Window aObjectParent = maParentWin; XSetWindowBackgroundPixmap(static_cast<Display*>(maSystemChildData.pDisplay), aObjectParent, None); if ( maSecondary ) XDestroyWindow( static_cast<Display*>(maSystemChildData.pDisplay), maSecondary ); @@ -400,12 +400,11 @@ bool X11SalObject::Dispatch( XEvent* pEvent ) ) { SalMouseEvent aEvt; - const SystemEnvData* pParentData = pObject->mpParent->GetSystemData(); int dest_x, dest_y; ::Window aChild = None; XTranslateCoordinates( pEvent->xbutton.display, pEvent->xbutton.root, - pParentData->aWindow, + pObject->maParentWin, pEvent->xbutton.x_root, pEvent->xbutton.y_root, &dest_x, &dest_y, @@ -466,9 +465,8 @@ bool X11SalObject::Dispatch( XEvent* pEvent ) void X11SalObject::SetLeaveEnterBackgrounds(const css::uno::Sequence<css::uno::Any>& rLeaveArgs, const css::uno::Sequence<css::uno::Any>& rEnterArgs) { SalDisplay* pSalDisp = vcl_sal::getSalDisplay(GetGenericUnixSalData()); - const SystemEnvData* pEnv = mpParent->GetSystemData(); Display* pDisp = pSalDisp->GetDisplay(); - ::Window aObjectParent = (::Window)pEnv->aWindow; + ::Window aObjectParent = maParentWin; bool bFreePixmap = false; Pixmap aPixmap = None; |