Benjamin Otte
a84cbe22d1
Merge branch 'wip/otte/win32-fixes' into 'main'
...
win32: Various fixes
See merge request GNOME/gtk!7848
2024-10-21 21:39:30 +00:00
Benjamin Otte
62b1ef9f72
CI: Enable -Werror in MSVC build
2024-10-21 20:18:46 +02:00
Benjamin Otte
e6cfc5e3cd
CI: Add pcre2 to disabled werrors
2024-10-21 20:18:46 +02:00
Benjamin Otte
07a5f75fe4
gpu: Make definition match declaration
2024-10-21 20:18:46 +02:00
Daniel Șerbănescu
015665ca9f
Update Romanian translation
...
(cherry picked from commit b0b1d7a928
)
2024-10-21 16:55:57 +00:00
Matthias Clasen
31683469c1
Merge branch 'for-main' into 'main'
...
Misc cleanups
See merge request GNOME/gtk!7832
2024-10-21 16:06:02 +00:00
Matthias Clasen
b9a382878d
build: Rename meson_options.txt to meson.options
...
This is the preferred name since meson 1.1, and we require 1.2 now.
2024-10-21 11:39:04 -04:00
Matthias Clasen
9dd51aa985
docs: Typo fix
2024-10-21 11:39:04 -04:00
Matthias Clasen
24c1afac49
docs: Update tests
...
Remote the gdk docs check from the failing testsuite, since they pass.
Add a (failing) docs check for the gdk-x11 docs.
2024-10-21 11:39:04 -04:00
Matthias Clasen
ce92ce6d36
gdk: Add missing color state docs
...
Document the getters for oklab/okch.
2024-10-21 11:39:04 -04:00
Matthias Clasen
5366f83711
demos: Beef up about dialogs
2024-10-21 11:39:04 -04:00
Matthias Clasen
3ffc194e9c
demos: Drop the icon-browser fully
...
This was forgotten in 32d03a548e
.
2024-10-21 11:39:04 -04:00
Matthias Clasen
0170f8e261
Drop expandtab from vim modelines
...
This is already covered by our editorconfig.
2024-10-21 11:39:04 -04:00
Matthias Clasen
7de9e47cfc
build: Cosmetics
...
Reuse a variable.
2024-10-21 11:39:04 -04:00
Matthias Clasen
655736b05f
gdk: Bling up debug spew slightly
...
We use ✓ and ✗ in some other places already, be consistent.
2024-10-21 11:39:04 -04:00
Matthias Clasen
aa268b31f2
vulkan: Cosmetics
...
Rename gsk_vulkan_feature_keys to gdk_vulkan_feature_keys, since
these keys live in gdk.
2024-10-21 11:38:34 -04:00
Matthias Clasen
0b9685fb41
Merge branch 'wip/smcv/issue7093' into 'main'
...
vulkan: Only log the list of extensions if debugging is enabled
Closes #7093
See merge request GNOME/gtk!7847
2024-10-21 15:26:08 +00:00
Matthias Clasen
d26f323bfe
Merge branch 'semicolon' into 'main'
...
Remove a couple of stray semicolons
See merge request GNOME/gtk!7839
2024-10-21 15:05:10 +00:00
Matthias Clasen
51908dd8d7
Merge branch 'amolenaar/macos-fix-dnd-crash' into 'main'
...
macos: fix crashes when dragging libadwaita TabView tabs
Closes #7097
See merge request GNOME/gtk!7849
2024-10-21 15:02:31 +00:00
Benjamin Otte
7aa8afa9d7
build: Disable MSVC warnings
...
Those 2 warnings happen with legitimate usage, so we don't want
to see them.
In particular not when using "-Werror" (or the MSVC equivalent "/WX")
2024-10-21 08:59:24 +02:00
Benjamin Otte
a68f1d6155
testsuite: Fix MSVC warnings
...
ints/longs have a different size to pointers on Windows 64bit.
And casts from int to pointer of diferent size cause a warning.
2024-10-21 07:35:42 +02:00
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
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