From 58f23472d63e52cd65f1133de37671eff5005399 Mon Sep 17 00:00:00 2001 From: Parag Nemade Date: Thu, 2 Apr 2020 22:24:50 +0530 Subject: [PATCH] Fix the GDK backend UI issues Move back to using GDK backend --- ...set_allowed_backends-before-gdk_init.patch | 27 +++++++++++++++++++ fontforge.spec | 14 +++++++--- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 fontforge-20200314-Call-gdk_set_allowed_backends-before-gdk_init.patch diff --git a/fontforge-20200314-Call-gdk_set_allowed_backends-before-gdk_init.patch b/fontforge-20200314-Call-gdk_set_allowed_backends-before-gdk_init.patch new file mode 100644 index 0000000..6c1e797 --- /dev/null +++ b/fontforge-20200314-Call-gdk_set_allowed_backends-before-gdk_init.patch @@ -0,0 +1,27 @@ +From ee14a6389d19e2f45219134058e07f10585fa6d3 Mon Sep 17 00:00:00 2001 +From: Jeremy Tan +Date: Thu, 2 Apr 2020 18:03:47 +0800 +Subject: [PATCH] Call gdk_set_allowed_backends before gdk_init + +Fixes #4247 +--- + fontforgeexe/startui.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fontforgeexe/startui.c b/fontforgeexe/startui.c +index 06f5200a4..114bb7fb6 100644 +--- a/fontforgeexe/startui.c ++++ b/fontforgeexe/startui.c +@@ -1182,8 +1182,8 @@ int fontforge_main( int argc, char **argv ) { + #endif + } + #ifdef FONTFORGE_CAN_USE_GDK +- gdk_init(&argc, &argv); + gdk_set_allowed_backends("win32,quartz,x11"); ++ gdk_init(&argc, &argv); + #endif + ensureDotFontForgeIsSetup(); + #if defined(__MINGW32__) && !defined(_NO_LIBCAIRO) +-- +2.26.0 + diff --git a/fontforge.spec b/fontforge.spec index eb48945..b5f7200 100644 --- a/fontforge.spec +++ b/fontforge.spec @@ -3,13 +3,16 @@ Name: fontforge Version: 20200314 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Outline and bitmap font editor License: GPLv3+ URL: http://fontforge.github.io/ Source0: https://github.com/fontforge/%{name}/archive/%{gittag0}.tar.gz#/%{name}-%{version}.tar.gz +# https://github.com/fontforge/fontforge/pull/4253 +Patch0: fontforge-20200314-Call-gdk_set_allowed_backends-before-gdk_init.patch + Requires: xdg-utils Requires: autotrace Requires: hicolor-icon-theme @@ -64,6 +67,7 @@ This package contains documentation files for %{name}. %prep %setup -q +%patch0 -p1 # Remove tests that requires Internet access sed -i '45d;83d;101d;102d;114d;115d;125d' tests/CMakeLists.txt @@ -76,9 +80,7 @@ rm -rf build && mkdir build pushd build export CFLAGS="%{optflags} -fno-strict-aliasing" -%cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DENABLE_X11=ON \ - -DTHEME=2012 +%cmake .. -DCMAKE_BUILD_TYPE=Release %{make_build} popd @@ -131,6 +133,10 @@ popd %doc %{_pkgdocdir} %changelog +* Thu Apr 02 2020 Parag Nemade - 20200314-3 +- Fix the GDK backend UI issues +- Move back to using GDK backend + * Fri Mar 27 2020 Parag Nemade - 20200314-2 - Enabled X11 and 2012 theme