Commit Graph

77501 Commits

Author SHA1 Message Date
Piotr Drąg
3aaa1724b0 Update Polish translation 2023-11-18 17:07:41 +01:00
Ekaterine Papava
5ac70b2662 Update Georgian translation 2023-11-18 03:13:32 +00:00
Matthias Clasen
66ed0c11c2 Post-release version bump 2023-11-17 15:40:02 -05:00
Matthias Clasen
0cdb58af49 4.12.4 4.12.4 2023-11-17 15:29:11 -05:00
madmurphy
103a9ed396 Fix warnings when compiling with -pedantic 2023-11-17 15:28:58 -05:00
Benjamin Otte
674071a981 Add a debug node for CSS outlines
All the other CSS render operations have one, so outlines should, too.

This was found by tracking down a random border node in a rendering.
2023-11-17 15:28:58 -05:00
Andy Holmes
6937fcad9e gtk: fix NULL pointer dereference
`gtk_window_get_default_size()` claims width/height are optional-out
arguments, but defers to `gtk_window_get_remembered_size()` which
may dereference a NULL-pointer.

Since `gtk_window_get_remembered_size()` is only called by
`gtk_window_get_default_size()`, collapse it into the latter
and perform the NULL check there.
2023-11-17 15:28:58 -05:00
Benjamin Otte
a159293c69 inspector: Replace "no glyph" with space glyph
This makes right-aligning the text work again.
2023-11-17 15:28:58 -05:00
Benjamin Otte
64ecfd656e inspector: Use the right font for the fps overlay
Initialize the font only when we have a widget that provides it. That
way we don't pick a terrible default font, but the widget's preferred
one.
2023-11-17 15:28:58 -05:00
Matthias Clasen
84343d30fb Some minor fpsoverlay improvements
Avoid some allocations.
2023-11-17 15:28:58 -05:00
Matthias Clasen
5587ee1027 inspector: Speed up the fps overlay
Do less work!
2023-11-17 15:28:58 -05:00
Robert Ancell
3b30862e00 docs: Replace deprecated gtk_widget_show with gtk_widget_set_visible 2023-11-17 14:59:31 -05:00
Benjamin Otte
9f8cf5b0bd gl: Fix padding in icon library
The previous code would not pad the left side with the left column of
pixels but with the top row.

Test attached.
2023-11-17 14:59:02 -05:00
Benjamin Otte
013a06f596 gsk: Fix texture-scale node Cairo drawing
The code was interpreting x/y coordinates wrong sometimes and causing
things to not be drawn at the correct offset.

Testcase included.
2023-11-17 14:58:53 -05:00
Benjamin Otte
b88a652567 rendernode-tool: Add --undecorated to show command
This is to get exactly just the rendernode drawn when testing, and not
any extra drawing code.
2023-11-17 14:55:26 -05:00
Kleis Auke Wolthuizen
e2b6433799 widget-factory: Remove insert-image icon
This icon is already present in the hicolor icon theme.
2023-11-17 14:55:02 -05:00
Kleis Auke Wolthuizen
ec200a333b widget-factory: Remove view-grid-symbolic icon
No longer needed as it's included in the hicolor icon theme now.
2023-11-17 14:54:53 -05:00
Kleis Auke Wolthuizen
ff1c503735 icons: Add view-grid-symbolic
This showed up as missing icon in the file chooser when used with
the hicolor icon theme.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/6184
2023-11-17 14:54:42 -05:00
Lukáš Tyrychtr
d4b0d395a1 Adjust tests 2023-11-17 14:54:30 -05:00
Lukáš Tyrychtr
e660e922fe a11y: When using rule 2.E for computing accessible name, use it only if appropriate
We were using it in all cases, so, we were using it to compute descriptions,
and also for non-embedded controls. That was overriding descriptions
set, for example, in Gnome settings, and was causing the value of spinboxes
to be read multiple times.
2023-11-17 14:54:21 -05:00
Chun-wei Fan
287436a26d builds: Require -Zc:preprocessor for Visual Studio debug builds
This flag is actually required for the debugging code to successfully build,
so check that it is really there for debug-enabled Visual Studio builds.
2023-11-17 14:54:13 -05:00
Chun-wei Fan
cb644a6d23 MSVC Builds: Don't enable -utf-8 explicitly
We already require a Meson release that enables -utf-8 by default, so we don't
really need to explicitly enable it here.
2023-11-17 14:54:06 -05:00
Chun-wei Fan
8d92e0fb6f build: Add msvc_recommended_pragmas.h
We really always want to force-include msvc_recommended_pragmas.h to check for
things at compile time so that we can avoid stuff like missing includes or
attempting to return a value in a function that is supposed to have a
void-return-type.

