Commit Graph

52799 Commits

Author SHA1 Message Date
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
9bad0a2d5e meson: Remove missing reftests
Removed from autotools build in commit
93e1f7f1ec.
2021-12-21 10:09:29 +00:00
1a73728e04 gdk/win32/Makefile.am: Dist gdkkeys-win32.h
This was missing from the tarball.
2021-12-21 16:38:17 +08:00
ab45bde94c 3.24.31 2021-12-20 23:01:49 -05:00
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
62768629f2 Fix distcheck 2021-12-20 17:18:55 -05:00
7521de1d61 NEWS: Updates 2021-12-20 13:29:09 -05:00
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
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
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
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
fde4431559 Update Icelandic translation 2021-12-15 19:52:29 +00:00
d45b11e8ea Update Icelandic translation 2021-12-15 19:48:09 +00:00
ff06d5d59f Merge branch 'win32-rewrite-keymap-v2' into 'gtk-3-24'
Rewrite GdkWin32Keymap (V2)

See merge request GNOME/gtk!1051
2021-12-15 11:15:27 +00:00
ef95b58500 Merge branch 'gtk-3-24' into 'gtk-3-24'
textview: Add CSS letter spacing [GTK3]

See merge request GNOME/gtk!4254
2021-12-14 18:30:45 +00:00
70ef77a4c2 Add CSS letter spacing to textview 2021-12-14 17:04:38 +01:00
2800dc356b Merge branch 'gtk-3-24-x11-xi2.4-gestures' into 'gtk-3-24'
[GTK3] Touchpad gestures for X11 (XInput 2.4, X Server 21.1)

See merge request GNOME/gtk!4212
2021-12-13 13:21:09 +00:00
e658e3c449 gdk/win32: Fix modifiers sometimes being consumed for special keys
Windows keymaps contain some bogus mappings, e.g. Ctrl+Backspace=Delete.
Previously, we correctly identified the key as Backspace, but the Ctrl
was still consumed, so the Ctrl+Backspace keybinding did not work.
2021-12-10 01:14:47 +01:00
b3fcfa4bbc gdk/win32: Fix group parameter not being used by translate_keyboard_state
gdk_win32_keymap_translate_keyboard_state erroneously used the active
group rather than the specified group, which caused shortcuts not to
work in Inkscape when using a Cyrillic layout.
2021-12-09 12:29:19 +01:00
4601d3aee4 gdk/win32: Add licensing boilerplate to gdkkeys-win32 2021-12-09 12:29:15 +01:00
64eedbfaf4 gdk/win32: Remove unneeded struct _GdkWin32KernelCPUFuncs
It only had a single member and was only used internally by one
function.
2021-12-08 22:46:52 +01:00
4a55c527d7 gdk/win32: Consolidate CPU detection in one place
This consolidates the check for the running CPU in one single location,
to make things a bit cleaner, as:

* We can make use of IsWow64Process2(), if available, to check both
  whether we are running on an ARM64 CPU, and whether we are running as
  a WOW64 process.  This is also the function to use to properly check
  whether we are running as a WOW64 process on ARM64 systems, as
  IsWow64Process() does not work as we want on ARM64 systems.

* If we don't have IsWow64Process2() (which is absent from Windows prior
  to Windows 10 1511, where ARM64 Windows is introduced), we can fall
  back to  IsWow64Process(), which will tell us whether we are running
  as an WOW64 process (but clearly not on an ARM64 system).

Also clean up things a bit so that we can reduce reliance on global
variables.
2021-12-08 22:46:49 +01:00
aa3e6bb0a3 GdkWin32Keymap: Be more robust against DLL loading failures
Fixes failure on the CI servers when generating GIR files
2021-12-08 22:44:20 +01:00
4039153ca7 Rewrite GdkWin32Keymap (load table directly from layout DLL)
The old code used repeated calls to `ToUnicodeEx` to populate
the translation table, which is slow and buggy. The new code
directly loads the layout driver DLLs from Windows.

