82506 Commits

Author SHA1 Message Date
Benjamin Otte
a74457697e build: Fix MSVC warning due to Pango bug
Pango unconditionally defines STRICT, which we use, see
https://learn.microsoft.com/en-us/windows/win32/winprog/enabling-strict

And that causes a duplicate definition, so we undefined it before
including the offending Pango header.

See also https://gitlab.gnome.org/GNOME/pango/-/merge_requests/749
2024-10-21 07:35:42 +02:00
Benjamin Otte
9a59fce106 treerbtree: Fix MSVC compiler warnings the simplest way
It's deprecated code after all.
2024-10-21 07:35:42 +02:00
Benjamin Otte
ea3aad2848 inspector: Don't shadow connect(2) 2024-10-21 07:35:42 +02:00
Benjamin Otte
4f3ebb9e9f shortcutssection: Fix MSVC warning
... and simplify what's actually going on.

  ABS (n_rows - n) < ABS ((n_rows - height) - (n + height))
Those values are all unsigned, so this is equivalent to
  n_rows - n < (n_rows - height) - (n + height)
The math on the right is confusing but can be rearranged:
  n_rows - n < n_rows - n - 2 * height
With x = n_rows - n, this simplifies to:
  x < x - 2 * height
Which is only true if it underflows, ie if
  x < 2 * height
Resubstituting the old values gives:
  n_rows - n < 2 * height
Which is the value I used.
2024-10-21 07:35:42 +02:00
Benjamin Otte
5a6ea4ac86 timsort: add ELEM_REV()
for reverse-element lookup.

Because our indices are always unsigned, we need to take special care
to not trigger compiler warnings when doing negative array indexing.

