Commit Graph

81523 Commits

Author SHA1 Message Date
Matthias Clasen
2d230f79a6 Change the offload-disable flag
Move this from GSK_DEBUG=offload-disable to GDK_DISABLE=offload.
2024-08-19 20:40:32 -04:00
Matthias Clasen
cde094a0df Add a GDK_DISABLE env var
This is taking over the feature-disabling keys from GDK_DEBUG.
2024-08-19 20:40:32 -04:00
Artur S0
7ce942d3fb Update Russian translation 2024-08-19 14:07:35 +00:00
Chun-wei Fan
f592a303e4 Merge branch 'vulkan-win32-fix-resize' into 'main'
gdksurface-win32.c: Call _gdk_surface_update_size() more (fix resizing on Vulkan on certain drivers)

Closes #6565

See merge request GNOME/gtk!7562
2024-08-19 03:53:29 +00:00
Chun-wei Fan
e14670d457 gdksurface-win32.c: Call _gdk_surface_update_size() more
The current resizing implementation in the GDK-Win32 backend is not
telling GDK early enough for Vulkan that a resize in the surface (i.e.
HWND) is done, so that GDK can re-create swapchain in time, which is
apparent on nVidia drivers (and AMD drivers that utilize the mailbox
presentation mode on Windows) when the HWND is being enlarged
interactively.

To work around this, bar a refactor in the Windows resizing/presentation
code, is to call _gdk_surface_update_size() when we really did resize
the HWND when we handle queued resizes via SetWindowsPos().

The existing call in gdksurface-win32.c in
_gdk_win32_surface_compute_size() remains required, otherwise the
surface won't display initially.

Thanks to Benjamin Otte for pointing this possibility out.
2024-08-19 11:25:50 +08:00
Matthias Clasen
0acf9caa8e Merge branch 'matthiasc/for-main' into 'main'
node-editor: Make Ctrl-Shift-V undoable

See merge request GNOME/gtk!7629
2024-08-19 02:20:52 +00:00
Matthias Clasen
22860389de node-editor: Make Ctrl-Shift-V undoable 2024-08-18 21:45:25 -04:00
Matthias Clasen
16e764b402 wayland: Use interface names defined by protocol
We don't need to hardcode all the interface names as string literals,
since they come as part of the wl_interface structs in the protocol
bindings we use.
2024-08-18 18:23:18 -04:00
Matthias Clasen
85862c4e22 Merge branch 'matthiasc/for-main' into 'main'
Document new inspector functionality

See merge request GNOME/gtk!7628
2024-08-18 21:37:55 +00:00
Matthias Clasen
eb764d43f8 Document new inspector functionality
Mention the new shortcuts for recording.
2024-08-18 17:14:28 -04:00
Matthias Clasen
6b57f596f7 Merge branch 'matthiasc/for-main' into 'main'
inspector: Add event traces

See merge request GNOME/gtk!7627
2024-08-18 21:00:01 +00:00
Matthias Clasen
cefaec5d6f node-editor: Add Ctrl-Shift-V
Make Ctrl-Shift-V trigger a 'paste-as-node' action which replaces
the current content with the render node in the clipboard.
2024-08-18 15:44:40 -04:00
Matthias Clasen
29b6eab0ea inspector: Add some shortcuts
While the inspector is open, look for some shortcuts:

Super-r to toggle recording
Super-c to take a screenshot

A screenshot here means just a single-frame recording.
For convenience, we put the recorded frame onto the
clipboard too.
2024-08-18 15:44:40 -04:00
Matthias Clasen
360674f523 inspector: Add a snapshot function
Add a function that records just a single frame, and puts it
on the clipboard.
2024-08-18 15:44:40 -04:00
Matthias Clasen
7900f91e46 widget: Record event traces
Use the newly introduced inspector api to add event traces.
2024-08-18 15:44:40 -04:00
Matthias Clasen
e4248503cf inspector: Add event traces
When recording events, make it possible to add 'traces' of the
events journey, and show those in the recorder.
2024-08-18 15:44:40 -04:00
Matthias Clasen
168bab34f7 inspector: Simplify
We can just put the render node on the clipboard directly, no
manual serialization required.
2024-08-18 15:44:40 -04:00
Matthias Clasen
46e7ea8c1e Fix a misleading comment 2024-08-18 15:44:40 -04:00
Matthias Clasen
1ce7de0fb8 Cosmetics 2024-08-18 10:44:38 -04:00
Matthias Clasen
d9a0f3cfe2 Merge branch 'matthiasc/for-main' into 'main'
node parser: Move parse_color even earlier

