Commit Graph

82406 Commits

Author SHA1 Message Date
Luca Bacci
b017dd54d1 testsuite: Ignore line endings when diff'ing results 2024-11-04 10:43:50 +01:00
Benjamin Otte
1855737aee testsuite: Allow renderers in misc test to fail
When GL or Vulkan is not supported, the test should not fail.

It would be nicer if we could detect GL/Vulkan not being available
otherwise, but I'm not aware of a better solution, in particular because
rendeers might have stricter requirements than GTK itself.

So this is the next best fix.
2024-10-28 09:56:19 +01:00
Benjamin Otte
710f5c088e Revert "testsuite: Fix introspection test on Windows"
This change is no longer necessary now that we properly set the right
directory for the needed DLLs.

This reverts commit 3471c22f52.
2024-10-28 07:48:49 +01:00
Benjamin Otte
06fb03ee50 testsuite: Set $PATH for introspection tests
This is necessary because Windows uses $PATH to search for DLLs and
meson isn't smart enough to figure out that this test needs access
to the DLL.
2024-10-28 05:44:18 +01:00
Benjamin Otte
587a547d64 testsuite: depend on gir and libgtk in introspection test
We also don't need to LD_PRELOAD anymore if we do that.
2024-10-28 05:38:13 +01:00
Benjamin Otte
7b2b538bc8 testsuite: Handle gdk_display_open() returning NULL
It turns out the Windows backend does that.
2024-10-28 01:09:30 +01:00
Benjamin Otte
e7c6e45701 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-28 01:09:30 +01:00
Benjamin Otte
2f1c42d095 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-28 01:09:05 +01:00
Benjamin Otte
2b36613b40 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-28 01:09:05 +01:00
Benjamin Otte
43a64c93d4 win32: Split out a function 2024-10-28 01:09:05 +01:00
Benjamin Otte
bf342c01e1 win32: Remove useless code
The function is checking and early-exiting in this situation anyway.
2024-10-28 01:09:05 +01:00
Benjamin Otte
2b38e9002c 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-28 01:09:05 +01:00
Benjamin Otte
581f1d7bb4 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-28 01:09:05 +01:00
Benjamin Otte
aa47849d01 win32: Use the builder argument
We can straight build content formats these days, no need for a detour.
2024-10-28 01:09:05 +01:00
Benjamin Otte
557130efa1 win32: Some trivial cleanups
* Make a function static

* Don't lookup function that exists since Windows XP
2024-10-28 01:09:05 +01:00
Benjamin Otte
97254aaa33 win32: Remove unused variable
The variable was last used in GTK3.
2024-10-28 01:09:05 +01:00
Benjamin Otte
958adafa95 clipboard: Run a GMainLoop in the clipboard thread
Use the new message source to do the task of processing messages.
2024-10-28 01:09:05 +01:00
Benjamin Otte
7a0850dc8e 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-28 01:09:05 +01:00
Benjamin Otte
661ef6427d win32: Don't crash if the settings are empty 2024-10-28 01:09:05 +01:00
Benjamin Otte
e405b598ab CI: Install Cantarell into msys build
The testsuite needs it.
2024-10-28 01:09:05 +01:00
Benjamin Otte
7fbccdd136 CI: Turn off gdb wrapper again
Also unset maxfail again.
2024-10-28 01:09:05 +01:00
Benjamin Otte
6823b830aa CI: Limit number of parallel tests for msys runs
This is the result of some consecutive runs with different values.
More would make the runtime of individual tests grow and we don't
want that.
2024-10-28 01:09:05 +01:00
Benjamin Otte
6dfd7a9629 CI: Catch test crashes with gdb wrapper
Add a gdb script to catch segfaults and launch it using meson --wrapper

And try really hard to make that script safe for Windows/msys, because
we want to use it there.
2024-10-28 01:09:05 +01:00
Benjamin Otte
203b1febb1 CI: Set MESON_TEST_MAX_FAIL for msys build 2024-10-28 01:09:05 +01:00
Benjamin Otte
eb60360bc6 CI: Add a meson test run for mingw
So far, we disable all GL and Vulkan testing, because neither of them
works in CI.
2024-10-28 01:09:05 +01:00
Benjamin Otte
fad8475909 CI: Add MESON_TEST_MAX_FAIL variable
Sets the value to be used for meson test --maxfail. This is useful when
bringing up a new testrunner or generally when debugging some changes
that cause many test failures.

If not set, we set it to 0, meaning disabled.
2024-10-28 01:09:05 +01:00
Benjamin Otte
808ff04c52 CI: Split Fedora runs from test runs
That way, we can inherit from either separately.
2024-10-28 01:09:05 +01:00
Matthias Clasen
e37f9ba213 Merge branch 'demo-inscriptions' into 'main'
demo: Use GtkInscription more

