Commit Graph

72292 Commits

Author SHA1 Message Date
Sebastian Dröge
c44badd26a Mark various GskTransform functions as nullable in their return value
Various transforms are normalized with their next transform, and if they
end up being the identity transform will return NULL.

For example a translation by (x,y,z) and followed by (-x,-y,-z) will
result in NULL.
2022-01-14 11:57:23 +02:00
Jonas Ådahl
66ebc660b4 wayland/surface: Use wl_surface_offset() instead of x,y of attach()
This makes the hotspot of DND surfaces work when using the Vulkan and
OpenGL renderers.

This bumps the CI image used to the newly built image. This is needed to
install a new enough libwayland-client.so needed for wl_surface.offset.

This is done by adding wayland as a meson subproject, building it
on-demand if the version in the system is not new enough. As
libwayland-client.so is pulled in implicitly when linking to gtk4, the
compile step needs LD_LIBRARY_PATH set to make ld find the right library
to link to.
2022-01-14 09:27:07 +01:00
Luca Bacci
06e5da456f Merge branch 'win32-fix-altgr-gtk4' into 'main'
IMContextSimple/IMContextIME: Fix AltGr not working on Win32 [GTK4]

See merge request GNOME/gtk!4375
2022-01-13 23:02:50 +00:00
Boyuan Yang
689486eae5 Update Chinese (China) translation 2022-01-13 20:20:45 +00:00
Emmanuele Bassi
48dc6ecfe3 Merge branch 'ebassi/docs-repo-link' into 'main'
docs: Point source links to the correct branch

See merge request GNOME/gtk!4373
2022-01-13 16:58:47 +00:00
Philip Zander
b9bc7d9166 IMContextSimple/IMContextIME: Fix AltGr not working on Win32
The old code assumed that any key press containing Ctrl or Alt cannot be
regular text input. This is not correct on Win32 as AltGr = Ctrl + Alt.
2022-01-13 17:26:59 +01:00
Emmanuele Bassi
63ee135a1e Update the link to the development branch
The default development branch for GTK is now "main".
2022-01-13 14:42:34 +00:00
Emmanuele Bassi
ca2aa52ba9 docs: Point to the correct development branch
The default development branch of GTK is now "main".
2022-01-13 14:39:39 +00:00
Emmanuele Bassi
96d28738c9 docs: Point source links to the correct branch
The default development branch for GTK is now "main".
2022-01-13 14:39:03 +00:00
Piotr Drąg
e4b05e55e1 Update POTFILES.in 2022-01-13 13:43:15 +01:00
Luca Bacci
4a4a579fd9 Merge branch 'forward-port-gdk-win32-keymap-bugfixes-to-gtk4' into 'main'
GdkWin32Keymap bugfixes

See merge request GNOME/gtk!4372
2022-01-12 21:36:19 +00:00
Fran Dieguez
df716e5c9f Update Galician translation 2022-01-12 21:35:13 +00:00
Fran Dieguez
52000177d9 Update Galician translation 2022-01-12 21:34:57 +00:00
David Hogan
7d6257cb1e
gdkkeys-win32: Perform keyboard layout substitution
For some users, GetKeyboardLayoutNameA() returns an alias instead of the
fully resolved keyboard layout identifier. In that case, we have to
query the registry to resolve the alias before we can look up the DLL
path.

See comments under https://gitlab.gnome.org/GNOME/gtk/-/issues/4610
2022-01-12 21:44:28 +01:00
Philip Zander
db0234ecb4
gdkkeys-win32: Fix handling of SGCAPS
Contrary to what you can read on the internet, SGCAPS keys don't work
by having capslock toggle the KBDCTRL bit, they actually have two
consecutive table entries, the first of which is for the normal
version and the second of which is for the capslocked version.

