Matthias Clasen
740965016f
Merge branch 'matthiasc/for-main' into 'main'
...
Add a GDK_DISABLE env var
See merge request GNOME/gtk!7632
2024-08-20 01:58:54 +00:00
Matthias Clasen
39e6301f42
win32: Adapt to default flag changes
...
I hope this change does the right thing.
2024-08-19 21:37:49 -04:00
Matthias Clasen
fd02c885e9
docs: Remove outdated information
...
We no longer disable debug flags in non-debug builds.
2024-08-19 20:40:32 -04:00
Matthias Clasen
26a2966a7b
gdk: Beef up gdk_parse_debug_var
...
Add a docstring for the variable itself, and print it as part
of the help message. Update all callers to provide a docstring.
2024-08-19 20:40:32 -04:00
Matthias Clasen
29cfcbdc97
wayland: Respect GDK_DISABLE=color-mgmt
...
If the color-mgmt feature is disabled, don't use the
xx-color-management-v4 protocol.
2024-08-19 20:40:32 -04:00
Matthias Clasen
de62ea96ab
Add GDK_DISABLE=color-mgmt
...
This flag is meant to turn off color management features of GDK.
If this is set, all surfaces will report sRGB as their preferred
color state.
2024-08-19 20:40:32 -04:00
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
Benjamin Otte
2fb3dc8c90
Merge branch 'wip/otte/for-main' into 'main'
...
wayland: Create EGL window in make_current() if necessary
Closes #6930
See merge request GNOME/gtk!7633
2024-08-19 23:34:35 +00:00
Benjamin Otte
f6a8ba0ccb
gpu: The colorstate op doesn't need a colorstates arg
...
It's using the same colorstate all the time: any premultiplied.
So just hardcode it.
2024-08-20 01:05:20 +02:00
Benjamin Otte
f650f96b69
egl: Don't bind to NULL surface unless surfaceless
...
We need to ensure that an EGL surface exists before we call
eglMakeCurrent() with it. Otherwise we might end up binding to
EGL_NO_SURFACE and then never revising that decision.
Which leads to not rendering to the backbuffer, but into the void.
Fixes X11 rendering being black
Fixes #6930
2024-08-20 01:05:20 +02:00
Benjamin Otte
c230546a2c
wayland: Create EGL window in make_current() if necessary
...
We make_current() before begin_frame() so doing it only in begin_frame()
is too late.
2024-08-20 01:05:20 +02:00
Benjamin Otte
f3ac0535f8
gl: Use the shared GL context when creating GL textures
...
the non-shared context's surface must survive the lifetime of the
GL texture, and when the renderer gets unrealized the surface goes away,
but we cannot guarantee that all GL textures have been destroyed by
then.
So better use a context we know will survive becuase it isn't bound to a
surface.
2024-08-20 01:05:20 +02: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