DLL loading failures should not happen under normal circumstances, but
we should at least try not to crash and and print better diagnostic
messages if they do happen.
See #4610
Previously, we treated CapsLock and KanaLock as part of the global
keyboard state, much like NumLock and ScrollLock, rather than using
the supplied modifier mask. This was because GDK does not have a
modifier mask for KanaLock, only for CapsLock, so it would not have been
possible to properly support it.
However, this approach ended up causing problems, with certain keyboard
shortcuts not registering when capslock was active. This was first
observed in Inkscape [0] and appears to affect shortcuts consisting of a
single key (like 'a') with no additional modifiers (wheareas shortcuts
like 'ctrl+a' work).
So now we are using the supplied GDK_LOCK_MASK instead, and dropped
support for KanaLock, which we probably don't need anyway (since regular
text input should be handled by the IME input module -- the keymap is
mainly for shortcuts and keybindings, where you don't really want
KanaLock).
[0] https://gitlab.com/inkscape/inkscape/-/issues/3082
GTK WIn32 theme - make buttons with .flat class appear flat and buttons in toolbar non-flat if they don't have said class
See merge request GNOME/gtk!4350
gdk_win32_keymap_get_entries_for_keycode() did not initialize n_entries,
which led to a wrong number of items being returned in some cases.
/fixes #4610
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.
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.
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.
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.
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.
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/.
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.
This way, we can have the introspection NMake Makefiles share more items
with the source generating bits.
Update the Visual Studio projects accordingly
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.
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.
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.
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
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.
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.