Benjamin Otte
dfb075699c
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-29 00:46:54 +01:00
Benjamin Otte
3ca5a75ab0
testsuite: depend on gir and libgtk in introspection test
...
We also don't need to LD_PRELOAD anymore if we do that.
2024-10-29 00:46:54 +01:00
Benjamin Otte
7d87118151
testsuite: Handle gdk_display_open() returning NULL
...
It turns out the Windows backend does that.
2024-10-29 00:46:54 +01:00
Benjamin Otte
f4bcb80ab8
Merge branch 'wip/otte/most-important-source-ever' into 'main'
...
Rework the Wayland source again
Closes #7091
See merge request GNOME/gtk!7865
2024-10-28 21:54:26 +00:00
Benjamin Otte
239f45ce8e
wayland: Split event source into two
...
We need to guarantee that we call wayland_display_read_events() after a
poll() and before any other source runs, including any source with
higher priority.
As GSourceFuncs doesn't have a after_poll() vfunc and check() is not
guaranteed to be called for anything but the highest priority, we only
have once chance:
Run with the highest priority
But because we don't want event delivery with ultrahigh priority, we
split the source into two:
* a poll source that polls while blocking wayland reading and
then immediately calls read_events() with priority G_MININT
* our old trusty event source with PRIORITY_EVENTS that dispatches
events
Fixes !7859
Fixes #7091
2024-10-28 13:34:09 +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
Benjamin Otte
21afd2bf77
Merge branch 'wip/otte/for-main' into 'main'
...
gdk: Remove unused display vfunc
See merge request GNOME/gtk!7864
2024-10-24 17:24:24 +00:00
Віктар Гаўрылавец
71d4b9893b
Update Belarusian translation
...
(cherry picked from commit cc92230f56 )
2024-10-24 16:41:31 +00:00
Benjamin Otte
4eba4ad640
wayland: Move all GSource handling into gdkeventsource.c
2024-10-24 17:29:33 +02:00
Benjamin Otte
0722ede806
wayland: Remove unused variable
2024-10-24 17:29:33 +02:00
Benjamin Otte
6b0e1ed7dc
wayland: Rename source functions
...
It's a GdkWaylandEventSource, name the function accordingly.
2024-10-24 17:29:33 +02:00
Benjamin Otte
8454ec7181
Revert "wayland: Don't block the event queue"
...
This reverts commit a9723fc96b .
This approach was wrong as it can lead to deadlocks when multiple
threads call poll() at almost the same time and the slower thread only
starts poll()ing when the faster thread has already read the fd.
See further comments for a (hopefully) correct fix.
Reverts !7859
2024-10-24 17:29:33 +02:00
Benjamin Otte
4dec70e1a6
gdk: Remove unused display vfunc
...
But it's nice that everyone still implements it.
2024-10-24 17:24:43 +02:00
Matthias Clasen
71b065cf07
Merge branch 'bugfix/compile-32-bit' into 'main'
...
gdk/loaders/gdkjpeg.c: fix compilation on 32-bit systems
See merge request GNOME/gtk!7721
2024-10-24 03:04:18 +00:00
Matthias Clasen
97554c1211
Merge branch 'main' into 'main'
...
Fix typo in NEWS
See merge request GNOME/gtk!7863
2024-10-23 23:54:14 +00:00
Urtsi Santsi
be50be64ce
Fix typo in NEWS
2024-10-23 19:32:21 +00:00
Matthias Clasen
f7dddcb258
Merge branch 'wip/chergert/for-main' into 'main'
...
NEWS: add recent changes to GtkTextView
See merge request GNOME/gtk!7862
2024-10-23 19:07:42 +00:00
Christian Hergert
3bf1603fae
NEWS: add recent changes to GtkTextView
2024-10-23 11:04:20 -07:00
Matthias Clasen
5bf78e047d
NEWS: Updates
2024-10-22 23:49:33 -04:00
Matthias Clasen
b1a82942ee
Merge branch 'wip/otte/block-the-clock' into 'main'
...
wayland: Don't block the event queue
Closes #7091
See merge request GNOME/gtk!7859
2024-10-23 03:06:42 +00:00
Matthias Clasen
da9657245d
Merge branch 'wip/chergert/fix-7108' into 'main'
...
gtk/textlayout: remove one_style_cache
Closes #7108
See merge request GNOME/gtk!7860
2024-10-23 01:58:06 +00:00
Christian Hergert
92715975da
gtk/textlayout: remove one_style_cache
...
When porting textlayout to GTK 4 a line display cache was introduced. That
cache creates a situation where you may not create GtkTextLineDisplay in
order from GtkTextLineSegment.
Because of that, we must start the creation of each line display from
fresh line state or we could re-apply the GtkTextAppearance of another
row. However, once you do that, one_style_cache will never have a match
and therefore is pure overhead.
This removes one_style_cache altogether.
Fixes : #7108
2024-10-22 17:53:18 -07:00
Benjamin Otte
a9723fc96b
wayland: Don't block the event queue
...
The Wayland source was blocking the Wayland display queue between its
check() and prepare() callbacks.
This is a rare event to cause problems because it requires
1. Another source with
2. a higher priority that
3. triggers at the same time as the Wayland source and
4. triggers a roundtrip or other operation that requires reading events
from the display.
Introduced in commit 2893526a48 during GTK 3.21, so this should
probably be fixed in GTK3, too.
Fixes #7091
2024-10-22 23:38:13 +02:00
Matthias Clasen
1731530189
Merge branch 'wip/chergert/overshoot_width' into 'main'
...
kineticscrolling: use overshoot_width in calculation
See merge request GNOME/gtk!7851
2024-10-22 17:47:28 +00:00
Christian Hergert
8d537a943f
gtk/kineticscrolling: use overshoot_width in calculation
...
We create the GtkKineticScrolling with the known overshoot_width but then
fail to use it (and instead a hardcoded value) during tick calculation.
This fixes that, which will also be necessary if we enable scrolled
overshooting.
2024-10-22 10:16:50 -07:00
Thomas Devoogdt
45680ffc8f
gdk/loaders/gdkjpeg.c: fix compilation on 32-bit systems
...
../gdk/loaders/gdkjpeg.c: In function ‘gdk_save_jpeg’:
../gdk/loaders/gdkjpeg.c:291:32: error: passing argument 3 of ‘jpeg_mem_dest’ from incompatible pointer type [-Wincompatible-pointer-types]
291 | jpeg_mem_dest (&info, &data, &size);
| ^~~~~
| |
| gulong * {aka long unsigned int *}
In file included from ../gdk/loaders/gdkjpeg.c:30:
/home/thomas/br-test-pkg/bootlin-armv7-glibc/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/jpeglib.h:979:28: note: expected ‘size_t *’ {aka ‘unsigned int *’} but argument is of type ‘gulong *’ {aka ‘long unsigned int *’}
See multiple versions:
https://www.ijg.org/files/jpegsrc.v9c.tar.gz
- #define JPEG_LIB_VERSION 90 /* Compatibility version 9.0 */
- #define JPEG_LIB_VERSION_MAJOR 9
- #define JPEG_LIB_VERSION_MINOR 3
- EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
unsigned char ** outbuffer,
unsigned long * outsize));
https://www.ijg.org/files/jpegsrc.v9d.tar.gz
- #define JPEG_LIB_VERSION 90 /* Compatibility version 9.0 */
- #define JPEG_LIB_VERSION_MAJOR 9
- #define JPEG_LIB_VERSION_MINOR 4
- EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
unsigned char ** outbuffer,
size_t * outsize));
https://github.com/libjpeg-turbo/libjpeg-turbo/blob/3.0.4/jpeglib.h
https://github.com/libjpeg-turbo/libjpeg-turbo/blob/3.0.4/jconfig.h.in
- #define LIBJPEG_TURBO_VERSION @VERSION@
- EXTERN(void) jpeg_mem_dest(j_compress_ptr cinfo, unsigned char **outbuffer,
unsigned long *outsize);
The jpegsrc changed the method signature with the v9d release,
libjpeg-turbo did not changed it's signature (yet).
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com >
2024-10-22 17:16:35 +02:00
Emmanuele Bassi
f5413c5226
Merge branch 'ebassi/issue-7106' into 'main'
...
docs: Fix typo in Gdk.ContentProvider.new_union
Closes #7106
See merge request GNOME/gtk!7857
2024-10-22 14:05:01 +00:00
Emmanuele Bassi
3fac7762d7
docs: Fix typo in Gdk.ContentProvider.new_union
...
It's GDK_TYPE_TEXTURE, not G_TYPE_TEXTURE.
Fixes : #7106
2024-10-22 14:04:01 +01:00