See merge request GNOME/gtk!7625
2024-08-17 23:35:44 +00:00
Matthias Clasen
200cec3321 inspector: Minor GdkRGBA -> GdkColor porting 2024-08-17 18:56:05 -04:00
Matthias Clasen
d4e730db0c node parser: Move parse_color even earlier
It will be used by parse_stops in the future, so move it above.

No functional change.
2024-08-17 16:24:20 -04:00
Benjamin Otte
ca78d845df Merge branch 'wip/otte/for-main' into 'main'
gsk: Don't print any sRGB color as rgb() or rgba()

See merge request GNOME/gtk!7624
2024-08-17 20:19:01 +00:00
Benjamin Otte
9ff31dd29b testsuite: Improve testcase
This should have gone into !7619 but gitlab managed to finish the CI run
just as I was pushing a new version to the MR with
merge_request.merge_when_pipeline_succeeds and apparently gitlab applied
that to the previous version or something.

So now that MR merged an incomplete version to main. And here's the fix
for that.
2024-08-17 21:31:14 +02:00
Benjamin Otte
0815359a20 Merge branch 'wip/otte/for-main' into 'main'
gsk: Don't print any sRGB color as rgb() or rgba()

See merge request GNOME/gtk!7619
2024-08-17 19:28:07 +00:00
Benjamin Otte
96139a902d gsk: Don't print any sRGB color as rgb() or rgba()
If the color value is not inside the proper range for rgb() or rgba()
values being integers, use color() instead.

Tests added/adapted.
2024-08-17 21:09:25 +02:00
Benjamin Otte
a6233ac852 rendernodeparser: Check color values aren't out of range
Use the clamp() API from the previous commit to:

1. Clamp values into range
2. Emit an error if values were out of range

Unlike CSS, which just clamps and doesn't emit an error, we do want to
emit one because we care about colors being correct in our node files.
2024-08-17 18:12:23 +02:00
Matthias Clasen
4e9ebb5299 gdk: Add gdk_color_state_clamp()
Allows clamping values into the correct range to construct valid colors.
2024-08-17 18:12:23 +02:00
Benjamin Otte
585f31fa2e rendernodeparser: Rename function
There's no need to name a function parse_color2() when parse_color()
doesn't exist.
2024-08-17 16:03:46 +02:00
Benjamin Otte
69e7838461 rendernodeparser: Don't have unnecessary forward declarations
Reorders functions to not have them.

No functional changes.
2024-08-17 16:03:46 +02:00
Matthias Clasen
3fe3800b7c Merge branch 'small-scale' into 'main'
monitor: Don't forbid scales < 1

Closes #6928

See merge request GNOME/gtk!7623
2024-08-17 13:22:15 +00:00
Matthias Clasen
491275b444 Merge branch 'radiobutton-focus' into 'main'
checkbutton: Add a 'grouped' style class

Closes #6936

See merge request GNOME/gtk!7622
2024-08-17 12:44:35 +00:00
Matthias Clasen
1cd107d5ab monitor: Don't forbid scales < 1
With fractional scaling, people try out things like 0.75 scaling,
and there's no reason for us to prohibit that from working.

Fixes: #6928
2024-08-17 08:26:55 -04:00
Matthias Clasen
5af2d95bff checkbutton: Add a 'grouped' style class
This will make it easier for themes to style radio buttons
differently from check buttons, since out CSS does not have
:has().

The concrete desire here is to use a different outline for
the focus rectangle.