See merge request GNOME/gtk!7874
2024-10-26 19:55:56 +00:00
Matthias Clasen
277f445970 Merge branch 'css-classes-notify' into 'main'
css: Avoid redundant change notification

Closes #7111

See merge request GNOME/gtk!7871
2024-10-26 02:23:17 +00:00
Matthias Clasen
4bf6668906 demo: Use GtkInscription more
Port the columnview Unicode demo to GtkInscription.
2024-10-25 22:14:45 -04:00
Matthias Clasen
abfad75182 css: Avoid redundant change notification
When adding or removing css class doesn't change anything, we
should not notify the css-classes property. This is more efficient
and avoids some suboptimal behavior in the inspector.

Fixes: #7111
2024-10-25 21:43:55 -04:00
Matthias Clasen
23d855d799 Merge branch 'for-main' into 'main'
docs: Drop mention of X from general docs

See merge request GNOME/gtk!7868
2024-10-25 21:02:31 +00:00
Matthias Clasen
9d94ecad64 Merge branch 'application-display' into 'main'
application: Don't use a display needlessly

Closes #7119

See merge request GNOME/gtk!7870
2024-10-25 21:02:12 +00:00
Matthias Clasen
332abfb011 application: Don't use a display needlessly
We are potentially before gtk_init, so we can't get a default display.
Thankfully, we don't need it anyway.

Fixes: #7119
2024-10-25 15:59:28 -04:00
Emmanuele Bassi
5a2d55c4d3 docs: Add some markup
Use <kbd> for keys, to improve the consistency of our docs.
2024-10-25 16:49:58 +00:00
Matthias Clasen
c1e5609565 docs: Drop mention of X from general docs
Our docs should not allude to specifics of X11, unless they are
about the X11 backend.
2024-10-25 12:45:33 -04:00
Matthias Clasen
3885f75bc6 Merge branch 'application-portal-use' into 'main'
application: Respect GDK_DEBUG=no-portals

Closes #7116

See merge request GNOME/gtk!7867
2024-10-25 16:40:40 +00:00
Martin
1a068bf76b Update Slovenian translation 2024-10-25 16:20:18 +00:00
Matthias Clasen
f14c05dbb0 application: Respect GDK_DEBUG=no-portals
If that debug flag is set, don't activate portals by talking to
the Inhibit portal.

Fixes: #7116
2024-10-25 11:23:03 -04:00
Matthias Clasen
aef6b1b932 Merge branch 'inspector/extensions' into 'main'
inspector: List all extensions

See merge request GNOME/gtk!7866
2024-10-25 11:40:12 +00:00
Matthias Clasen
508d91d182 inspector: Show GL and Vulkan features
This information can to some degree inform about the extensions
that GTK is using.
2024-10-24 23:18:42 -04:00
Matthias Clasen
06ef33271f gdk: Export feature keys privately
Export these. They will be used in the inspector in later commits.
2024-10-24 23:04:37 -04:00
Matthias Clasen
58ef21514e inspector: Make GL and Vulkan more similar
When Vulkan initialization fails, show the error message, as we
do for GL. Also reorder items to be in similar order, and tweak
labels.
2024-10-24 23:04:08 -04:00
Matthias Clasen
d40be28ff4 inspector: List all Vulkan extensions and layers
Same as for GL.
2024-10-24 22:20:26 -04:00
Matthias Clasen
9adc09bc0b inspector: Make extensions non-activatable
There's nothing to activate here.
2024-10-24 22:20:26 -04:00
Matthias Clasen
78262ecd51 inspector: Cosmetics 2024-10-24 22:20:26 -04:00
Benjamin Otte
6723fe0d5c inspector: Add search for extensions
My Windows AMD driver has 295 GL extensions...
2024-10-24 22:19:58 -04:00
Benjamin Otte
9c564eb893 inspector: Sort extensions list
Mesa sorts its extensions, but not every GL driver does. So now we do.
2024-10-24 22:19:58 -04:00
Benjamin Otte
155db90f20 inspector: List all GL extensions
Instead of checking availability of a few hardcoded extensions, print a
full list of extensions.

It's a bit awkward to find the ones the GTK cares about, but it allows
quickly checking any extension that might be needed for new features or
in applications or GStreamer.

This overlaps somewhat with tools like eglinfo, but eglinfo prints all
combinations of X11/Wayland and GL/GLES so it's easy to get confused,
while this one prints the actual extensions of the device in use.
2024-10-24 22:19:58 -04:00
Matthias Clasen
bee6e3acc5 Merge branch 'android_misc' into 'main'
Non directly android-backend related changes for the android backend

See merge request GNOME/gtk!7817
2024-10-25 00:05:24 +00:00