desktop/unx/source/splashx.c | 4 +-- vcl/inc/unx/sessioninhibitor.hxx | 7 ----- vcl/unx/generic/window/sessioninhibitor.cxx | 36 ---------------------------- 3 files changed, 3 insertions(+), 44 deletions(-)
New commits: commit e8d59edf9dddf809a08cf827235ebb033590f819 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Aug 15 10:04:47 2024 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Aug 15 18:51:17 2024 +0200 desktop: Fix '--enable-gui --without-x' build The code in this block is X11-specific, so make it conditional on `USING_X11`, not `HAVE_FEATURE_UI`. This fixes an `--enable-gui --without-x` build that previously failed like this ld.lld: error: undefined symbol: XineramaQueryScreens >>> referenced by splashx.c:441 (desktop/unx/source/splashx.c:441) >>> .../libreoffice/workdir/CObject/desktop/unx/source/splashx.o:(splash_init_display) [AIN] draw_brand clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [.../libreoffice/desktop/Executable_oosplash.mk:10: .../libreoffice/instdir/program/oosplash] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:296: build] Error 2 Change-Id: If02395d2461de4b6aac340898ce99583653d45c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171894 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c index 4dc50a740695..13fe6ef679f4 100644 --- a/desktop/unx/source/splashx.c +++ b/desktop/unx/source/splashx.c @@ -7,10 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <config_features.h> +#include <config_vclplug.h> #include "splashx.h" -#if defined(ENABLE_QUICKSTART_LIBPNG) && HAVE_FEATURE_UI +#if defined(ENABLE_QUICKSTART_LIBPNG) && USING_X11 #include <X11/Xlib.h> #include <X11/Xatom.h> commit 2a9f97a26ffe2ef78e71c41a2310a269ed4a6f7c Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Wed Aug 14 12:49:25 2024 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Aug 15 18:51:03 2024 +0200 vcl: Drop MATE <= 1.10 session inhibit support This was added in: commit 68570131013cfcf29f4c934a727053c2903e35b1 Author: Andrzej Hunt <andr...@ahunt.org> Date: Tue Oct 20 17:24:44 2015 +0200 Add org.mate.SessionManager support This is valid for Mate <= 1.10 (As of writing, 1.10 is the current stable release - so we'll have to keep shipping this for quite a few years to come.) Change-Id: I4d1f81c50923148e710eac22f5428b2a1c41f0e9 As the commit message and code comments say, MATE >= 1.12 also uses the "org.gnome.SessionManager" interface (which is still supported), so drop the "org.mate.SessionManager" one only needed for older versions. MATE 1.12 was released on 2015-11-05, which is long enough ago by now. [1] https://mate-desktop.org/blog/2015-11-05-mate-1-12-released/ Change-Id: I062261c6396b35be1a0f452826f8ee2c545f4906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171893 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/inc/unx/sessioninhibitor.hxx b/vcl/inc/unx/sessioninhibitor.hxx index a0311341b870..94eb9fa82a8a 100644 --- a/vcl/inc/unx/sessioninhibitor.hxx +++ b/vcl/inc/unx/sessioninhibitor.hxx @@ -37,7 +37,6 @@ private: std::optional<unsigned int> mnFDOSSCookie; // FDO ScreenSaver Inhibit std::optional<unsigned int> mnFDOPMCookie; // FDO PowerManagement Inhibit std::optional<unsigned int> mnGSMCookie; - std::optional<unsigned int> mnMSMCookie; std::optional<int> mnXScreenSaverTimeout; @@ -57,17 +56,13 @@ private: // FDSSO: org.freedesktop.ScreenSaver::Inhibit - appears to be supported only by KDE? // FDOPM: org.freedesktop.PowerManagement.Inhibit::Inhibit - XFCE, (KDE) ? // (KDE: doesn't inhibit screensaver, but does inhibit PowerManagement) - // GSM: org.gnome.SessionManager::Inhibit - gnome 3 - // MSM: org.mate.Sessionmanager::Inhibit - Mate <= 1.10, is identical to GSM - // (This is replaced by the GSM interface from Mate 1.12 onwards) + // GSM: org.gnome.SessionManager::Inhibit - gnome 3, MATE // // Note: the Uninhibit call has different spelling in FDOSS (UnInhibit) vs GSM (Uninhibit) SAL_DLLPRIVATE void inhibitFDOSS(bool bInhibit, const char* appname, const char* reason); SAL_DLLPRIVATE void inhibitFDOPM(bool bInhibit, const char* appname, const char* reason); SAL_DLLPRIVATE void inhibitGSM(bool bInhibit, const char* appname, const char* reason, ApplicationInhibitFlags eType, unsigned int window_system_id); - SAL_DLLPRIVATE void inhibitMSM(bool bInhibit, const char* appname, const char* reason, - ApplicationInhibitFlags eType, unsigned int window_system_id); SAL_DLLPRIVATE void inhibitXScreenSaver(bool bInhibit, Display* pDisplay); SAL_DLLPRIVATE static void inhibitXAutoLock(bool bInhibit, Display* pDisplay); diff --git a/vcl/unx/generic/window/sessioninhibitor.cxx b/vcl/unx/generic/window/sessioninhibitor.cxx index 300df9ff8031..b207c9a1282f 100644 --- a/vcl/unx/generic/window/sessioninhibitor.cxx +++ b/vcl/unx/generic/window/sessioninhibitor.cxx @@ -38,10 +38,6 @@ #define GSM_DBUS_PATH "/org/gnome/SessionManager" #define GSM_DBUS_INTERFACE "org.gnome.SessionManager" -// Mate <= 1.10 uses org.mate.SessionManager, > 1.10 will use org.gnome.SessionManager -#define MSM_DBUS_SERVICE "org.mate.SessionManager" -#define MSM_DBUS_PATH "/org/mate/SessionManager" -#define MSM_DBUS_INTERFACE "org.mate.SessionManager" #endif #include <sal/log.hxx> @@ -67,7 +63,6 @@ void SessionManagerInhibitor::inhibit(bool bInhibit, std::u16string_view sReason } inhibitGSM(bInhibit, appname, aReason.getStr(), eType, window_system_id); - inhibitMSM(bInhibit, appname, aReason.getStr(), eType, window_system_id); } #if ENABLE_GIO @@ -236,37 +231,6 @@ void SessionManagerInhibitor::inhibitGSM( bool bInhibit, const char* appname, co #endif // ENABLE_GIO } -void SessionManagerInhibitor::inhibitMSM( bool bInhibit, const char* appname, const char* reason, ApplicationInhibitFlags eType, unsigned int window_system_id ) -{ -#if ENABLE_GIO - dbusInhibit( bInhibit, - MSM_DBUS_SERVICE, MSM_DBUS_PATH, MSM_DBUS_INTERFACE, - [appname, reason, eType, window_system_id] ( GDBusProxy *proxy, GError*& error ) -> GVariant* { - return g_dbus_proxy_call_sync( proxy, "Inhibit", - g_variant_new("(susu)", - appname, - window_system_id, - reason, - eType - ), - G_DBUS_CALL_FLAGS_NONE, -1, nullptr, &error ); - }, - [] ( GDBusProxy *proxy, const guint nCookie, GError*& error ) -> GVariant* { - return g_dbus_proxy_call_sync( proxy, "Uninhibit", - g_variant_new("(u)", nCookie), - G_DBUS_CALL_FLAGS_NONE, -1, nullptr, &error ); - }, - mnMSMCookie ); -#else - (void) this; - (void) bInhibit; - (void) appname; - (void) reason; - (void) eType; - (void) window_system_id; -#endif // ENABLE_GIO -} - /** * Disable screensavers using the XSetScreenSaver/XGetScreenSaver API. *