Update affected tests.

Fixes: #6936
2024-08-17 08:22:54 -04:00
Benjamin Otte
62f5db06a1 Merge branch 'fix-opaque-surface-crash' into 'main'
Avoid a crash in gdk_surface_is_opaque

Closes #6938

See merge request GNOME/gtk!7621
2024-08-17 11:26:27 +00:00
Matthias Clasen
e32a12f877 Avoid a crash in gdk_surface_is_opaque
Nothing in gtk calls gdk_surface_set_opaque_region anymore, so
the opaque region will normally be NULL.

Fixes: #6938
2024-08-17 07:03:57 -04:00
Ekaterine Papava
584733f034 Update Georgian translation 2024-08-17 03:49:13 +00:00
Matthias Clasen
c3c1819e12 Merge branch 'css-variables-fixes2' into 'main'
css: Set the parent of the variable set earlier

Closes #6881

See merge request GNOME/gtk!7618
2024-08-16 16:52:34 +00:00
Matthias Clasen
3f36ebc6e7 Merge branch 'matthiasc/for-main' into 'main'
textview: Fix a regression in selection drawing

Closes #6931

See merge request GNOME/gtk!7620
2024-08-16 16:06:14 +00:00
Matthias Clasen
4aea2d2e09 css: Don't pass style variables redundantly
The context->variables field is expected by the resolve code to be
the keyframe variables. That code takes the style variables from
context->style anyway, so no need to pass them as context->variables
too. And crucially, the lookup code treats the keyframes variables
differently to the style variables, since it doesn't expect the
hierarchical structure that comes from parent styles. This change
fixes infinite recursion in variable lookup with css like

:root {
  --a: var(--b);
}

.foo {
  --b: var(--a);
  color: var(--a);
}

Test included.

Fixes: #6881
2024-08-16 11:38:56 -04:00
Matthias Clasen
4e9107d4b1 widget: Fail properly in compute_transform
We don't currently support computing transforms across native
boundaries. This could be added by using gdk_popup_get_position_x/y.
For now, just fail in this case.

Related: #6355
2024-08-16 10:07:53 -04:00
Matthias Clasen
7d895720be textview: Fix a regression in selection drawing
We were no longer respecting the text color or the selection being
clear.

Fixes: #6931
2024-08-16 08:44:35 -04:00
Benjamin Otte
323dde2b10 Merge branch 'wip/otte/for-main' into 'main'
wayland: Implement GdkToplevel::decorated

See merge request GNOME/gtk!7617
2024-08-16 00:01:54 +00:00
Benjamin Otte
ac16e375c7 wayland: Implement GdkToplevel::decorated
... and use that instead of custom announce_csd/announce_ssd APIs.
2024-08-16 01:38:55 +02:00
Matthias Clasen
31143f9611 Merge branch 'kjellahl/docs-window' into 'main'
docs: Improve gtk_window_set_interactive_debugging() docs

See merge request GNOME/gtk!7614
2024-08-15 16:57:00 +00:00
Matthias Clasen
7da4844dcc Merge branch 'css-variables-crash' into 'main'
css: Fix a crash in variables

Closes #6935

See merge request GNOME/gtk!7615
2024-08-15 15:15:48 +00:00
Matthias Clasen
c9e4abcd3a css: Fix a crash in variables
We were not careful enough when checking for reference cycles.

Fixes: #6935

Test included.
2024-08-15 10:16:47 -04:00
Matthias Clasen
6e80fde45f Merge branch 'accessibility-docs-fix' into 'main'
docs: Fix a typo in a code example on the accessibility page

See merge request GNOME/gtk!7616
2024-08-15 13:49:29 +00:00
Philip Withnall
d182b133a9
docs: Fix a typo in a code example on the accessibility page
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-15 14:18:31 +01:00
Matthias Clasen
5e3240a32f Merge branch 'matthiasc/for-main' into 'main'
colorstate: Don't leak names

See merge request GNOME/gtk!7611
2024-08-14 18:06:36 +00:00