Commit Graph

82459 Commits

Author SHA1 Message Date
Matthias Clasen
6f59f1f5a4 ci: Use meson junit output
Just use the junit xml that is produced by meson, it works now.
2024-11-05 13:18:36 -05:00
Matthias Clasen
af87994115 ci: Try to use llvm-symbolizer
It might help get some stacktraces out of crashes in asan.
2024-11-05 13:18:36 -05:00
Benjamin Otte
14a19b423e Merge branch 'wip/otte/win32-fixes' into 'main'
various fixes

See merge request GNOME/gtk!7895
2024-11-05 13:01:56 +00:00
Benjamin Otte
b8d24d0259 win32: Require Windows 10
All versions older than Windows 10 are out of support and no longer
receive updates, so we do not want to support them.

We also want to move towards APIs that requires Windows 10 - like
Direct3D 12 - and not having them optional simplifies our code.

See the discussion in !7895 for more details.
2024-11-05 02:45:37 +01:00
Benjamin Otte
01453c733c testsuite: Rename "diff" test to "not-diff"
3 things you need to know about this change:

1. We use diff(1) in various tests to check generated text against
   reference output
2. Windows locates executables not just in $PATH, it also looks in
   $cwd and the directory of the current process' binary
3. Multiple tests live together in the same directory

Windows is fun.
2024-11-05 02:45:37 +01:00
Benjamin Otte
3d578e8db5 win32: Use gdk_win32_com_clear() where appropriate 2024-11-05 02:45:37 +01:00
Benjamin Otte
2ed6867084 win32: Define COBJMACROS via project argument
We use it everywhere, so it makes sense to enable it everywhere.

For anyone not in the know, defining COBJMACROS makes Micrsoft headers
for COM objects provide C macros so that instead of having to call
  foo->lpVtbl->Release();
to unref a COM object, one can call
  IFoo_Release (foo);

Note that thes macros are implemented with inheritance as Release()
is defined on the IUnknown base interface (MS' equivalent to GObject)
and would otherwise require
  IUnknown_Release ((IUnknown *) foo);
That line works, too - but it is not necessary.
2024-11-05 02:45:37 +01:00
Benjamin Otte
ef839e6505 win32: Add gdk_win32_com_clear()
Like g_clear_object(), but for COM objects.
2024-11-05 02:45:37 +01:00
Benjamin Otte
2a7beb75e8 testsuite: Make offload test do actual diffs
We have a testutils.c version for that.
2024-11-05 02:45:37 +01:00
Benjamin Otte
bfbc3e7484 testsuite: Clarify error
200% is not a fractional scale, but it's still forbidden.
2024-11-05 02:45:37 +01:00
Benjamin Otte
2e8fac7789 testsuite: Make nodeparser use shared diffing code
We have a testutils.c version, use that one.
2024-11-05 01:07:22 +01:00
Benjamin Otte
dd93aa9f50 testsuite: Rewrite diff_with_file()
use the modern version using GSubprocess that already exists in
node-parser.

Also change from one function to two - so tests can diff GBytes and
strings, depending on which they prefer.
2024-11-05 01:07:22 +01:00
Benjamin Otte
6cd98bae3b testsuite: Add --strip-trailing-cr to diff call
On Windows, git defaults to maintaining line endings, which means it
changed \n to \r\n on all files it identifies as text. And that includes
our test output.

Luckily diff(1) has an option to undo that. And since we do not care
about line endings in those tests, we can just use it.
2024-11-04 22:02:28 +01:00
Benjamin Otte
0a6c4711bc gstreamer: Fix small memleak 2024-11-04 21:50:26 +01:00
Benjamin Otte
7085a58f01 gstreamer: Identify GL memory by looking at the memory
Instead of looking at availability of a GL context, check the
memory's type.

That's what we do everywhere else and GL is not special.
2024-11-04 21:50:26 +01:00
Benjamin Otte
8b1dff5b94 gstsink: Do not advertise dmabufs with no formats
We return an empty format list when dmabufs aren't supported, not NULL.

And the sink was treating the empty format list by setting no fourccs
on the caps, which GStreamer conveniently interpreted as "any",
not as "none".
2024-11-04 21:50:26 +01:00
Benjamin Otte
566c484317 cicpparams: Guard with BEGIN/END_DECLS
I want to include this header from DirectX C++ code.
2024-11-04 21:50:26 +01:00
Benjamin Otte
5822989e82 gdk: Add missing G_END_DECLS 2024-11-04 21:50:26 +01:00
Benjamin Otte
70c327993b win32: Remove unused macro 2024-11-04 21:50:26 +01:00
Benjamin Otte
e9c9d1d0a0 filechooser: Use g_clear_object() on potentially NULL objects
We can reach here in early exit paths when the shortcut_files have not
been initialized yet.
2024-11-04 21:50:26 +01:00
Martin
f71de6f646 Update Slovenian translation 2024-11-04 17:38:49 +00:00
Matthias Clasen
ea08d92bc2 Merge branch 'fontchooser-min-size' into 'main'
fontchooser: Make it more shrinkable

See merge request GNOME/gtk!7897
2024-11-04 02:54:08 +00:00
Matthias Clasen
2ad2bae1ca fontchooser: Make it more shrinkable
There were several places where unnecessarily big minimum sizes
were hardcoded. Instead, set a reasonable default size for the
dialog and the let window shrink further.

Helps for mobile situations.

Related: #7133
2024-11-03 20:57:13 -05:00
Emmanuele Bassi
08eab87c42 Merge branch 'meson_schema_install_tag' into 'main'
meson: set install_tag for schema files

See merge request GNOME/gtk!7893
2024-11-02 21:24:18 +00:00
Florian "sp1rit"​
a048ca444c meson: set install_tag for schema files
To limit the amount of files installed by meson install, users can
specify specific classes of files they actually want to install.

Most to be installed files are automatically tagged by meson correctly
based on what function produced them, but it can't for some (esp. those
installed using install_data/subdir).

As gschema files *should typically* be available at runtime, give them
the "runtime" tag.

See https://mesonbuild.com/Installing.html#installation-tags
2024-11-02 20:32:34 +01:00
Matthias Clasen
64dda64819 Merge branch 'fix-bt709-oetf' into 'main'
gsk: Fix wrong bt709_oetf

See merge request GNOME/gtk!7886
2024-11-01 00:27:59 +00:00
Benjamin Otte
7edb4ecddf Merge branch 'wip/otte/textbuffer-test-win32' into 'main'
win32: Fix textbuffer test

See merge request GNOME/gtk!7873
2024-10-31 16:19:05 +00:00
Matthias Clasen
9f714a9d0a Merge branch 'for-main' into 'main'
Bump the gdk-pixbuf subproject

See merge request GNOME/gtk!7888
2024-10-31 15:00:28 +00:00
Benjamin Otte
13aa4f5fe8 win32: Don't return existing display from gdk_display_open()
Existing code assumes displays are new connections and calls
gdk_display_close() on the display when done with whatever it was
doing.

If we return an existing display, that display gets closed...

It's also what the other backends do, including MacOS.

Fixes gsk/misc test.
2024-10-31 15:27:43 +01:00
Benjamin Otte
06d61c5d39 win32: Stop sending clipboard_hwnd to main thread
With the switch to using the glib main context in the clipboard thread,
the clipboard hwnd is no longer used for sending messages.

This means it's not necessary to know it in the main thread.

And that means there's no small window where the clipboard thread spins
up and the window doesn't exist and any copy operation fails.
The main context can be created before spinning up the thread so
that is avoided.

Fixes the gtk/textbuffer test in the testsuite.
2024-10-31 15:27:43 +01:00
Benjamin Otte
4b4e7276f6 win32: Do async clipboard thread via main loop
Instead of sending windows messages, use the main loop.
This is closer to the expectations of GTK developers and has better
thread safety handling as no HWND is needed as a messaging queue token.
2024-10-31 15:27:43 +01:00
Benjamin Otte
a4323259e5 win32: Split out a function 2024-10-31 15:27:43 +01:00
Benjamin Otte
ae5f581e47 win32: Remove useless code
The function is checking and early-exiting in this situation anyway.
2024-10-31 15:27:43 +01:00
Benjamin Otte
17f391b4e7 win32: "unpop" items from clipboard queue
We can indeed "unpop" items from the clipboard queue, the function is
called g_async_queue_push_front().

So do that instead of tracking a GList.
2024-10-31 15:27:43 +01:00
Benjamin Otte
a7670bfcc5 gdk: Add GDK_DISABLE=aerosnap
Disables the Aerosnap hook for Windows which is particularly useful
when debugging because the aerosnap hook slows down keyboard input.
2024-10-31 15:27:43 +01:00
Benjamin Otte
4b32ac3341 win32: Use the builder argument
We can straight build content formats these days, no need for a detour.
2024-10-31 15:27:43 +01:00
Benjamin Otte
6af853c7a0 win32: Some trivial cleanups
* Make a function static

* Don't lookup function that exists since Windows XP
2024-10-31 15:27:43 +01:00
Benjamin Otte
741b369b2a win32: Remove unused variable
The variable was last used in GTK3.
2024-10-31 15:27:42 +01:00
Benjamin Otte
0b62165bf2 clipboard: Run a GMainLoop in the clipboard thread
Use the new message source to do the task of processing messages.
2024-10-31 15:27:42 +01:00
Benjamin Otte
517ec1112c win32: Add GdkWin32MessageSource
The source does nothing but run PeekMessage() + DispatchMessage().
But we need it in every thread where we want to use a main loop.

No users yet.
2024-10-31 15:27:42 +01:00
Benjamin Otte
8767283722 win32: Don't crash if the settings are empty 2024-10-31 15:27:42 +01:00
Matthias Clasen
033b4c5aa2 build: Tweak gdk-pixbuf subproject
Use builtin loaders by default, so we don't make everybody figure
out how to make gdk-pixbuf find uninstalled loaders.
2024-10-31 09:52:03 -04:00
Matthias Clasen
1e55013228 Bump the gdk-pixbuf subproject
Use the latest release, 2.42.12.
2024-10-31 07:28:51 -04:00
Matthias Clasen
ac37d66bd5 Merge branch 'wip/alice/default-icon' into 'main'
application: Set default window icon to appid by default

Closes #7120

See merge request GNOME/gtk!7885
2024-10-31 00:46:01 +00:00
Matthijs Velsink
b9f83265b6 gsk: Fix wrong bt709_oetf
And use the format from `gdkcolordefs.h` for good measure.
2024-10-30 23:41:47 +01:00
Aurimas Černius
dee4182dc9 Update Lithuanian translation
(cherry picked from commit d09597af8c)
2024-10-30 20:22:20 +00:00
Alice Mikhaylenko
3274a286cc application: Set default window icon to appid by default
Lots of newer apps that use their appid as their icon name don't set
window icons, since they aren't used in GNOME. Instead of setting it
manually in every app, just default to it.

Only set the icon if it exists in the icon theme.

Remove manually set default icons in the demo.

No tests as GtkApplication doesn't have any in the first place.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/7120
2024-10-30 23:39:23 +04:00
Benjamin Otte
20b50c80d3 Merge branch 'for-main' into 'main'
docs: Fix a few copy-paste errors

See merge request GNOME/gtk!7884
2024-10-30 14:39:35 +00:00
Benjamin Otte
8b9ab19f15 docs: Fix various issues in texture builder docs 2024-10-30 09:37:06 -04:00
Matthias Clasen
926e969abb docs: Fix a few copy-paste errors 2024-10-30 09:18:17 -04:00