Commit Graph

52638 Commits

Author SHA1 Message Date
Chun-wei Fan
eebc70bf27 Visual Studio projects: Simplify building font features demo
Improve the NMake Makefiles that is used to re-generate demos.h(.win32)
by re-generating the gtk3-demo Visual Studio projects, so that one would
no longer need to do that manually.

Update the build instructions accordingly.
2022-01-05 17:16:00 +08:00
Chun-wei Fan
cef3293184 Visual Studio projects: Generate versioned sources
Instead of relying on the ones that are currently shipped with the tarballs,
generate them from their .in counterparts prior to the build.  This includes
the Resource Scripts (.rc) for libgdk/libgtk, as well as gtkversion.h, in
addition to gdkversionmacros.h which can now be generated during prebuild.
2022-01-04 14:17:38 +08:00
Chun-wei Fan
089cccc929 Visual Studio: Make gen-gdkversionmacros-h.py generic
Rename the script as gen-version-items.py, and so make things more generic and
usable by other items in the build.  We want to eventually to be able to
generate the .rc files and the *version*.h files from their *.in counterparts
using this script.
2022-01-04 11:14:49 +08:00
Chun-wei Fan
fc8b70cbdf config-msvc.mak.in: Record the interface age
We want to make use of this so that we can generate the various versioned
sources easily, such as the Windows .rc scripts and the [gdk|gtk]version*.h.
2022-01-04 11:14:49 +08:00
Chun-wei Fan
6789ff7443 Visual Studio projects: Improve generating libgtk sources
This improves the source generating process by:

*  Generating the sources in the libgtk build directory, so that we do not
   pollute the source tree.
*  Support generating gtk[private]typebuiltins.[c|h] in the Visual Studio
   projects by using NMake internally.
*  Update the projects and the introspection build files so that the generated
   sources and headers can be found.
2022-01-04 11:14:41 +08:00
Chun-wei Fan
8eaddde310 gtk/build: Split out part of headers listings
This will enable us to share this list with the NMake Makefiles that will be
used to generate the gtk[private]typebuiltins.[c|h] in the Visual Studio
projects.
2022-01-04 11:07:28 +08:00
Chun-wei Fan
67f27409e0 GDK/build: Rename deprecated_h_sources to gdk_deprecated_h_sources
This will enable us to not confuse with the deprecated headers in
gtk/deprecated as those headers are also listed under deprecated_h_sources in
gtk/deprecated/Makefile.inc, when we include the makefile snippets in both
gdk/ and gtk/.
2022-01-04 11:07:28 +08:00
Chun-wei Fan
334333f779 Visual Studio projects: Improve generating GDK sources
This makes the rest of the sources that are generated being put in GDK's build
directory for the Visual Studio projects, instead of being placed in GDK's
source subdir, so that:

*  We can avoid polluting GDK's source tree.
*  The Visual Studio builds won't interfere with the Meson builds.

Update the project files to look for the generated sources and headers in the
right places, as well as making the introspection builds look for the generated
sources as well.

Also remove the gtk3-gen-srcs property sheets and put the relevant parts in the
corresponding gtk3-build-defines property sheets, to clean things up a bit.
2022-01-04 11:07:28 +08:00
Chun-wei Fan
74d43defc5 win32: Support (re-)generating gdkenumtypes.[c|h]
Add support in the NMake Makefiles used by the Visual Studio builds to generate
the enumeration sources in gdk/ in its own build directory.
2022-01-04 11:07:27 +08:00
Chun-wei Fan
caa1c0e4e5 gdk: Split out public headers listing
This is so that we can share the list with other Makefile-based build systems
to generate the enumeration sources.
2022-01-04 11:07:27 +08:00
Chun-wei Fan
61dd680b02 win32: Re-organize NMake Makefiles a bit
This way, we can have the introspection NMake Makefiles share more items
with the source generating bits.

Update the Visual Studio projects accordingly
2022-01-04 11:07:27 +08:00
Luca Bacci
6671c20632 Merge branch 'winpointer-fix-key-state' into 'gtk-3-24'
Winpointer: Fix keyboard state

See merge request GNOME/gtk!4327
2022-01-03 18:49:13 +00:00
Luca Bacci
0603dbb466 Merge branch 'filechoosernative-win32-invisible' into 'gtk-3-24'
GTK grab for GtkFileChooserNativeWin32

