82506 Commits

Author SHA1 Message Date
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
Matthias Clasen
f0a7a003e7 Merge branch 'gtk-init-fixes' into 'main'
gtk4-demo: Call gtk_init in main

See merge request GNOME/gtk!7854
2024-10-22 02:28:04 +00:00
Matthias Clasen
111230f5f9 bloatpad: Call gtk_init in main
We end up using a display via gtk_application_set_accels_for_action,
and that can't happen before gtk_init anymore.
2024-10-21 21:17:00 -04:00
Matthias Clasen
c09a51628b gtk4-demo: Call gtk_init in main
We end up using a display via gtk_application_set_accels_for_action,
and that can't happen before gtk_init anymore.
2024-10-21 21:17:00 -04:00
Matthias Clasen
96f8eb9c98 Merge branch 'wip/chergert/kinetic-frame-time' into 'main'
kineticscrolling: use computed frame times

See merge request GNOME/gtk!7842
2024-10-22 00:20:41 +00:00
Christian Hergert
c9facb5554 kineticscrolling: use computed frame times
Instead of accumulating a series of doubles, use the actual computed frame
time for duration tracking. While there is extremely low chance of
aliasing with animations under a few seconds, this just ensures we're
using the same clocking inside and outside of GtkKineticScrolling.
2024-10-21 16:15:26 -07:00
Matthias Clasen
a1d9b3e47d Merge branch 'display-init' into 'main'
gdk: No displays before init

See merge request GNOME/gtk!7836
2024-10-21 22:53:50 +00:00
Matthias Clasen
758e9787d4 Merge branch 'icon-lookup-none' into 'main'
icontheme: Add GTK_ICON_LOOKUP_NONE

See merge request GNOME/gtk!7852
2024-10-21 22:01:39 +00:00
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
Matthias Clasen
d6f93a3213 docs: Beef up docs for gtk_init
Mention explictly that this opens the default display.
2024-10-21 17:24:53 -04:00
Maximiliano Sandoval
169795a374 icontheme: Add GTK_ICON_LOOKUP_NONE
From bindings it is not clear that one can pass `0` as a value.
2024-10-21 23:00:26 +02: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
Matthias Clasen
1f20d0c9ed gdk: Spread the errors
Call gdk_ensure_initialized() directly in gdk_display_open_default(),
gdk_display_open(), gdk_x11_display_open() and gdk_display_get_default(),
so we get the right function name in the error message. These functions
are likely candidates that people might call without ensuring that GDK is
initialized.
2024-10-21 13:30:19 -04:00
Matthias Clasen
c239788a34 gdk: No displays before init
Don't allow to create displays before gdk has been initialized.

Note that this error triggers in nautilus 47.0, but we consider
what it is doing unsupported and broken.

Related: #7035
2024-10-21 13:30:19 -04:00
Matthias Clasen
51f3f6f8d1 print: Avoid calling gdk_display_get_default
Check if GTK has been initialized before trying to get a display
in a class_init function. The introspection property dumper code
will instantiate all types and run into the new introduced errors
if we try to get a display in class_init.
2024-10-21 13:30:19 -04:00
Matthias Clasen
84779ccdbc tests: Cosmetics
Our test setups aready enforce GSETTINGS_BACKEND=memory, don't set
it again in code.
2024-10-21 13:30:19 -04:00
Matthias Clasen
acd00ceb4d tests: Fix the displaymanager tests
Don't open a display without gtk_init().
2024-10-21 13:30:19 -04:00
Daniel Șerbănescu
015665ca9f Update Romanian translation
(cherry picked from commit b0b1d7a928)
2024-10-21 16:55:57 +00:00
Matthias Clasen
66367bf5d9 tests: Fix the textbuffer tests
Don't needlessly open a display before gtk_init.
2024-10-21 12:32:25 -04: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