The current problem is that, as indicated in the Visual Studio CI job, that we
couldn't locate msvc_recommended_pragmas.h during the build if GLib is built
as a subproject, and/or when msvc_recommended_pragmas.h is not in the paths
indicated by %INCLUDE%, meaning that the aforementioned issues would not be
caught by CI, which will then break builds on Visual Studio for people when
msvc_recommended_pragmas.h is found during their builds.

It would also be nice to be quiet from the warnings that we can really
disregard anyways.

So, add a copy of msvc_recommended_pragmas.h from GLib and update the build
files to look for it in build-aux/msvc, so that it can always be used during
the build, especially by the CI.
2023-11-17 14:53:54 -05:00
Matthias Clasen
0bf68f1372 Fix swizzle values for some memory formats
For opaque formats with 3 channels, we should use the default
GL_ALPHA, but for opaque formats with an ignored 4th channel,
we must use GL_ONE.
2023-11-17 14:53:41 -05:00
sudip
722953737d translated bn.po and hi.po
Resolves:https://gitlab.gnome.org/GNOME/gtk/-/issues/6164
2023-11-17 14:53:17 -05:00
Benjamin Otte
d17eca052d gl: Remove optimization that does the wrong thing
Drawing a texture-scale node like a texture node when the filter is set
to "linear" doesn't work, because the texture node switches to
trilinear when mipmaps are available.
2023-11-17 14:52:07 -05:00
Benjamin Otte
101296ac0e gl: Make sure render_texture() sets the right format for high depth
Setting the format got lost when converting this coe to the texture
builder, because that codepaths avods the texture sniffing and always
uses RGBA8.
2023-11-17 14:51:56 -05:00
Benjamin Otte
7c9ef05c7c gdk: Make float32 report its true depth
I have no idea how this is the only value that is wrong.
2023-11-17 14:51:37 -05:00
Artur S0
1afad435a7 Update Russian translation 2023-11-04 02:05:59 +00:00
Luca Bacci
e935b25a57 Merge branch 'invalid-client-rects-4-12' into 'gtk-4-12'
[4.12] GdkWin32: ignore invalid client rects

See merge request GNOME/gtk!6545
2023-11-03 21:23:50 +00:00
G.Willems
c69e19c9c5 GdkWin32: ignore invalid client rects
Gdk-Win32 uses GetClientRect() internally to query the surfaces coordinates,
but this API may fail in some transient contexts (observed when iconifying
a maximized window).
Check if the rect area is null, and don't update the surface position in
that case. This will keep the current surface size, until Win32 notifies
the new valid window state later.
This prevents using a nulled next_layout for toplevel size computation,
which would break widgets allocation once notified on gtk side.

Fixes #5724
Closes #5724
2023-11-03 22:51:47 +02:00
Matthias Clasen
fe9abc78c0 Merge branch 'wip/chergert/for-4-12' into 'gtk-4-12'
cherry-pick bgra/vertex-array checks to 4.12

