/[packages]/updates/5/libreoffice/current/SOURCES/0001-Resolves-rhbz-1362453-use-the-cairo-scaling-approach.patch
ViewVC logotype

Contents of /updates/5/libreoffice/current/SOURCES/0001-Resolves-rhbz-1362453-use-the-cairo-scaling-approach.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1142874 - (show annotations) (download)
Tue Aug 22 07:52:48 2017 UTC (6 years, 8 months ago) by neoclust
File size: 4114 byte(s)
New version 5.2.4
1 From aedb22c547b93ffcdc1c6edc18a9814ce76040e7 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Thu, 24 Nov 2016 10:19:43 +0000
4 Subject: [PATCH] Resolves: rhbz#1362453 use the cairo scaling approach on both
5 wayland and X
6
7 Change-Id: I669eba55830a28c1850f4679dfa824798bd3a383
8 ---
9 vcl/inc/unx/gtk/gtkdata.hxx | 2 --
10 vcl/unx/gtk/gtkdata.cxx | 1 -
11 vcl/unx/gtk3/gtk3gtkdata.cxx | 14 --------------
12 vcl/unx/gtk3/gtk3gtkframe.cxx | 2 +-
13 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 8 +-------
14 5 files changed, 2 insertions(+), 25 deletions(-)
15
16 diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
17 index c59d7a2..ffb0fb7 100644
18 --- a/vcl/inc/unx/gtk/gtkdata.hxx
19 +++ b/vcl/inc/unx/gtk/gtkdata.hxx
20 @@ -137,7 +137,6 @@ class GtkSalDisplay : public SalDisplay
21 o3tl::enumarray<PointerStyle, GdkCursor*> m_aCursors;
22 bool m_bStartupCompleted;
23 bool m_bX11Display;
24 - bool m_bOwnHiDpiScale;
25
26 GdkCursor* getFromXBM( const unsigned char *pBitmap, const unsigned char *pMask,
27 int nWidth, int nHeight, int nXHot, int nYHot );
28 @@ -147,7 +146,6 @@ public:
29
30 GdkDisplay* GetGdkDisplay() const { return m_pGdkDisplay; }
31 bool IsX11Display() const { return m_bX11Display; }
32 - bool IsOwnHiDpiScale() const { return m_bOwnHiDpiScale; }
33
34 GtkSalSystem* getSystem() const { return m_pSys; }
35
36 diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx
37 index 2de555e..e621f47 100644
38 --- a/vcl/unx/gtk/gtkdata.cxx
39 +++ b/vcl/unx/gtk/gtkdata.cxx
40 @@ -80,7 +80,6 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
41 GetGenericData()->ErrorTrapPush(); // and leak the trap
42
43 m_bX11Display = true;
44 - m_bOwnHiDpiScale = true;
45
46 gtk_widget_set_default_direction(AllSettings::GetLayoutRTL() ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
47 }
48 diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
49 index 464a865..f911d38 100644
50 --- a/vcl/unx/gtk3/gtk3gtkdata.cxx
51 +++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
52 @@ -83,20 +83,6 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
53 GetGenericData()->ErrorTrapPush(); // and leak the trap
54
55 m_bX11Display = GDK_IS_X11_DISPLAY( m_pGdkDisplay );
56 - m_bOwnHiDpiScale = false;
57 -
58 -#if GTK_CHECK_VERSION(3,10,0)
59 -#ifdef GDK_WINDOWING_X11
60 - if (m_bX11Display)
61 - {
62 - if (!getenv("GDK_SCALE"))
63 - {
64 - gdk_x11_display_set_window_scale(m_pGdkDisplay, 1);
65 - m_bOwnHiDpiScale = true;
66 - }
67 - }
68 -#endif
69 -#endif
70
71 gtk_widget_set_default_direction(AllSettings::GetLayoutRTL() ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
72 }
73 diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
74 index 645f800..9bfcb73 100644
75 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx
76 +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
77 @@ -1577,7 +1577,7 @@ void GtkSalFrame::AllocateFrame()
78
79 #if GTK_CHECK_VERSION(3,10,0)
80 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
81 - int scale = getDisplay()->IsOwnHiDpiScale() ? 1 : gtk_widget_get_scale_factor(m_pWindow);
82 + int scale = gtk_widget_get_scale_factor(m_pWindow);
83 #else
84 int scale = 1;
85 #endif
86 diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
87 index 8090f68..db322fc 100644
88 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
89 +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
90 @@ -3114,14 +3114,8 @@ void GtkSalGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY)
91 double fResolution = -1.0;
92 g_object_get(pScreen, "resolution", &fResolution, nullptr);
93
94 - int nScaleFactor = 1;
95 -
96 -#if GTK_CHECK_VERSION(3, 10, 0)
97 - nScaleFactor = GtkSalFrame::getDisplay()->IsOwnHiDpiScale() ? gtk_widget_get_scale_factor(mpWindow) : 1;
98 -#endif
99 -
100 if (fResolution > 0.0)
101 - rDPIX = rDPIY = sal_Int32(fResolution * nScaleFactor);
102 + rDPIX = rDPIY = sal_Int32(fResolution);
103 else
104 rDPIX = rDPIY = 96;
105 }
106 --
107 2.9.3
108

  ViewVC Help
Powered by ViewVC 1.1.30