Associated issues: #2055 #1033
Merge request: !1051

GdkWin32Keymap cleanup

Conform to C89, improve comments, whitespace
2021-12-08 22:44:17 +01:00
068df4874a Merge branch 'wayland-clipboard-fix' into 'gtk-3-24'
wayland: Ensure clipboard handling doesn't lock up in certain corner cases

See merge request GNOME/gtk!4058
2021-12-06 11:16:54 +00:00
e23b4dd21b wayland: Ensure clipboard handling doesn't lock up in certain corner cases
When a selection request fails to be converted to the requested format in the
GTK layers, the wayland backend would miss bumping the machinery to handle
further pending selection requests. Fix this by reacting to
GdkDisplay::send_selection_notify with target=GDK_NONE (i.e. a failed
conversion as hinted from the upper layers) to do that.

This ensures the clipboard handling doesn't lock up in the following
scenarios:
  - GTK returned with a mismatching type to the one requested
  - GTK fails to convert to the requested type

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4340
2021-12-06 11:30:11 +01:00
a94baf4c3d gdk/x11: Report XI2 version on the server 2021-12-03 00:04:10 +02:00
a1a2f8ab56 gdk/x11: Implement XI2.4 touchpad gesture support 2021-12-03 00:04:10 +02:00
2db8f64ca7 Update Occitan translation 2021-12-02 15:48:19 +00:00
15d9b3c7d6 Merge branch 'backport-font-feature-pango-hb' into 'gtk-3-24'
Backport font features code utilizing Pango with HarfBuzz integration (1.44.x) for gtk-3-24

See merge request GNOME/gtk!4206
2021-12-01 15:47:30 +00:00
1b789197e5 fontchooser: Avoid setting variations needlessly
Setting variations to their default value causes
them to show up in the serialization of the font
description - a font description has no idea about
the default values, so can't filter them out.

Avoid that.
2021-11-29 13:05:02 +08:00
28337d68a3 Visual Studio projects: Update README for additional features
Rename README_EGL_MSVC.txt to README_FEATURES_MSVC.txt, as we now have
more features that can be included in the builds using the Visual
Studio projects, which require additional depedencies and manual
enabling.

Specifically, this outlines how the font tweaking feature in libgtk can
be enabled and for people who wish to do so, how to enable the Font
Features demo in gtk3-demo.exe.
2021-11-29 12:25:53 +08:00
f82eb198f2 Meson: Enable font features demo on later Pango versions
...even if PangoFT2 is not present, provided that Pango 1.44.0+ and
HarfBuzz 2.2.0+ are installed.  The demo now has added support for later
Pango versions that use HarfBuzz for shaping on all supported platforms.
2021-11-29 12:25:53 +08:00
720e335246 configure.ac: Check for Pango 1.44.0 or later
...and HarfBuzz 2.2.0 or later so that we can enable the font feature
demo even if we do not have PangoFT2.
2021-11-29 12:25:53 +08:00
b8e78f83ce Font features demo: Port to newer Pango
...if Pango 1.44.0+ and HarfBuzz 2.2.0+ are available, otherwise we
stick on to the current code path.

This way, we can have people build and run the demo even without
PangoFT2 if Pango 1.44.0 or later and HarfBuzz 2.2.0 or later is
installed.
2021-11-29 12:25:53 +08:00
079ee4e31e win32/generate-msvc.mak: Add rule to regenerate demos.h.win32
We can regenerate demos.h.win32 with or without the font features demo
by using the regenerate-demos-h-win32 target with or without secifying
the FONT_FEATURES_DEMO=1 flag on the NMake command line.
2021-11-29 12:25:53 +08:00
f8200470da gtk-demo: Split out demo sources from Makefile.am
This way, we can share the demo listing to be used in other build
Makefile-based build systems, such as the auxiliary NMake Makefiles used
to generate the various sources.
2021-11-29 12:25:52 +08:00
c3c759cbdd Visual Studio projects: Define __MSVC_PROJECTS__
...in the libgtk3 project, so that we can automatically link to
harfbuzz.lib if we have a sufficiently-new version of Pango and HarfBuzz
installed, so that the code to enable font features can be linked
properly, even if we don't explicitly put harfbuzz.lib in the list of
libraries that we feed into the linker in the project files.