Background: SGCAPS is short for Swiss German caps because Swiss German
was the first layout to use this feature. For keys with the SGCAPS flag,
capslock has a different effect than pressing shift. For example:
Shift + ü = è,  CapsLock + ü = Ü,  CapsLock + Shift + ü = È
2022-01-12 21:44:24 +01:00
Philip Zander
438fad803e
gdkkeys-win32: Fix crash when keyboard DLL failed to load
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 https://gitlab.gnome.org/GNOME/gtk/-/issues/4610
2022-01-12 21:44:15 +01:00
Philip Zander
82f8f878bc
gdkkeys-win32: Add keysym mapping for capslock key
Add missing mapping between VK_CAPITAL and GDK_KEY_Caps_Lock, so
applications get a meaningful keyval rather than ffffff.
2022-01-12 21:44:07 +01:00
Philip Zander
b0818f9535
gdkkeys-win32: Fix capslock handling
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
2022-01-12 21:43:53 +01:00
Luca Bacci
c71cb35e9d Merge branch 'forward-port-rewrite-gdkwin32keymap-to-gtk4' into 'main'
Rewrite GdkWin32Keymap (V2)

Closes #1033 and #2055

See merge request GNOME/gtk!4338
2022-01-12 19:53:54 +00:00
Luca Bacci
5bf5d25bc1 Merge branch 'fix-build-no-pangoft' into 'main'
Improve and fix building font features on Windows (was: Fix builds without PangoFT2)

Closes #4605

See merge request GNOME/gtk!4339
2022-01-12 19:53:39 +00:00
Matthias Clasen
45d6b3ba51 Merge branch 'fabian.kirsch-main-patch-28134' into 'main'
corrected small typo input-handling.md

See merge request GNOME/gtk!4368
2022-01-12 19:38:10 +00:00
Matthias Clasen
e4e1b9ccbe Merge branch '4627-printing-Unref-old-spool_io-before-setting-new-one' into 'main'
printing: Unref old spool_io before setting new one

Closes #4627

See merge request GNOME/gtk!4370
2022-01-12 19:37:18 +00:00
Matthias Clasen
d50df7db37 Merge branch 'revert-texture-annotations' into 'main'
Revert "gir: Annotate `GdkTexture` constructors for reading from a...

See merge request GNOME/gtk!4371
2022-01-12 19:34:18 +00:00
Matthias Clasen
7257d1c15f Revert "gir: Annotate GdkTexture constructors for reading from a file/memory/resource to return a GdkMemoryTexture"
This reverts commit ae8e844dec.

No agreement that this will stay this way going forward.
2022-01-12 14:11:20 -05:00
Philip Zander
ea65abc7e2
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.

See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4338
2022-01-12 19:01:35 +01:00
Marek Kasik
915090f118 printing: Unref old spool_io before setting new one
Unref private spool_io of GtkPrintJob before setting it to a new one
in gtk_print_job_set_source_file() and gtk_print_job_set_source_fd()
to prevent a leak.

Fixes: #4627
2022-01-12 12:47:28 +01:00
Chun-wei Fan
629dcd3dcf meson.build: Don't apply iso-codes cflag on Windows
They are no longer applicable for Windows builds.
2022-01-12 17:29:30 +08:00
Chun-wei Fan
169172a9e0 demos: Always build font explorer demo
We are no longer using PangoFT2 APIs in this demo, so make sure that we build
it on all builds since we already depend on a HarfBuzz/Pango version that
provide everything that we need here.

Drop the unnecessary pangofc-font.h include as a result.
2022-01-12 17:29:30 +08:00
Chun-wei Fan
0a3fad4d47 gtk-demo/language-names.c: Acquire language names natively on Windows
Like what was done on gtk/language-names.c, acquire the language names via the
native Windows NLS APIs, eliminating a run-time dependency on iso-codes on
Windows.
2022-01-12 17:29:30 +08:00
Chun-wei Fan
b666a767e4 language-names: Use Windows APIs to acquire language names
Instead of relying on the iso-codes package, use the native Windows NLS APIs to
acquire the localized (translated) language names so that we do not need to
incur an extra runtime dependency on Windows.  It's not coverering 100% of the
languages that we would like to support through this, but should cover much of
the things that are required.
2022-01-12 17:29:30 +08:00
Chun-wei Fan
ee2dd1acc7 gtk/meson.build: Fix builds without PangoFT2
We aren't really using PangoFT2 for [language|script]-names.c, and are
always using items from them, so make sure they are being built.

Also always include the pangoft2 dependency in gtk_dep if it is found.
2022-01-12 17:29:28 +08:00
Fabian Kirsch
4f36583898 corrected small typo input-handling.md 2022-01-12 09:02:01 +00:00
Matthias Clasen
21d40fc038 Merge branch 'fix-directory-list' into 'main'
directorylist: Fix several issues

