summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RepositoryExternal.mk12
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac37
-rw-r--r--distro-configs/LibreOfficeAndroid.conf1
-rw-r--r--distro-configs/LibreOfficeAndroidAarch64.conf1
-rw-r--r--distro-configs/LibreOfficeAndroidX86.conf1
-rw-r--r--distro-configs/LibreOfficeEmscripten.conf1
-rw-r--r--distro-configs/LibreOfficeLinux.conf1
-rw-r--r--distro-configs/LibreOfficeOpenBSD.conf1
-rw-r--r--vcl/unx/generic/app/randrwrapper.cxx145
10 files changed, 12 insertions, 189 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 929bdcc47a3e..31847d38ecec 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3230,8 +3230,6 @@ endif # ENABLE_EOT
ifeq ($(USING_X11), TRUE)
-ifeq ($(XRANDR_DLOPEN),FALSE)
-
define gb_LinkTarget__use_Xrandr
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
@@ -3243,16 +3241,6 @@ $(call gb_LinkTarget_add_libs,$(1),\
)
endef
-else # XRANDR_DLOPEN
-
-define gb_LinkTarget__use_Xrandr
-$(call gb_LinkTarget_add_defs,$(1),\
- -DXRANDR_DLOPEN \
-)
-endef
-
-endif # XRANDR_DLOPEN
-
define gb_LinkTarget__use_Xrender
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
diff --git a/config_host.mk.in b/config_host.mk.in
index c9c7324d22b9..272182020987 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -643,7 +643,6 @@ export XCODEBUILD_SDK=@XCODEBUILD_SDK@
export XINERAMA_LINK=@XINERAMA_LINK@
export XMLLINT=@XMLLINT@
export XRANDR_CFLAGS=$(gb_SPACE)@XRANDR_CFLAGS@
-export XRANDR_DLOPEN=@XRANDR_DLOPEN@
export XRANDR_LIBS=$(gb_SPACE)@XRANDR_LIBS@
export XRENDER_CFLAGS=$(gb_SPACE)@XRENDER_CFLAGS@
export XRENDER_LIBS=$(gb_SPACE)@XRENDER_LIBS@
diff --git a/configure.ac b/configure.ac
index c90b56a20c91..29ef7e559f1e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1261,11 +1261,6 @@ AC_ARG_ENABLE(randr,
[Disable RandR support in the vcl project.]),
,enable_randr=yes)
-AC_ARG_ENABLE(randr-link,
- AS_HELP_STRING([--disable-randr-link],
- [Disable linking with libXrandr, instead dynamically open it at runtime.]),
-,enable_randr_link=yes)
-
AC_ARG_ENABLE(gstreamer-1-0,
AS_HELP_STRING([--disable-gstreamer-1-0],
[Disable building with the new gstreamer 1.0 avmedia backend.]),
@@ -9224,32 +9219,24 @@ dnl Check for XRandr
dnl ===================================================================
AC_MSG_CHECKING([whether to enable RandR support])
if test "$USING_X11" = TRUE -a "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \); then
- if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
- XRANDR_DLOPEN="TRUE"
+ AC_MSG_RESULT([yes])
+ PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
+ if test "$ENABLE_RANDR" != "TRUE"; then
+ AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
+ [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
+ XRANDR_CFLAGS=" "
+ AC_CHECK_LIB([Xrandr], [XRRQueryExtension], [:],
+ [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
+ XRANDR_LIBS="-lXrandr "
ENABLE_RANDR="TRUE"
- AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
- else
- AC_MSG_RESULT([yes])
- XRANDR_DLOPEN="FALSE"
- PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
- if test "$ENABLE_RANDR" != "TRUE"; then
- AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
- [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
- XRANDR_CFLAGS=" "
- AC_CHECK_LIB([Xrandr], [XRRQueryExtension], [:],
- [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
- XRANDR_LIBS="-lXrandr "
- ENABLE_RANDR="TRUE"
- fi
- XRANDR_CFLAGS=$(printf '%s' "$XRANDR_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
- FilterLibs "${XRANDR_LIBS}"
- XRANDR_LIBS="${filteredlibs}"
fi
+ XRANDR_CFLAGS=$(printf '%s' "$XRANDR_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+ FilterLibs "${XRANDR_LIBS}"
+ XRANDR_LIBS="${filteredlibs}"
else
ENABLE_RANDR=""
AC_MSG_RESULT([no])
fi
-AC_SUBST(XRANDR_DLOPEN)
AC_SUBST(XRANDR_CFLAGS)
AC_SUBST(XRANDR_LIBS)
AC_SUBST(ENABLE_RANDR)
diff --git a/distro-configs/LibreOfficeAndroid.conf b/distro-configs/LibreOfficeAndroid.conf
index 9db6a72dd387..74d79b7dbc1b 100644
--- a/distro-configs/LibreOfficeAndroid.conf
+++ b/distro-configs/LibreOfficeAndroid.conf
@@ -4,7 +4,6 @@
--disable-gstreamer-0-10
--disable-gstreamer-1-0
--disable-randr
---disable-randr-link
--disable-systray
--without-junit
--without-helppack-integration
diff --git a/distro-configs/LibreOfficeAndroidAarch64.conf b/distro-configs/LibreOfficeAndroidAarch64.conf
index ca937137bf90..e77d67f33587 100644
--- a/distro-configs/LibreOfficeAndroidAarch64.conf
+++ b/distro-configs/LibreOfficeAndroidAarch64.conf
@@ -4,7 +4,6 @@
--disable-gstreamer-0-10
--disable-gstreamer-1-0
--disable-randr
---disable-randr-link
--disable-systray
--without-junit
--without-helppack-integration
diff --git a/distro-configs/LibreOfficeAndroidX86.conf b/distro-configs/LibreOfficeAndroidX86.conf
index e5589e8e8b07..4f487d502069 100644
--- a/distro-configs/LibreOfficeAndroidX86.conf
+++ b/distro-configs/LibreOfficeAndroidX86.conf
@@ -4,7 +4,6 @@
--disable-gstreamer-0-10
--disable-gstreamer-1-0
--disable-randr
---disable-randr-link
--disable-systray
--without-junit
--without-helppack-integration
diff --git a/distro-configs/LibreOfficeEmscripten.conf b/distro-configs/LibreOfficeEmscripten.conf
index 6171fa7e94df..3ca706efc3c5 100644
--- a/distro-configs/LibreOfficeEmscripten.conf
+++ b/distro-configs/LibreOfficeEmscripten.conf
@@ -17,7 +17,6 @@
--disable-firebird-sdbc
--disable-python
--disable-randr
---disable-randr-link
--disable-pdfimport
--disable-systray
--disable-gltf
diff --git a/distro-configs/LibreOfficeLinux.conf b/distro-configs/LibreOfficeLinux.conf
index 06be87907c05..d57706cb5e6a 100644
--- a/distro-configs/LibreOfficeLinux.conf
+++ b/distro-configs/LibreOfficeLinux.conf
@@ -33,5 +33,4 @@
--enable-python=internal
--enable-online-update
--disable-dconf
---disable-randr-link
--enable-mergelibs
diff --git a/distro-configs/LibreOfficeOpenBSD.conf b/distro-configs/LibreOfficeOpenBSD.conf
index 09e233728847..fb0e3551c0d4 100644
--- a/distro-configs/LibreOfficeOpenBSD.conf
+++ b/distro-configs/LibreOfficeOpenBSD.conf
@@ -4,7 +4,6 @@
--disable-kde4
--disable-nss-module
--disable-odk
---disable-randr-link
--enable-gstreamer-0-10
--enable-ext-wiki-publisher
--enable-python=system
diff --git a/vcl/unx/generic/app/randrwrapper.cxx b/vcl/unx/generic/app/randrwrapper.cxx
index d97f86f068d9..9706e9f3143e 100644
--- a/vcl/unx/generic/app/randrwrapper.cxx
+++ b/vcl/unx/generic/app/randrwrapper.cxx
@@ -29,149 +29,6 @@
namespace
{
-# ifdef XRANDR_DLOPEN
-
-class RandRWrapper
-{
- oslModule m_pRandRLib;
-
- // function pointers
- Bool(*m_pXRRQueryExtension)(Display*,int*,int*);
- XRRScreenConfiguration*(*m_pXRRGetScreenInfo)(Display*,Drawable);
- void(*m_pXRRFreeScreenConfigInfo)(XRRScreenConfiguration*);
- void(*m_pXRRSelectInput)(Display*,::Window,int);
- int(*m_pXRRUpdateConfiguration)(XEvent*);
- XRRScreenSize*(*m_pXRRConfigSizes)(XRRScreenConfiguration*,int*);
- SizeID(*m_pXRRConfigCurrentConfiguration)(XRRScreenConfiguration*,Rotation*);
- int(*m_pXRRRootToScreen)(Display*, ::Window);
-
- bool m_bValid;
-
- void initFromModule();
-
- explicit RandRWrapper(Display*);
- ~RandRWrapper();
-public:
- static RandRWrapper& get(Display*);
- static void releaseWrapper();
-
- Bool XRRQueryExtension(Display* i_pDisp, int* o_event_base, int* o_error_base )
- {
- Bool bRet = False;
- if( m_bValid )
- bRet = m_pXRRQueryExtension( i_pDisp, o_event_base, o_error_base );
- return bRet;
- }
- XRRScreenConfiguration* XRRGetScreenInfo( Display* i_pDisp, Drawable i_aDrawable )
- {
- return m_bValid ? m_pXRRGetScreenInfo( i_pDisp, i_aDrawable ) : NULL;
- }
- void XRRFreeScreenConfigInfo( XRRScreenConfiguration* i_pConfig )
- {
- if( m_bValid )
- m_pXRRFreeScreenConfigInfo( i_pConfig );
- }
- void XRRSelectInput( Display* i_pDisp, ::Window i_window, int i_nMask )
- {
- if( m_bValid )
- m_pXRRSelectInput( i_pDisp, i_window, i_nMask );
- }
- int XRRUpdateConfiguration( XEvent* i_pEvent )
- {
- return m_bValid ? m_pXRRUpdateConfiguration( i_pEvent ) : 0;
- }
- XRRScreenSize* XRRConfigSizes( XRRScreenConfiguration* i_pConfig, int* o_nSizes )
- {
- return m_bValid ? m_pXRRConfigSizes( i_pConfig, o_nSizes ) : NULL;
- }
- SizeID XRRConfigCurrentConfiguration( XRRScreenConfiguration* i_pConfig, Rotation* o_pRot )
- {
- return m_bValid ? m_pXRRConfigCurrentConfiguration( i_pConfig, o_pRot ) : 0;
- }
- int XRRRootToScreen( Display *dpy, ::Window root )
- {
- return m_bValid ? m_pXRRRootToScreen( dpy, root ) : -1;
- }
-};
-
-void RandRWrapper::initFromModule()
-{
- m_pXRRQueryExtension = (Bool(*)(Display*,int*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRQueryExtension" );
- m_pXRRGetScreenInfo = (XRRScreenConfiguration*(*)(Display*,Drawable))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRGetScreenInfo" );
- m_pXRRFreeScreenConfigInfo = (void(*)(XRRScreenConfiguration*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRFreeScreenConfigInfo" );
- m_pXRRSelectInput = (void(*)(Display*,::Window,int))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRSelectInput" );
- m_pXRRUpdateConfiguration = (int(*)(XEvent*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRUpdateConfiguration" );
- m_pXRRConfigSizes = (XRRScreenSize*(*)(XRRScreenConfiguration*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigSizes" );
- m_pXRRConfigCurrentConfiguration = (SizeID(*)(XRRScreenConfiguration*,Rotation*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigCurrentConfiguration" );
- m_pXRRRootToScreen = (int(*)(Display*,::Window))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRRootToScreen" );
-
- m_bValid = m_pXRRQueryExtension &&
- m_pXRRGetScreenInfo &&
- m_pXRRFreeScreenConfigInfo &&
- m_pXRRSelectInput &&
- m_pXRRUpdateConfiguration &&
- m_pXRRConfigSizes &&
- m_pXRRConfigCurrentConfiguration &&
- m_pXRRRootToScreen
- ;
-}
-
-RandRWrapper::RandRWrapper( Display* pDisplay ) :
- m_pRandRLib( NULL ),
- m_pXRRQueryExtension( NULL ),
- m_pXRRGetScreenInfo( NULL ),
- m_pXRRFreeScreenConfigInfo( NULL ),
- m_pXRRSelectInput( NULL ),
- m_pXRRUpdateConfiguration( NULL ),
- m_pXRRConfigSizes( NULL ),
- m_pXRRConfigCurrentConfiguration( NULL ),
- m_pXRRRootToScreen( NULL ),
- m_bValid( false )
-{
- // first try in process space (e.g. gtk links that ?)
- initFromModule();
- if( ! m_bValid )
- {
- // load and resolve dependencies immediately
- // rationale: there are older distributions where libXrandr.so.2 is not linked
- // with libXext.so, resulting in a missing symbol and terminating the office
- // obviously they expected libXext to be linked in global symbolspace (that is
- // linked by the application), which is not the case with us (because we want
- // to be able to run in headless mode even without an installed X11 library)
- m_pRandRLib = osl_loadModuleAscii("libXrandr.so.2", SAL_LOADMODULE_DEFAULT | SAL_LOADMODULE_NOW);
- initFromModule();
- }
- if( m_bValid )
- {
- int nEventBase = 0, nErrorBase = 0;
- if( ! m_pXRRQueryExtension( pDisplay, &nEventBase, &nErrorBase ) )
- m_bValid = false;
- }
-}
-
-RandRWrapper::~RandRWrapper()
-{
- if( m_pRandRLib )
- osl_unloadModule( m_pRandRLib );
-}
-
-static RandRWrapper* pWrapper = NULL;
-
-RandRWrapper& RandRWrapper::get( Display* i_pDisplay )
-{
- if( ! pWrapper )
- pWrapper = new RandRWrapper( i_pDisplay );
- return *pWrapper;
-}
-
-void RandRWrapper::releaseWrapper()
-{
- delete pWrapper;
- pWrapper = NULL;
-}
-
-# else
-
class RandRWrapper
{
bool m_bValid;
@@ -243,8 +100,6 @@ void RandRWrapper::releaseWrapper()
pWrapper = nullptr;
}
-#endif
-
} // namespace
#endif