summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-07-20 11:27:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-07-21 11:01:29 +0200
commit4c00a5bce384c5fa3b46cf5bb29c7e9b1e506ea0 (patch)
tree939e9f15ea540713ae06dbfcd747de9856f563ce
parentf3a82f04dd1e16a3c317fd73ad7dc076e73cf4da (diff)
Assume that, if we have X11, it supports Xinerama
By now, Xinerama is old enough that we can use the X11 server supports it Change-Id: Ida95902916697808c611a53274b1f0299fd298b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac5
-rw-r--r--desktop/Executable_oosplash.mk2
-rw-r--r--desktop/unx/source/splashx.c6
-rw-r--r--vcl/Library_vclplug_gen.mk4
-rw-r--r--vcl/unx/generic/app/saldisp.cxx5
6 files changed, 8 insertions, 15 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index 233e2247816c..acb868b8f05f 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -711,7 +711,6 @@ export UNIX_DLAPI_LIBS=@UNIX_DLAPI_LIBS@
export USE_HEADLESS_CODE=@USE_HEADLESS_CODE@
export USE_LD=@USE_LD@
export USE_LIBRARY_BIN_TAR=@USE_LIBRARY_BIN_TAR@
-export USE_XINERAMA=@USE_XINERAMA@
export UPDATE_CONFIG=@UPDATE_CONFIG@
export UUIDGEN=@UUIDGEN@
export VALGRIND_CFLAGS=$(gb_SPACE)@VALGRIND_CFLAGS@
diff --git a/configure.ac b/configure.ac
index 8c4977bfd3e5..3ffb5fd42613 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13572,7 +13572,7 @@ fi
AC_SUBST(ENABLE_SILENT_MSI)
AC_MSG_CHECKING([whether and how to use Xinerama])
-if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
+if test "$USING_X11" = TRUE; then
if test "$x_libraries" = "default_x_libraries"; then
XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
if test "x$XINERAMALIB" = x; then
@@ -13626,14 +13626,13 @@ if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
AC_CHECK_LIB([Xinerama], [XineramaIsActive], [:],
[AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
else
- AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
+ AC_MSG_ERROR([libXinerama not found or wrong architecture.])
fi
else
USE_XINERAMA=
XINERAMA_LINK=none
AC_MSG_RESULT([no])
fi
-AC_SUBST(USE_XINERAMA)
AC_SUBST(XINERAMA_LINK)
AC_MSG_CHECKING([whether to use non-standard RGBA32 cairo pixel order])
diff --git a/desktop/Executable_oosplash.mk b/desktop/Executable_oosplash.mk
index 5c7e4ac95bb4..308c76945aef 100644
--- a/desktop/Executable_oosplash.mk
+++ b/desktop/Executable_oosplash.mk
@@ -23,7 +23,7 @@ $(eval $(call gb_Executable_add_cobjects,oosplash,\
desktop/unx/source/start \
))
-ifneq ($(USE_XINERAMA),)
+ifneq ($(USING_X11),)
$(eval $(call gb_Executable_add_defs,oosplash,\
-DUSE_XINERAMA \
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index afd137d06876..4f7239ab6159 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -16,7 +16,7 @@
#include <X11/Xatom.h>
#include <X11/Xutil.h>
-#ifdef USE_XINERAMA
+#ifdef USING_X11
#include <X11/extensions/Xinerama.h>
#endif
@@ -406,7 +406,7 @@ static int splash_init_display( struct splash* splash, int argc, char** argv )
{
char *display_name = NULL;
int i;
-#ifdef USE_XINERAMA
+#ifdef USING_X11
int n_xinerama_screens = 1;
XineramaScreenInfo* p_screens = NULL;
#endif
@@ -442,7 +442,7 @@ static int splash_init_display( struct splash* splash, int argc, char** argv )
splash->display_x_pos = 0;
splash->display_y_pos = 0;
-#ifdef USE_XINERAMA
+#ifdef USING_X11
p_screens = XineramaQueryScreens( splash->display, &n_xinerama_screens );
if( p_screens )
{
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index 193e9c78f16a..dea289a8e0c5 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -133,7 +133,7 @@ $(eval $(call gb_Library_add_defs,vclplug_gen,\
endif
## handle Xinerama
-ifneq ($(USE_XINERAMA),)
+ifneq ($(USING_X11),)
$(eval $(call gb_Library_add_defs,vclplug_gen,\
-DUSE_XINERAMA_XORG \
))
@@ -146,7 +146,7 @@ $(eval $(call gb_Library_add_libs,vclplug_gen,\
-Wl$(COMMA)-Bstatic -lXinerama -Wl$(COMMA)-Bdynamic \
))
endif
-endif # USE_XINERAMA
+endif # USING_X11
ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,vclplug_gen,\
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 2eabfff5a9a5..174aa8761d7d 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -39,10 +39,7 @@
#endif
#include <X11/keysym.h>
#include <X11/Xatom.h>
-
-#ifdef USE_XINERAMA_XORG
#include <X11/extensions/Xinerama.h>
-#endif
#include <i18nlangtag/languagetag.hxx>
#include <tools/debug.hxx>
@@ -2213,7 +2210,6 @@ void SalDisplay::InitXinerama()
m_bXinerama = false;
return; // multiple screens mean no xinerama
}
-#if defined(USE_XINERAMA_XORG)
if( !XineramaIsActive( pDisp_ ) )
return;
@@ -2236,7 +2232,6 @@ void SalDisplay::InitXinerama()
m_bXinerama = m_aXineramaScreens.size() > 1;
}
XFree( pScreens );
-#endif
#if OSL_DEBUG_LEVEL > 1
if( m_bXinerama )
{