See merge request GNOME/gtk!4326
2022-01-03 16:12:43 +00:00
Luca Bacci
46c12b2c92
Winpointer: Fix keyboard state
The dwKeyStates field of the POINTER_INFO structure is
always set to 0 no matter what.

Use GetKeyState instead.

Fixes https://gitlab.com/inkscape/inbox/-/issues/5946
2022-01-03 15:08:58 +01:00
Luca Bacci
d3f46bcb16
Add GTK grab when opening GtkFileChooserNativeWin32
Implementation copied from gtkfilechoosernativeportal.c

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4582
2022-01-03 14:51:57 +01:00
Luca Bacci
728f0e13a8 Merge branch 'fix_windows_build' into 'gtk-3-24'
Fix Windows build in gtk 3.24.31

See merge request GNOME/gtk!4292
2022-01-02 16:27:33 +00:00
Luca Bacci
23f49038e3 Merge branch 'fix-4565' into 'gtk-3-24'
Font features: Fix building with Pango before 1.44.0

See merge request GNOME/gtk!4302
2022-01-02 15:51:51 +00:00
Luca Bacci
f6fe5d37a5 Merge branch 'more-vs2022-fixes' into 'gtk-3-24'
Some further Visual Studio 2022 build improvements (for gtk-3-24 only)

See merge request GNOME/gtk!4276
2022-01-02 15:50:25 +00:00
Luca Bacci
6ba7c50a7a
Add hid.lib to GDK .pc file 2022-01-02 16:11:03 +01:00
Chun-wei Fan
bec88ded5f demos/gtk-demo/font_features.c: Fix build on Pango < 1.44.x
The Pango headers prior to 1.44.0 do not include the HarfBuzz headers, so we
need to re-structure how we check for HarfBuzz 2.2.0 or later if we have Pango
1.44.x or later.

Fixes issue #4565.
2021-12-30 15:33:14 +08:00
Chun-wei Fan
b0e3d03831 gtkfontchooserwidget.c: Fix build with pre-1.44.x Pango
Pango headers after 1.44.0 include hb.h automatically, but not before, so
re-structure the #if/#elif/#else checks for the availability of HarfBuzz 2.2.0
or later.

Pointed out in issue #4565.
2021-12-30 15:26:44 +08:00
Matthias Clasen
cae257c9dc Merge branch 'meson-reftests' into 'gtk-3-24'
meson: Do not install reftests

See merge request GNOME/gtk!4280
2021-12-29 14:42:35 +00:00
Matthias Clasen
8fe3e09cfc Merge branch 'gtk-3-24-macos-dock-quit' into 'gtk-3-24'
macOS: Dock "Quit" invokes "app.quit" action

See merge request GNOME/gtk!4299
2021-12-29 14:28:47 +00:00
Matthias Clasen
8352dee082 Merge branch 'gtk-3-24-issue-4573' into 'gtk-3-24'
macOS: Fix QuartzCore linking and compiling with 10.11

See merge request GNOME/gtk!4298
2021-12-29 13:55:43 +00:00
Thomas Holder
cbd9715c3c macOS: Dock "Quit" invokes "app.quit" action
Allows the application to handle "Dock icon > Quit" the same as
"Application menu > Quit".

Requires GtkApplication's `register-session` property.

Suitable replacement for gtk-mac-integration's
`NSApplicationBlockTermination` signal.
2021-12-29 13:51:01 +01:00
Thomas Holder
0ac6144369 macOS: Fix QuartzCore linking and compiling with 10.11
Follow-up on 10b5f8a0d6

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4573
2021-12-29 11:33:50 +01:00
Melroy van den Berg
37f9af5805
Add define for GC_ALLGESTURES, in-case WINVER is not set. 2021-12-28 00:50:17 +01:00
Melroy van den Berg
4090306fd7
Lowercaps Windows.h -> windows.h 2021-12-28 00:47:28 +01:00
Luca Bacci
e6e4f9e630 Merge branch 'fix_gtk_switch_cleanup' into 'gtk-3-24'
Fix: GTK Switch crash under Windows, on exit.

