summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-24 10:19:43 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2016-12-10 06:39:25 +0000
commit3a9609653697ac851ee1c55a41aa143d3bca335e (patch)
treef30606ce67af5c38b2a8963cd4ec882e62c78523 /vcl/unx
parent9774b71017bea62dfbff235886daf7c454bcd0d0 (diff)
Resolves: rhbz#1362453 use the cairo scaling approach on both wayland and X
so have the same hidpi solution on both setups Change-Id: I669eba55830a28c1850f4679dfa824798bd3a383 Reviewed-on: https://gerrit.libreoffice.org/31540 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/gtkdata.cxx1
-rw-r--r--vcl/unx/gtk3/gtk3gtkdata.cxx14
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx2
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx8
4 files changed, 2 insertions, 23 deletions
diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx
index 2de555edbb6b..e621f474dc23 100644
--- a/vcl/unx/gtk/gtkdata.cxx
+++ b/vcl/unx/gtk/gtkdata.cxx
@@ -80,7 +80,6 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
GetGenericData()->ErrorTrapPush(); // and leak the trap
m_bX11Display = true;
- m_bOwnHiDpiScale = true;
gtk_widget_set_default_direction(AllSettings::GetLayoutRTL() ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
}
diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
index 464a8654cc23..f911d384253e 100644
--- a/vcl/unx/gtk3/gtk3gtkdata.cxx
+++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
@@ -83,20 +83,6 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
GetGenericData()->ErrorTrapPush(); // and leak the trap
m_bX11Display = GDK_IS_X11_DISPLAY( m_pGdkDisplay );
- m_bOwnHiDpiScale = false;
-
-#if GTK_CHECK_VERSION(3,10,0)
-#ifdef GDK_WINDOWING_X11
- if (m_bX11Display)
- {
- if (!getenv("GDK_SCALE"))
- {
- gdk_x11_display_set_window_scale(m_pGdkDisplay, 1);
- m_bOwnHiDpiScale = true;
- }
- }
-#endif
-#endif
gtk_widget_set_default_direction(AllSettings::GetLayoutRTL() ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
}
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index e6e043777f83..01ed2c53a6fa 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1577,7 +1577,7 @@ void GtkSalFrame::AllocateFrame()
#if GTK_CHECK_VERSION(3,10,0)
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
- int scale = getDisplay()->IsOwnHiDpiScale() ? 1 : gtk_widget_get_scale_factor(m_pWindow);
+ int scale = gtk_widget_get_scale_factor(m_pWindow);
#else
int scale = 1;
#endif
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index f8be136ccd2b..8b654d97c9d4 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -3123,14 +3123,8 @@ void GtkSalGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY)
double fResolution = -1.0;
g_object_get(pScreen, "resolution", &fResolution, nullptr);
- int nScaleFactor = 1;
-
-#if GTK_CHECK_VERSION(3, 10, 0)
- nScaleFactor = GtkSalFrame::getDisplay()->IsOwnHiDpiScale() ? gtk_widget_get_scale_factor(mpWindow) : 1;
-#endif
-
if (fResolution > 0.0)
- rDPIX = rDPIY = sal_Int32(fResolution * nScaleFactor);
+ rDPIX = rDPIY = sal_Int32(fResolution);
else
rDPIX = rDPIY = 96;
}