And yes, for now "0 - x" is good enough.
2024-10-21 07:35:42 +02:00
Benjamin Otte
516506e1ad inspector: Rename enum
SEVERITY_ERROR is part of Windows COM error handling, see
https://learn.microsoft.com/en-us/windows/win32/com/structure-of-com-error-codes
2024-10-21 07:35:42 +02:00
Benjamin Otte
faae6f4c19 tests: Fix file to be Unicode 2024-10-21 07:35:42 +02:00
Benjamin Otte
4fcdcc2e50 textview: Don't overflow
Both numbers are unsigned, so the result is always unsigned.
(Which also means ABS() doing a < 0 check doesn't work.)
And that in particular means that end - begin overflows to a very
large number when begin > end.
2024-10-21 07:35:42 +02:00
Benjamin Otte
5637b3ba20 gpu: Avoid duplicated name with Windows API
CacheData is an enum value, see
https://learn.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-processor_cache_type
2024-10-21 07:35:42 +02:00
Benjamin Otte
225acbb12b build: Fix MSVC warning about casting
enums and uints might have a different size, so
pointers to enums and poiters to uints don't match.
2024-10-21 07:35:42 +02:00
Benjamin Otte
9e38c628f2 roundedbox: Fix shadowed name of Windows API
Arc() is a GDI function that draws an arc:
https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-arc
2024-10-21 07:35:42 +02:00
Benjamin Otte
19e1eee05a treeview: Fix MSVC warning
This code was unnecessary.
2024-10-21 07:35:42 +02:00
Benjamin Otte
67a34ac1d2 build: Fix MSVC warning about type mismatch
G_STRUCT_OFFSET() returns a long.
long is a 32bit type on 64bit Windows.
Casting int to pointer of different size causes a warning.
2024-10-21 07:35:42 +02:00
Benjamin Otte
be08be2fa9 renderer: Remove unneeded headers 2024-10-21 07:35:42 +02:00
Benjamin Otte
2646785e4c build: Fix MSVC warning about non-matching types 2024-10-21 07:35:41 +02:00
Benjamin Otte
66e059ae52 build: Fix MSVC warning about function prototypes
We're using custom sorters and those want int as the return value,
not GtkOrdering.
2024-10-21 07:35:41 +02:00
Benjamin Otte
591bc5edc0 build: Work around duplicated define of APIENTRY
epoxy defines it if windows.h hasn't been included.
So include windows.h before epoxy.

See also https://github.com/anholt/libepoxy/issues/299
2024-10-21 07:35:41 +02:00
Benjamin Otte
b5f9d98955 build: Fix MSVC warning
INPUT is a name for a Windows type, see
https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-input
2024-10-21 05:25:25 +02:00
Benjamin Otte
fdb4469234 testsuite: Don't use random numbers in test output
glibc prints the value as 0.096203, msvcrt prints 0.0962031.
And I don't think any spec defines which way things need to be rounded.
2024-10-20 23:53:04 +02:00
Benjamin Otte
01c754f93b testsuite: Windows separators are different
On top of that we defined a preprocessor constant to 2 different
values, but instead of checking the value, we only checked if
it was defined. Now we only define it in one place.
2024-10-20 23:53:04 +02:00
Benjamin Otte
3694aed022 build: Use sources argument
Being more explicit is better.
2024-10-20 23:53:04 +02:00
Benjamin Otte
a891c90798 win32: Use right name for GIO_USE_VOLUME_MONITOR in CI 2024-10-20 23:53:04 +02:00
Benjamin Otte
5d01fe96c6 testsuite: Create timezone without guessing names
Guessing names is not portable, in particular not to Windows.

See also commit 4881ef2.
2024-10-20 23:53:04 +02:00
Benjamin Otte
6ef3fc2dbb testsuite: Hey, everyone has an NGL renderer, right?
No.

This fix is not that much better, but I'm too tired to fix stuff
like this properly.

And the Cairo renderer did at least work everywhere during 4.x
2024-10-20 23:53:04 +02:00
Benjamin Otte
3a7f242e08 testsuite: MIME types aren't CONTENT types
Somebody came up with the great idea of content types, which
are just like mime types, only that they aren't on Windows.

So if we want a working testsuite that actually works on Windows,
we cannot mix them up.
2024-10-20 23:53:04 +02:00
Mat
07a44ffa0f gtklabel: Use correct modifier keys for macOS shortcuts 2024-10-20 22:21:59 +03:00
Arjan Molenaar
5332cfb177 macos: Add dummy pasteboard item if no mimetypes have been translated
Not all mime types will be translated to pasteboard types, hence we
need to check if any are translated. If not add an internal type.
2024-10-20 11:51:37 +02:00
Benjamin Otte
f907d8a17a win32: Don't crash when threads start too slow
Passing on-stack items to a thread in a function that exits right
after spawning the threads is a bad idea:
By the time the thread starts up and reads the values, the stack might
be in use for other stuff.

So instead of putting the items on the stack, just read them out of the
clipdrop struct.
2024-10-19 22:33:54 +02:00
Benjamin Otte
35c0068345 rendernodeparser: Implement font loading on Windows 2024-10-19 22:33:54 +02:00
Benjamin Otte
5e9e8a6f5d testsuite: Canonicalize filenames
It looks weird on Windows if half the paths use \ and the other
half use /
2024-10-19 20:22:03 +02:00
Benjamin Otte
fddd5f33ab win32: Avoid g_warning() when layout doesn't exist
If the registry key doesn't exist, it doesn't warrant a warning.

We hit that case in CI and it aborts every test during startup.
2024-10-19 20:22:03 +02:00
Benjamin Otte
3e4c92f86e Merge branch 'wip/otte/windows' into 'main'
Make vscode work

See merge request GNOME/gtk!7838
2024-10-19 18:20:19 +00:00
Simon McVittie
d7e3d73efb vulkan: Only log the list of extensions if debugging is enabled
Logging them with `g_print()` will write to stdout, which can interfere
with machine-readable output, for example when gnome-control-center
displays the GPU/driver name.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/7093
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-10-18 20:21:53 +01:00
Benjamin Otte
95c2b6d5f4 Merge branch 'wip/otte/wgl-quirks' into 'main'
win32: Always try WGL_SUPPORT_GDI_ARB

See merge request GNOME/gtk!7844
2024-10-18 11:14:00 +00:00
Benjamin Otte
11671c0537 Remove accidentally committed file 2024-10-18 12:02:03 +02:00
Benjamin Otte
0876ad6212 gitignore: Add .vscode directory 2024-10-18 12:02:03 +02:00
Benjamin Otte
036f481753 gitignore: Add all wrap files
meson has a tendency to dump wrap files of subprojects into this directory.
So we have to ignore them when using wrap files.

I think meson should put them into its builddir, but oh well...
2024-10-18 12:02:03 +02:00
Benjamin Otte
cc03f04380 build: Configure GStreamer subproject without Python
Our plugin doesn't use gst-python, so build without it.
2024-10-18 12:02:03 +02:00
Benjamin Otte
60d46ccc6c build: Add wrap file for GStreamer
We require 1.24.0 so lets use that for now. This is necessary to get
working media support.
2024-10-18 12:02:03 +02:00
Benjamin Otte
06532e583a build: Add devenv with GTK_PATH
For meson devenv - which is used by the meson vscode plugin to run
applications - setting GTK_PATH is necessary to get uninstalled modules
working.
2024-10-18 12:02:03 +02:00
Benjamin Otte
84d4fbaa85 build: require meson 1.2
Update the requirement in meson.build and the CI runners to meson 1.2

This keeps things in line with glib and avoids unexpected suprises from
using meson versions that are way too old.
2024-10-18 12:02:03 +02:00
Benjamin Otte
b28b2ea768 win32: Embed quirks struct in display struct
No need to manually allocate it (and then not freeing it in dispose ;)).
2024-10-18 11:59:04 +02:00
Benjamin Otte
d96f2bcde6 win32: Always try WGL_SUPPORT_GDI_ARB
We can avoid a quirk here by always trying WGL_SUPPORT_GDI_ARB
first and falling back when it's not supported.
2024-10-18 11:59:04 +02:00
Віктар Гаўрылавец
f0c0af4d68 Update Belarusian translation
(cherry picked from commit 3a1cf43028)
2024-10-18 09:17:00 +00:00
Andi Chandler
4eb6d6bc7d Update British English translation
(cherry picked from commit fa2f49ee7c)
2024-10-17 13:07:48 +00:00
Arjan Molenaar
64b52db5c3 Merge branch 'amolenaar/macos-fix-double-release' into 'main'
macos: Fix double emission of mouse release event

Closes #7021

See merge request GNOME/gtk!7803
2024-10-17 10:46:41 +00:00
Martin
a37dac626e Update Slovenian translation 2024-10-16 21:42:08 +00:00
Bruce Cowan
1ca97dbdfe gdk: Remove a couple of stray semicolons 2024-10-16 16:01:09 +01:00
Mat
4865af6b6c gtktext/gtktextview: Use correct modifier keys for macOS shortcuts
The shortcuts for moving the insertion point to the beginning and
end should use the Command modifier, not Option.
2024-10-16 00:22:13 +03:00
Matthias Clasen
68d74b380f Merge branch 'wip/smcv/cups-dbus-error' into 'main'
printing: Treat any G_DBUS_ERROR contacting Avahi as non-problematic

See merge request GNOME/gtk!7835
2024-10-15 15:50:32 +00:00