summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/window/salobj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/generic/window/salobj.cxx')
-rw-r--r--vcl/unx/generic/window/salobj.cxx39
1 files changed, 39 insertions, 0 deletions
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index e3ec1b467290..b10e8f645201 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -243,6 +243,9 @@ X11SalObject::~X11SalObject()
rObjects.remove( this );
GetGenericData()->ErrorTrapPush();
+ const SystemEnvData* pEnv = mpParent->GetSystemData();
+ ::Window aObjectParent = (::Window)pEnv->aWindow;
+ XSetWindowBackgroundPixmap(static_cast<Display*>(maSystemChildData.pDisplay), aObjectParent, None);
if ( maSecondary )
XDestroyWindow( static_cast<Display*>(maSystemChildData.pDisplay), maSecondary );
if ( maPrimary )
@@ -468,4 +471,40 @@ bool X11SalObject::Dispatch( XEvent* pEvent )
return false;
}
+void X11SalObject::SetLeaveEnterBackgrounds(const css::uno::Sequence<css::uno::Any>& rLeaveArgs, const css::uno::Sequence<css::uno::Any>& rEnterArgs)
+{
+ SalDisplay* pSalDisp = vcl_sal::getSalDisplay(GetGenericData());
+ const SystemEnvData* pEnv = mpParent->GetSystemData();
+ Display* pDisp = pSalDisp->GetDisplay();
+ ::Window aObjectParent = (::Window)pEnv->aWindow;
+
+ bool bFreePixmap = false;
+ Pixmap aPixmap = None;
+ if (rEnterArgs.getLength() == 3)
+ {
+ rEnterArgs[0] >>= bFreePixmap;
+ long pixmapHandle = None;
+ rEnterArgs[1] >>= pixmapHandle;
+ aPixmap = pixmapHandle;
+ }
+
+ XSetWindowBackgroundPixmap(pDisp, aObjectParent, aPixmap);
+ if (bFreePixmap)
+ XFreePixmap(pDisp, aPixmap);
+
+ bFreePixmap = false;
+ aPixmap = None;
+ if (rLeaveArgs.getLength() == 3)
+ {
+ rLeaveArgs[0] >>= bFreePixmap;
+ long pixmapHandle = None;
+ rLeaveArgs[1] >>= pixmapHandle;
+ aPixmap = pixmapHandle;
+ }
+
+ XSetWindowBackgroundPixmap(pDisp, maSecondary, aPixmap);
+ if (bFreePixmap)
+ XFreePixmap(pDisp, aPixmap);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */