[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 10 11:37:58 UTC 2021
vcl/unx/gtk3/gtksys.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit e79599b936d0113f95464455e8719c592d0f814e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 10 11:16:39 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon May 10 13:37:13 2021 +0200
gtk4: fill in getXScreenFromDisplayScreen
for whatever that's still worth
Change-Id: I0be6ccfe6260b9b9f07922293a6654a12a181cdd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115318
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtksys.cxx b/vcl/unx/gtk3/gtksys.cxx
index d252fe38d5be..aa822c3e4b3e 100644
--- a/vcl/unx/gtk3/gtksys.cxx
+++ b/vcl/unx/gtk3/gtksys.cxx
@@ -120,19 +120,19 @@ GtkSalSystem::countScreenMonitors()
SalX11Screen
GtkSalSystem::getXScreenFromDisplayScreen(unsigned int nScreen)
{
-#if !GTK_CHECK_VERSION(4, 0, 0)
- gint nMonitor;
+ if (!DLSYM_GDK_IS_X11_DISPLAY(mpDisplay))
+ return SalX11Screen (0);
+#if GTK_CHECK_VERSION(4, 0, 0)
+ GdkX11Screen *pScreen = gdk_x11_display_get_screen(mpDisplay);
+ (void)nScreen;
+#else
+ gint nMonitor;
GdkScreen *pScreen = getScreenMonitorFromIdx (nScreen, nMonitor);
if (!pScreen)
return SalX11Screen (0);
- if (!DLSYM_GDK_IS_X11_DISPLAY(mpDisplay))
- return SalX11Screen (0);
- return SalX11Screen (gdk_x11_screen_get_screen_number (pScreen));
-#else
- (void)nScreen;
- return SalX11Screen (0);
#endif
+ return SalX11Screen(gdk_x11_screen_get_screen_number(pScreen));
}
#if !GTK_CHECK_VERSION(4, 0, 0)
More information about the Libreoffice-commits
mailing list