See merge request GNOME/gtk!6541
2023-10-31 21:35:51 +00:00
Matthias Clasen
a65dc12392 gsk: Use vertex arrays when we can
Use the new has_vertex_arrays api to determine
whether we can use vertex arrays in GL.`

Fixes: #6173
2023-10-31 13:46:32 -07:00
Matthias Clasen
f725e3f992 glcontext: Add api to check for vertex arrays
Vertex arrays are available in GL and in GLES >= 3.

We don't check for the GLES extension that provided
vertex arrays in older GLES, since that requires
using different API.

This api avoids version checks all over the place.
2023-10-31 13:46:32 -07:00
Matthias Clasen
5ff9316ec2 gsk: Restore bigendian support
Restore the bigendian support that was lost in b0e26873f6,
by just not using GL_BGRA with GLES on bigendian. Should be a
very rare combination, but still.
2023-10-31 13:46:32 -07:00
Matthias Clasen
41dbb7a757 gsk: Use has_bgra in more places
The glyph and icon libaries were also checking for GLES to
decide if data needs to be transformed from BGRA to RGBA.

Use the new has_bgra getter instead.

This will probably break on bigendian, because the
GL_BGRA + GL_UNSIGNED_BYTE combination is not equivalent
to the cairo format on bigendian, but this was already
broken for the gl format information that we get from
gdk_memory_format_gl_format.
2023-10-31 13:46:32 -07:00
Matthias Clasen
9c6a4c3d28 glcontext: Check for GL_EXT_texture_format_BGRA8888
Check for this GLES extension and add a private getter.
2023-10-31 13:46:32 -07:00
Guillaume Bernard
3b8c1189f4 Update French translation 2023-10-23 15:22:24 +00:00
Sabri Ünal
aaea063c96 Update Turkish translation 2023-10-21 09:15:46 +00:00
Matthias Clasen
24670df0f0 Merge branch 'macos_ci' into 'gtk-4-12'
Backport macOS CI to 4-12 to use new runner

See merge request GNOME/gtk!6497
2023-10-19 16:18:53 +00:00
René de Hesselle
9753fc3b82 gdk: Use subpixel_layout on macOS
(cherry picked from commit 9aeb5be8ad)
2023-10-19 17:26:44 +02:00
Jayson Reis
1c58913f6a gdk: Remove a leftover reference to the renamed variable prefers_high_depth
(cherry picked from commit aa888c0b3f)
2023-10-19 17:26:44 +02:00
René de Hesselle
0f8b9c73cd ci: Backport CI yaml from main
This makes the CI yaml identical to the one in main, which changes
two things:
- modernize workflow configuration
- use a new macOS runner for macOS CI
2023-10-19 17:11:35 +02:00
Florentina Mușat
b108e8b91a Update Romanian translation 2023-10-18 18:14:42 +00:00
Daniel Mustieles
06b39de159 Update Spanish translation 2023-10-17 15:09:53 +00:00
Matthias Clasen
761af75b1d Merge branch 'no-emus-in-bitfields-4.12' into 'gtk-4-12'
[4.12] Stop using enums in bitfields

See merge request GNOME/gtk!6491
2023-10-17 10:30:00 +00:00
Sergey Bugaev
3e2ef5037a Stop using enums in bitfields
The C standard does not specify whether the underlying type of an enum
is signed or unsigned, and until C23 there was no way to control this
explicitly. GCC appears to make enums unsigned unless there is a
negative value among cases of the enum, in which case it becomes signed.
MSCV appears to make enums signed by default.

A bitfield of an enum type (which is not specificied in the C standard
either) behaves as if it was an instance of a numeric type with a
reduced value range. Specifically, a 'signed int val : 2;' bitfield will
have the possible values of -2, -1, 0, and 1, with the usual wraparound
behavior for the values that don't fit (although this too is
implementation-defined).

This causes the following issue, if we have:

typedef enum
{
  GTK_ZERO,
  GTK_ONE,
  GTK_TWO
} GtkFoo;

struct _GtkBar
{
  GtkFoo foo : 2;
};

and then assign bar.foo = GTK_TWO and read it back, it will have the
expected value of 2 (aka GTK_TWO) on GCC, but a value of -2 (not
matching any of the enum variants) on MSVC.

There does not seem to be any way to influence signedness of an enum
prior to C23, nor is there a 'unsigned GtkFoo foo : 2;' syntax. The only
remaining options seems to be never using enums in bitfields, which is
what this change implements.

In practice, this fixes GdkPipeIOStream crashing with an assertion when
trying to copy-paste in-app in MSVC builds on GTK.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-10-17 11:40:51 +03:00
Artur S0
f0448a3708 Update Russian translation 2023-10-16 11:56:09 +00:00
Sabri Ünal
7df8dbc64d Update Turkish translation 2023-10-14 07:06:07 +00:00
Jordi Mas i Hernandez
d6fecef605 Update Catalan translation 2023-10-03 06:55:50 +00:00