From 9bff56db9f30f33cacf5b88bc3830c5ea9f61abd Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Wed, 29 Sep 2021 10:40:56 +0800 Subject: [PATCH 1/3] GDK-Win32: Fix build Include the appropriate headers as some function prototypes were moved lately. Also, re-order the include order of the gdk/*private.h headers alphabetically in the files that were updated. --- gdk/win32/gdkinput-winpointer.c | 6 ++++-- gdk/win32/gdksurface-win32.c | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gdk/win32/gdkinput-winpointer.c b/gdk/win32/gdkinput-winpointer.c index 840dbb4b4c..3c65167703 100644 --- a/gdk/win32/gdkinput-winpointer.c +++ b/gdk/win32/gdkinput-winpointer.c @@ -24,9 +24,11 @@ #include "gdkdevice-virtual.h" #include "gdkdevice-winpointer.h" #include "gdkdeviceprivate.h" -#include "gdkdisplayprivate.h" -#include "gdkseatdefaultprivate.h" #include "gdkdevicetoolprivate.h" +#include "gdkdisplayprivate.h" +#include "gdkeventsprivate.h" +#include "gdkseatdefaultprivate.h" + #include "gdkinput-winpointer.h" #include diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c index 89a614eac7..75bf874a9e 100644 --- a/gdk/win32/gdksurface-win32.c +++ b/gdk/win32/gdksurface-win32.c @@ -29,18 +29,19 @@ #include #include "gdk.h" -#include "gdksurfaceprivate.h" -#include "gdktoplevelprivate.h" -#include "gdkpopupprivate.h" -#include "gdkdragsurfaceprivate.h" #include "gdkprivate-win32.h" #include "gdkdeviceprivate.h" #include "gdkdevicemanager-win32.h" #include "gdkenumtypes.h" #include "gdkwin32.h" #include "gdkdisplayprivate.h" +#include "gdkdragsurfaceprivate.h" #include "gdkframeclockidleprivate.h" #include "gdkmonitorprivate.h" +#include "gdkpopupprivate.h" +#include "gdkseatprivate.h" +#include "gdksurfaceprivate.h" +#include "gdktoplevelprivate.h" #include "gdkwin32surface.h" #include "gdkwin32cursor.h" #include "gdkinput-winpointer.h" From a45e1a01fc2f8628bf4cffba041b90b2b734383d Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Wed, 29 Sep 2021 10:42:55 +0800 Subject: [PATCH 2/3] fp16.c: Fix float_to_half() function call Correct the function being called. --- gsk/ngl/fp16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsk/ngl/fp16.c b/gsk/ngl/fp16.c index 2f71820ce4..29e83527f3 100644 --- a/gsk/ngl/fp16.c +++ b/gsk/ngl/fp16.c @@ -146,7 +146,7 @@ float_to_half (const float *f, guint16 *h, int n) if (have_f16c_msvc ()) float_to_half_f16c (f, h, n); else - float_to_half4_c (f, h, n); + float_to_half_c (f, h, n); } void From dbd0ce30d9ec4ad0baf958087bd3ff31e1f33957 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Thu, 30 Sep 2021 16:17:48 +0800 Subject: [PATCH 3/3] meson: Improve search for libpng On Visual Studio-style builds, it is likely that we do not have pkg-config files for libpng, so improve the search for libpng by using CMake's built-in mechanisms for looking for libpng. This, however, means that we need to use 'png' rather than 'libpng' for the package name to search for. --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index e85daf88f5..dd6e9d6471 100644 --- a/meson.build +++ b/meson.build @@ -400,7 +400,7 @@ pangocairo_dep = dependency('pangocairo', version: pango_req, pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req, fallback : ['gdk-pixbuf', 'gdkpixbuf_dep'], default_options: ['png=enabled', 'jpeg=enabled', 'builtin_loaders=png,jpeg', 'man=false']) -png_dep = dependency('libpng', +png_dep = dependency(cc.get_argument_syntax() == 'msvc' ? 'png' : 'libpng', fallback: ['libpng', 'libpng_dep'], required: true) tiff_dep = dependency('libtiff-4',