summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/gdi
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/generic/gdi')
-rw-r--r--vcl/unx/generic/gdi/nativewindowhandleprovider.cxx17
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx2
-rw-r--r--vcl/unx/generic/gdi/x11windowprovider.cxx72
3 files changed, 18 insertions, 73 deletions
diff --git a/vcl/unx/generic/gdi/nativewindowhandleprovider.cxx b/vcl/unx/generic/gdi/nativewindowhandleprovider.cxx
new file mode 100644
index 000000000000..3afd26e31498
--- /dev/null
+++ b/vcl/unx/generic/gdi/nativewindowhandleprovider.cxx
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "unx/nativewindowhandleprovider.hxx"
+
+NativeWindowHandleProvider::~NativeWindowHandleProvider()
+{
+}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 7bc1719770da..1a0e34e53b9c 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -53,7 +53,7 @@
#include <unx/x11/xlimits.hxx>
#include "salgdiimpl.hxx"
-#include "unx/x11windowprovider.hxx"
+#include "unx/nativewindowhandleprovider.hxx"
#include "textrender.hxx"
#include "gdiimpl.hxx"
#include "opengl/x11/gdiimpl.hxx"
diff --git a/vcl/unx/generic/gdi/x11windowprovider.cxx b/vcl/unx/generic/gdi/x11windowprovider.cxx
deleted file mode 100644
index e8604ad410ee..000000000000
--- a/vcl/unx/generic/gdi/x11windowprovider.cxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include <vcl/svapp.hxx>
-
-#include "unx/x11windowprovider.hxx"
-#include "unx/x11/x11display.hxx"
-
-X11WindowProvider::~X11WindowProvider()
-{
-}
-
-Display *OpenX11Display(OString& rDisplay)
-{
- /*
- * open connection to X11 Display
- * try in this order:
- * o -display command line parameter,
- * o $DISPLAY environment variable
- * o default display
- */
-
- Display *pDisp = nullptr;
-
- // is there a -display command line parameter?
-
- sal_uInt32 nParams = osl_getCommandArgCount();
- OUString aParam;
- for (sal_uInt32 i=0; i<nParams; i++)
- {
- osl_getCommandArg(i, &aParam.pData);
- if ( aParam == "-display" )
- {
- osl_getCommandArg(i+1, &aParam.pData);
- rDisplay = OUStringToOString(
- aParam, osl_getThreadTextEncoding());
-
- if ((pDisp = XOpenDisplay(rDisplay.getStr()))!=nullptr)
- {
- /*
- * if a -display switch was used, we need
- * to set the environment accordingly since
- * the clipboard build another connection
- * to the xserver using $DISPLAY
- */
- OUString envVar("DISPLAY");
- osl_setEnvironment(envVar.pData, aParam.pData);
- }
- break;
- }
- }
-
- if (!pDisp && rDisplay.isEmpty())
- {
- // Open $DISPLAY or default...
- char *pDisplay = getenv("DISPLAY");
- if (pDisplay != nullptr)
- rDisplay = OString(pDisplay);
- pDisp = XOpenDisplay(pDisplay);
- }
-
- return pDisp;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */