82506 Commits

Author SHA1 Message Date
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
Luca Bacci
7d45beb830 Gdk: Remove unused files 2024-11-04 10:13:53 +01:00
Luca Bacci
e75308ad11 GdkWin32: Rework display's beep vfunc to only use MessageBeep
Beep is synchronous, let's just move away from it.

Also add an explicit cast for signed to unsigned conversion.
2024-11-04 10:11:33 +01:00
Luca Bacci
ccecf5916f GdkWin32: Stub out the display's flush and sync vfuncs
There's nothing relevant to do
2024-11-04 10:05:45 +01:00
Luca Bacci
ddc9a6b597 Tools: exit with code 0 when showing --help output
This is in line with what most tools do when printing --help
(and GOptionContext alike)
2024-11-04 09:49:17 +01: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"​
036364f4d4 demos: Add xmlns to appstream metainfo files
Pixiewood expects well-formed XML files, whose tags match the AppStream
namespace. Note that AppStream itself does not do this, so picking a
prefix for the namespace is fine for pixiewood but not AppStream.
2024-11-02 20:43:54 +01: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
Florian "sp1rit"​
4b619930f2 demo: Fix drag and drop demo critical
Right now, child is NULL when starting a drag in the main area and
moving the pointer onto the colors, there releasing it.
To avoid gtk_widget_get_ancestor thowing a critical, early exit if child
is NULL.
2024-11-02 19:25:01 +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
Florian "sp1rit"​
56f0735e2b demo: Fix "Expander" demonstration
The expander window is not a dialog anymore, so attempting connecting to
its "response" is invalid and throws a critical:
  signal 'response' is invalid for instance '<PTR>' of type 'GtkWindow'
2024-10-31 08:59:49 +01: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
Matthias Clasen
c8cc8c4842 Merge branch 'amolenaar/color-picker-min-version' into 'main'
macos: Check for minimal macOS SDK version (>= 10.15)

See merge request GNOME/gtk!7881
2024-10-30 11:26:35 +00:00
Arjan Molenaar
0b9d1fc27c meson: Cleanup darwin system check
'ios' is not a meson host manchine system type.
2024-10-30 11:26:00 +01:00
Arjan Molenaar
5b78ee2227 macos: Remove obsolete version check blocks.
All code works on macOS 10.15+.
2024-10-30 11:04:15 +01:00
Arjan Molenaar
64dd9b4bdd macos: use SDK 10.15.6 for macos/intel testing 2024-10-30 10:45:56 +01:00
Arjan Molenaar
6fc6de6123 List available SDKs 2024-10-30 10:39:19 +01:00