See merge request GNOME/gtk!4291
2021-12-27 20:39:05 +00:00
Melroy van den Berg
1ce49e48b2 Fix: GTK Switch crash under Windows, on exit. 2021-12-27 20:39:04 +00:00
David King
7f295eeb32 meson: Do not install reftests
Match the testsuite in the main branch.
2021-12-23 10:57:58 +00:00
Chun-wei Fan
04496cc535 win32/detectenv-msvc.mak: Add section on VS2022
This will make introspection builds via the Visual Studio 2022 projects work as
the NMake Makefiles were looking for VS2019 builds, which most probably did not
exist
2021-12-22 10:12:22 +08:00
Chun-wei Fan
92a8e10789 meson: Make VS2022 builds distinct from VS2019
Make sure that we append the 'vs17' suffix to the DLL filenames rather than
appending 'vs16', so that VS2022 builds are distinct from the VS2019 ones.
2021-12-22 10:12:12 +08:00
Matthias Clasen
aa89959942 Merge branch 'fix-dist' into 'gtk-3-24'
gdk/win32/Makefile.am: Dist gdkkeys-win32.h

See merge request GNOME/gtk!4270
2021-12-21 19:25:50 +00:00
Matthias Clasen
bae1a43710 Merge branch 'high-contrast-3' into 'gtk-3-24'
gdk/wayland: Support new `high-contrast` key

See merge request GNOME/gtk!4272
2021-12-21 19:25:32 +00:00
Matthias Clasen
a4b522f6d7 Merge branch 'meson-fixes' into 'gtk-3-24'
Meson fixes

See merge request GNOME/gtk!4273
2021-12-21 19:25:16 +00:00
Matthias Clasen
01cb9b5ae6 Update meson build for recent changes
Adapt the meson build to the changes in
commit 93e1f7f1ec.
2021-12-21 14:22:45 -05:00
David King
208e115368 Revert "meson: simplify builtin_immodules build option"
This reverts commit 749a58ab26.

This maintains feature parity with the autotools build. To achieve the
equivalent of --with-included-immodules=wayland,
-Dbuiltin_immodules=wayland,waylandgtk can be used instead.
2021-12-21 14:36:16 +00:00
David King
2b566f0633 meson: Install example schema XML 2021-12-21 13:31:35 +00:00
Florian Müllner
da8f634b25 gdk/wayland: Support new high-contrast key
We now have a boolean setting that determines whether the high-contrast
theme should be used. Support it by automatically setting the existing
`gtk-theme-name` and `gtk-icon-theme-name` properties when enabled.

With that, it is no longer necessary to change the regular theme settings
for high-contrast, so toggling between high-contrast and a non-default
theme finally works reliably.
2021-12-21 14:01:10 +01:00
David King
9bad0a2d5e meson: Remove missing reftests
Removed from autotools build in commit
93e1f7f1ec.
2021-12-21 10:09:29 +00:00
Chun-wei Fan
1a73728e04 gdk/win32/Makefile.am: Dist gdkkeys-win32.h
This was missing from the tarball.
2021-12-21 16:38:17 +08:00
Matthias Clasen
ab45bde94c 3.24.31 2021-12-20 23:01:49 -05:00
Matthias Clasen
93e1f7f1ec Remove a bunch of failing reftests
Still not enough to make distcheck pass.
Giving up on it :(
2021-12-20 23:01:34 -05:00
Matthias Clasen
62768629f2 Fix distcheck 2021-12-20 17:18:55 -05:00
Matthias Clasen
7521de1d61 NEWS: Updates 2021-12-20 13:29:09 -05:00
Matthias Clasen
292be6c4bb Merge branch 'gtk-3-24-bigsur-perf' into 'gtk-3-24'
macOS: Big Sur performance patch

See merge request GNOME/gtk!4265
2021-12-20 15:42:52 +00:00
Lukas Oberhuber
10b5f8a0d6 macOS: Big Sur performance patch
One of 4 that were applied on Gimp 2.99. Original authorship
@DesMcGuiness and adapted to Gtk3 by @lukaso
2021-12-18 22:59:58 +00:00
Matthias Clasen
c3b3f4711d Merge branch 'gtk-3-24' into 'gtk-3-24'
gdkquartz: fix crash on uninitialized attribute

See merge request GNOME/gtk!4257
2021-12-16 13:43:32 +00:00
Lukas Oberhuber
71e2821578 gdkquartz: fix crash on uninitialized attribute
`gdk_quartz_display_get_monitor_at_window` crashes when it tries to access the NSWindow on
an offscreen window. The attribute `toplevel` of `impl` is uninitialized and
causes a segfault.

This partially fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/7608
2021-12-16 13:00:02 +00:00