Closes #3784

See merge request GNOME/gtk!4367
2022-01-12 02:58:25 +00:00
Matthias Clasen
93ff65c685 Merge branch 'should_be_mapped' into 'main'
gdk/wayland/surface: Remove redundant `should_be_mapped` code

See merge request GNOME/gtk!4203
2022-01-12 02:48:10 +00:00
Matthias Clasen
7e7201745d Merge branch 'wip/keep-scale' into 'main'
wayland/surface: Only update the scale if on any outputs

See merge request GNOME/gtk!4352
2022-01-12 02:46:43 +00:00
Matthias Clasen
50a986605c Merge branch 'ebassi/for-main' into 'main'
tests: Don't drop chdir()'s return value on the floor

See merge request GNOME/gtk!4328
2022-01-12 02:45:15 +00:00
Matthias Clasen
96994568fd Merge branch 'bilelmoussaoui/build' into 'main'
meson: only update-icon-cache when the demos are built

See merge request GNOME/gtk!4358
2022-01-12 02:44:29 +00:00
Matthias Clasen
b494d94bdb Merge branch 'drop-script-names' into 'main'
Drop the script name data

See merge request GNOME/gtk!4361
2022-01-12 02:43:54 +00:00
Matthias Clasen
9d6ccc0fe0 Merge branch 'texture-new-return-types' into 'main'
gir: Annotate `GdkTexture` constructors for reading from a...

See merge request GNOME/gtk!4365
2022-01-12 02:42:17 +00:00
Matthias Clasen
a56e187352 Merge branch 'nielsdg/gsk-gl-renderer-assertion' into 'main'
gsk: Document gsk_renderer_realize()

See merge request GNOME/gtk!4363
2022-01-12 02:41:32 +00:00
Matthias Clasen
dcdcc659ef directorylist: Fix several issues
We were handling events in the wrong order,
by doing async calls for some of them, but not
for all of them.

And we were not taking into account that GFileMonitors
RENAMED events may or may not move a file on top
of an existing file.

Fixes: #3784
2022-01-11 21:35:19 -05:00
Sebastian Dröge
ae8e844dec gir: Annotate GdkTexture constructors for reading from a file/memory/resource to return a GdkMemoryTexture 2022-01-11 15:46:22 +02:00
Niels De Graef
e566ba54d9 gsk: Document gsk_renderer_realize()
Document the return value and more importantly, specify that a call to
`gsk_renderer_realize()` needs to be matched with a call
`gsk_renderer_unrealize()`.

Prevents issues like https://gitlab.gnome.org/GNOME/gtk/-/issues/4625
2022-01-11 13:09:53 +01:00
Matthias Clasen
70732afb95 Drop the script name data
It is not used in GTK itself, and gtk4-demo
has its own copy.
2022-01-10 10:43:05 -05:00
Danial Behzadi
f2aed69f87 Update Persian translation 2022-01-10 11:39:53 +00:00
Emmanuele Bassi
6bd96522e8 Merge branch 'docs-typo-list' into 'main'
Fix typo in IconView docs

See merge request GNOME/gtk!4360
2022-01-09 13:28:57 +00:00
Sebastian Dröge
1e26c352d6 Fix typo in IconView docs
g_lsit_free_full() -> g_list_free_full()
2022-01-09 13:59:59 +02:00
Timm Bäder
2de65ebd4d Merge branch 'wip/smcv/png-endian' into 'main'
png: Correct endianness for big-endian machines

Closes #4616

See merge request GNOME/gtk!4357
2022-01-09 08:21:54 +00:00
Bilal Elmoussaoui
ed3d9aaaed meson: only update-icon-cache when the demos are built
Without building the demos, nothing gets installed into $prefix/share/icons/hicolor. Which makes running 
`gtk4-update-icon-cache` on the machine causes an error. This is easily reproducible on a Windows machine with MSVC where 
there is nothing pre-installed on hicolor icon theme and that makes building gtk without the demos fails with "No such file or directory".
2022-01-09 07:27:59 +00:00
Jordi Mas
27a3998c8f Update Catalan translation 2022-01-08 22:55:05 +01:00