If one is using pre-Pango-1.44.x and/or pre-HarfBuzz-2.2.0 and intends
to enable font features support, one still must update config.h.win32 to
make sure HAVE_PANGOFT2 and HAVE_HARFBUZZ is defined, and put
pangoft2-1.0.lib, harfbuzz.lib and freetype.lib (or so) in the
"Additional Libraries" under the linker settings in the projects
manually, as required before.
2021-11-29 12:25:52 +08:00
e1422d73b1 gtkfontchooserwidget.c: Always enable font features with later Pango
This is a backport of the code in GTK4 where we can use the font
features that is given to us via HarfBuzz if we have Pango 1.44.x and
HarfBuzz 2.2.0 or later installed, even if we do not have PangoFT2
aavilable.

Since Pango 1.44.x depends on HarfBuzz for all platforms after 1.44.0,
we could take advantage of that and build the support in
GtkFontChooserWidget.

Add a directive that is to be used by Visual Studio compilers via the
Visual Studio projects to link to harfbuzz.lib automatically, so that
this support can be linked properly if we have the required Pango and
HarfBuzz headers and lib's installed.  Meson builds via Visual Studio
should handle this automatically, since pkg-config is being used there.

Since HAVE_PANGOFT2 and HAVE_HARFBUZZ is not defined by default in the
Visaul Studio projects, we will leave it up to the user to enable them
themselves and put in pangoft2-1.0.lib and harfbuzz.lib in the project
settings by themselves, or they could use Meson, as we did before.
2021-11-29 12:25:52 +08:00
6c4cc93121 Update Occitan translation 2021-11-28 13:24:15 +00:00
ee79334a52 Merge branch 'fix-printoperation-win32' into 'gtk-3-24'
gtkprintoperation-win32.c: Fix build on Visual Studio

See merge request GNOME/gtk!4193
2021-11-25 11:33:38 +00:00
dfbcc0849b gtkprintoperation-win32.c: Fix build on Visual Studio
Cast the result of GetWindowLongPtrW() to void * so that we won't get
the C4047 warnings, which are considered an error in building the GTK
stack.
2021-11-25 19:00:22 +08:00
34038aaf7d Merge branch 'wip/fix-randr-race-3-24' into 'gtk-3-24'
x11: Trap error when getting CRTC info [3.24]

See merge request GNOME/gtk!4168
2021-11-24 16:48:39 +00:00
0e48d8d7e3 Merge branch 'quartz-fix-keyboard-layout-notification' into 'gtk-3-24'
Quartz: Fix race for keyboard layout change notifications

See merge request GNOME/gtk!4190
2021-11-24 15:56:00 +00:00
78a0cdde83 Quartz: Fix keyboard layout notification
Register for notifications before initializing keymaps
2021-11-24 16:20:02 +01:00
c2e6fcc92d Merge branch 'win32-theme-fixes' into 'gtk-3-24'
Win32 theme fixes

See merge request GNOME/gtk!4189
2021-11-23 13:25:08 +00:00
466619f7c1 win32 theme: Draw expander arrow
Better than nothing.
2021-11-23 12:42:41 +01:00
2f30e12de7 win32 theme: Fix unfocused window buttons 2021-11-23 12:35:39 +01:00
bfe7a57b76 win32 theme: fix disabled GtkEntry style 2021-11-23 12:27:47 +01:00
f9d82e965e win32 theme: Fix levelbar and tweak progressbar
Both have a similar look now
2021-11-23 12:05:51 +01:00