Benjamin Otte [Mon, 24 Jul 2023 14:12:51 +0000 (16:12 +0200)]
memorytexture: Add a check
Sophie Herold was running into this problem while coding, so let's help
people by catching it early.
Benjamin Otte [Sun, 23 Jul 2023 20:30:26 +0000 (22:30 +0200)]
vulkan: Remove unused variable
It's only used when printing debug stuff. Debug stuff is not that
important.
Benjamin Otte [Sun, 23 Jul 2023 00:06:11 +0000 (02:06 +0200)]
docs: Update for recent rendernode-tool changes
Matthias Clasen [Sun, 30 Jul 2023 11:39:49 +0000 (11:39 +0000)]
Merge branch 'gtk-wip/inactive-state' into 'main'
gtk: Add suspended window state
See merge request GNOME/gtk!6221
Matthias Clasen [Sun, 30 Jul 2023 08:08:11 +0000 (11:08 +0300)]
build: Don't require bleeding-edge wayland-protocols
The 1.32 wayland-protocols release is not in distribution
builds yet, so a hard dependency on it is not helpful.
Jonas Ådahl [Wed, 24 May 2023 14:22:42 +0000 (16:22 +0200)]
gtk: Add suspended window state
This is implemented using a new xdg_toplevel `suspended` state, and is
meant for allowing applications to know when they can stop doing
unnecessary work and thus save power.
In the other backends, the `suspended` state is set at the same time as
`minimized` as it's the closest there is to traditional windowing
systems.
Benjamin Otte [Sat, 29 Jul 2023 23:15:13 +0000 (23:15 +0000)]
Merge branch 'no-list-items' into 'main'
listitemmanager: Handle null roots in get_nearest_tile
Closes #5970
See merge request GNOME/gtk!6220
tszymanski [Thu, 27 Jul 2023 06:26:45 +0000 (23:26 -0700)]
listitemmanager: Handle null roots in get_nearest_tile
Rubberbanding still fails with "No item" warnings, but it no longer
crashes.
Closes #5970
Danial Behzadi [Sat, 29 Jul 2023 01:58:52 +0000 (01:58 +0000)]
Update Persian translation
Yuri Chornoivan [Fri, 28 Jul 2023 17:32:38 +0000 (17:32 +0000)]
Update Ukrainian translation
Yuri Chornoivan [Fri, 28 Jul 2023 17:31:22 +0000 (17:31 +0000)]
Update Ukrainian translation
Matthias Clasen [Fri, 28 Jul 2023 08:51:14 +0000 (08:51 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
glyph cache: Add debug output
See merge request GNOME/gtk!6163
Matthias Clasen [Fri, 28 Jul 2023 08:47:33 +0000 (08:47 +0000)]
Merge branch 'dboles/issue5946' into 'main'
MenuSectionBox: use-markup on labels of submenus
Closes #5946
See merge request GNOME/gtk!6209
Yosef Or Boczko [Fri, 28 Jul 2023 07:13:47 +0000 (07:13 +0000)]
Update Hebrew translation
Matthias Clasen [Fri, 28 Jul 2023 07:11:52 +0000 (07:11 +0000)]
Merge branch 'fix-issue-5775-gtk4' into 'main'
GtkApplicationImplDBus: Cancel DBus method calls on shutdown
Closes #5775
See merge request GNOME/gtk!6181
Matthias Clasen [Fri, 28 Jul 2023 06:13:27 +0000 (06:13 +0000)]
Merge branch 'dboles/range_highlight_with_page_size' into 'main'
Range: Fix hilight not drawn to value if page-size
Closes #5976
See merge request GNOME/gtk!6206
Matthias Clasen [Fri, 28 Jul 2023 06:05:03 +0000 (09:05 +0300)]
build: Check for objcopy options
Check that objcopy understands the --set-section-alignment
option that we are now using.
Matthias Clasen [Thu, 27 Jul 2023 20:36:53 +0000 (23:36 +0300)]
tools: Update the docs
Mention that the render command can produce png or tiff
images.
Benjamin Otte [Wed, 26 Jul 2023 21:30:34 +0000 (23:30 +0200)]
rendernode-tool: Save to tiff
If the save filename ends in .tiff, save to tiff instead.
For now this is a sneaky autodetect feature, not sure if/how to make it
more explicit.
Matthias Clasen [Sun, 2 Jul 2023 14:13:14 +0000 (10:13 -0400)]
ci: Mark the clipboard test as flaky
Lets give up on trying to run this successfully
in ci. More green in more places!
Matthias Clasen [Sun, 2 Jul 2023 02:31:28 +0000 (22:31 -0400)]
glyph cache: Add debug output
Show the size of data uploaded per glyph.
Matthias Clasen [Thu, 27 Jul 2023 19:37:36 +0000 (22:37 +0300)]
gdk: Build fix
Matthias Clasen [Fri, 28 Jul 2023 06:01:43 +0000 (06:01 +0000)]
Merge branch 'wip/chergert/fix-objcopy' into 'main'
demo: use --set-section-alignment when using objcopy
See merge request GNOME/gtk!6218
Ekaterine Papava [Fri, 28 Jul 2023 04:48:23 +0000 (04:48 +0000)]
Update Georgian translation
Christian Hergert [Fri, 28 Jul 2023 00:09:02 +0000 (17:09 -0700)]
demo: use --set-section-alignment when using objcopy
If we don't set the alignment then there is a chance that it ends up
commonly on a 4-byte boundary and GResources will have to malloc/memcpy
the static data.
With --set-section-alignment (which takes a byte offset not ^2) available
in objcopy >= 2.33 we ensure that expectation is met.
Matthias Clasen [Thu, 27 Jul 2023 20:55:24 +0000 (20:55 +0000)]
Merge branch 'zbrown/fix-inspector' into 'main'
inspector: drop overlooked reference
See merge request GNOME/gtk!6215
Matthias Clasen [Wed, 26 Jul 2023 20:16:35 +0000 (20:16 +0000)]
Merge branch 'wip/chergert/fix-inspector' into 'main'
inspector: fix runtime errors with missing widgets
Closes #5986
See merge request GNOME/gtk!6217
Christian Hergert [Wed, 26 Jul 2023 19:15:21 +0000 (12:15 -0700)]
inspector: fix runtime errors with missing widgets
Fixes #5986
Matthias Clasen [Wed, 26 Jul 2023 12:55:31 +0000 (12:55 +0000)]
Merge branch 'alatiera/doc-links' into 'main'
docs: getting_started: Update links to some guides
See merge request GNOME/gtk!6216
Jordan Petridis [Wed, 26 Jul 2023 12:33:15 +0000 (12:33 +0000)]
docs: getting_started: Update links to some guides
Zander Brown [Wed, 26 Jul 2023 05:19:22 +0000 (06:19 +0100)]
inspector: drop overlooked reference
Fix: https://gitlab.gnome.org/GNOME/gtk/-/commit/
0751f59ee859030395b4051dcc4584b39e0d7efc
Benjamin Otte [Wed, 26 Jul 2023 04:39:13 +0000 (04:39 +0000)]
Merge branch 'zbrown/pending' into 'main'
filterlistmodel: emit ::notify::pending after ::items-changed
See merge request GNOME/gtk!6213
Zander Brown [Wed, 26 Jul 2023 03:57:48 +0000 (04:57 +0100)]
filterlistmodel: emit ::notify::pending after ::items-changed
Balázs Meskó [Tue, 25 Jul 2023 23:43:05 +0000 (23:43 +0000)]
Update Hungarian translation
(cherry picked from commit
7a3a82749b751aacc751b747a547d577622c7083)
Matthias Clasen [Mon, 24 Jul 2023 21:52:57 +0000 (21:52 +0000)]
Merge branch 'fix-file-dialog-assert' into 'main'
filedialog: Don't assert too much
Closes #5975
See merge request GNOME/gtk!6207
Matthias Clasen [Mon, 24 Jul 2023 21:11:17 +0000 (21:11 +0000)]
Merge branch 'pgriffis/fix-no-introspection-build' into 'main'
build: Fix building with introspection disabled and testsuite enabled
See merge request GNOME/gtk!6210
Patrick Griffis [Mon, 24 Jul 2023 00:30:30 +0000 (19:30 -0500)]
build: Fix building with introspection disabled and testsuite enabled
The headless tests are written in Python and need g-i.
Sébastien Le Roux [Sat, 22 Jul 2023 17:11:00 +0000 (18:11 +0100)]
MenuSectionBox: use-markup on labels of submenus
To use markup label in menu items, when the menu item has a submenu.
Small additions to 'gtk/gtkmenusectionbox.c' to set the markup attribute
for menu items with submenus.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5946
Matthias Clasen [Sun, 23 Jul 2023 16:30:38 +0000 (12:30 -0400)]
filedialog: Don't assert too much
The GtkFileDialog code was asserting that
we get exactly one file back. But the function
is nullable anyway, so lets just return NULL
if we don't have a file.
Fixes: #5975
Daniel Boles [Sun, 23 Jul 2023 10:11:40 +0000 (11:11 +0100)]
Range: Fix hilight not drawn to value if page-size
If we have a non-zero Adjustment:page-size, the actual amount we draw is
reduced by that page-size. We account for this in various places, but we
did not when deciding how far to allocate the highlight widget, so we
were drawing the highlight not far enough, falling short of the value.
This fixes by subtracting the page-size from the drawn range here too.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5976
Benjamin Otte [Sat, 22 Jul 2023 21:48:29 +0000 (21:48 +0000)]
Merge branch 'wip/otte/vulkan-for-main' into 'main'
tools: No need for --force when specifying filename
See merge request GNOME/gtk!6205
Matthias Clasen [Sat, 22 Jul 2023 21:48:14 +0000 (21:48 +0000)]
Merge branch 'drop-touchscreen-debug' into 'main'
Drop GTK_DEBUG_TOUCHSCREEN
Closes #5893
See merge request GNOME/gtk!6204
Benjamin Otte [Fri, 21 Jul 2023 22:54:03 +0000 (00:54 +0200)]
vulkan: Clean up renderpass/offscreen creation
Instead of scale and whatnot, pass:
1. The image size
2. The viewport to map to that image size
and compute everything else from there.
In particular, we set the Vulkan viewport to the image dimensions
instead of the viewport size.
All of this makes things a lot simpler while keeping the required
functionality.
Benjamin Otte [Sat, 22 Jul 2023 21:26:44 +0000 (23:26 +0200)]
vulkan: Plug a memleak
This one was introduced in
4d9e7d30b00.
Benjamin Otte [Sat, 22 Jul 2023 21:25:33 +0000 (23:25 +0200)]
vulkan: Plug a memleak
This one was introduced in
cd84f5a56ef.
Benjamin Otte [Sat, 22 Jul 2023 03:21:30 +0000 (05:21 +0200)]
tools: No need for --force when specifying filename
If people specify the filename, they should know what they're doing.
If they don't, abort if the guessed filename already exists and insist
on the user explicitly giving it.
Matthias Clasen [Sat, 22 Jul 2023 20:41:39 +0000 (16:41 -0400)]
Drop GTK_DEBUG_TOUCHSCREEN
This flag was never doing much, and is only raising
the wrong expectations. Remove it.
Fixes: #5893
Matthias Clasen [Sat, 22 Jul 2023 15:45:42 +0000 (15:45 +0000)]
Merge branch 'textview-keynav-backspace' into 'main'
textview: Match entry behavior for backspace
Closes #3417
See merge request GNOME/gtk!6203
Matthias Clasen [Sat, 22 Jul 2023 13:51:32 +0000 (13:51 +0000)]
Merge branch 'fix-issue-5965' into 'main'
gtktextview: return early when resetting gesture / event controller
Closes #5965
See merge request GNOME/gtk!6200
Matthias Clasen [Sat, 22 Jul 2023 13:40:17 +0000 (09:40 -0400)]
textview: Match entry behavior for backspace
As pointed out in #3417, there is a long-standing
difference in how GtkEntry and GtkTextView treat
Ctrl-Shift-Backspace (and other variations): GtkEntry
always operates on the selection first, if it exists.
GtkTextView only handled plain Backspace that way, and
ignores the selection for other variations.
There is no good reason for this difference, so just
remove it and make GtkTextView behave the same as
GtkEntry.
Fixes: #3417
Ekaterine Papava [Sat, 22 Jul 2023 13:24:50 +0000 (13:24 +0000)]
Update Georgian translation
Ngọc Quân Trần [Sat, 22 Jul 2023 08:54:03 +0000 (08:54 +0000)]
Update Vietnamese translation
Daniel Boles [Sat, 22 Jul 2023 08:43:25 +0000 (08:43 +0000)]
Merge branch 'dboles/PopoverMenu-png' into 'main'
Fix broken image menu.png in Gtk.PopoverMenu intro
See merge request GNOME/gtk!6187
Daniel Boles [Sat, 22 Jul 2023 08:43:06 +0000 (08:43 +0000)]
Merge branch 'dboles/for-main' into 'main'
tools: Replace references to GTK+ with GTK no plus
See merge request GNOME/gtk!6199
Ngọc Quân Trần [Sat, 22 Jul 2023 08:16:20 +0000 (08:16 +0000)]
Update Vietnamese translation
(cherry picked from commit
e944cd89166aa35c290b508057d2269859b27591)
Benjamin Otte [Sat, 22 Jul 2023 02:43:11 +0000 (02:43 +0000)]
Merge branch 'wip/otte/vulkan-for-main' into 'main'
gsk: Add gskrectprivate.h
See merge request GNOME/gtk!6201
Benjamin Otte [Fri, 21 Jul 2023 23:11:19 +0000 (01:11 +0200)]
gdk: Add function to query alpha format for depth
It's meant to be used in renderers.
Benjamin Otte [Fri, 21 Jul 2023 23:29:24 +0000 (01:29 +0200)]
gdk: Make A8 and A16 formats premultiplied
The relevant question here is about details, because we have to choose
if we declare alpha-only formats as having their (nonexistant) color
channels premultiplied or not, so that the code paths using them can do
the right thing.
Because we are premultiplied by default, it makes sense to treat alpha
like that, because then the alpha-only code doesn't need to do
workarounds for straight alpha.
Where this is relevant of course is when expanding the alpha channel
into color channels, where we want to end up with white.
So make sure we do color = alpha there instead of color = 1 like we did
before.
Benjamin Otte [Fri, 21 Jul 2023 01:05:40 +0000 (03:05 +0200)]
memoryformat: Copy idea from tiff code
The static assertion makes sure that newer formats get added.
Benjamin Otte [Fri, 21 Jul 2023 01:02:33 +0000 (03:02 +0200)]
gdk: Add A16_FLOAT and A32_FLOAT formats
We need them for mask-only textures.
For tiffs, we convert the formats to RGBA (the idea that tiff can save
everything needs to be buried I guess) as tiffs can't do alpha-only.
Benjamin Otte [Thu, 20 Jul 2023 23:34:19 +0000 (01:34 +0200)]
vulkan: Remove unused struct
Benjamin Otte [Thu, 20 Jul 2023 20:25:20 +0000 (22:25 +0200)]
gsk: Add gskrectprivate.h
Add a bunch of inline functions for graphene_rectangle_t.
We use those quite extensively in tight loops so making them as fast as
possible via inlining has massive benefits.
The current render-heavy benchmark I am playing (th paris-30k in node-editor)
went from 49fps to 85fps on my AMD.
Benjamin Otte [Thu, 20 Jul 2023 01:10:28 +0000 (03:10 +0200)]
vulkan: Add new error code
Efstathios Iosifidis [Fri, 21 Jul 2023 22:29:43 +0000 (22:29 +0000)]
Update Greek translation
(cherry picked from commit
9d633773b0952ecd7cf53a54a71feb4c7706f6d4)
Luca Bacci [Tue, 11 Jul 2023 11:25:22 +0000 (13:25 +0200)]
GtkApplicationImplDBus: Cancel DBus method calls on shutdown
We do that for method calls where we pass a valid GAsyncReadyCallback
Fixes #5775
Luca Bacci [Fri, 21 Jul 2023 13:33:45 +0000 (15:33 +0200)]
gtktextview: return early when resetting gesture / event controller
Fixes #5965
Daniel Boles [Fri, 21 Jul 2023 11:05:25 +0000 (12:05 +0100)]
tools: Replace references to GTK+ with GTK no plus
Matthias Clasen [Fri, 21 Jul 2023 10:56:14 +0000 (10:56 +0000)]
Merge branch 'render-tool' into 'main'
Add gtk4-render-tool
See merge request GNOME/gtk!6197
Matthias Clasen [Thu, 20 Jul 2023 19:09:27 +0000 (15:09 -0400)]
Add a gtk4-rendernode-tool
This is meant to work with serialized render nodes.
Daniel Boles [Fri, 21 Jul 2023 09:35:30 +0000 (09:35 +0000)]
Merge branch 'dboles/for-main' into 'main'
ShortcutController: Add links to docs, fix heading
See merge request GNOME/gtk!6198
Daniel Boles [Fri, 21 Jul 2023 09:01:56 +0000 (10:01 +0100)]
ShortcutController: Add links to docs, fix heading
to be "as GtkBuildable", not "as a GtkBuildable", as no other file uses
the latter.
Matthias Clasen [Fri, 21 Jul 2023 03:38:58 +0000 (03:38 +0000)]
Merge branch 'wip/kabus/calendar-select-signal' into 'main'
gtk/calendar: Avoid emision of day-selected signal from nav buttons
Closes #5769
See merge request GNOME/gtk!6196
Khalid Abu Shawarib [Fri, 21 Jul 2023 03:38:58 +0000 (03:38 +0000)]
gtk/calendar: Avoid emision of day-selected signal from nav buttons
Matthias Clasen [Thu, 20 Jul 2023 17:11:44 +0000 (13:11 -0400)]
gdk: Drop unnecessary conditionals
We require GLib 2.76 now.
Matthias Clasen [Thu, 20 Jul 2023 17:15:53 +0000 (13:15 -0400)]
tools: Use #pragma once
We are trying to be consistent about this.
Matthias Clasen [Thu, 20 Jul 2023 17:10:53 +0000 (13:10 -0400)]
tools: Drop unnecessary conditionals
We require GLib 2.76 now.
Matthias Clasen [Thu, 20 Jul 2023 17:39:06 +0000 (17:39 +0000)]
Merge branch 'gtk-fix-issue-4990' into 'main'
Add check for large compose files
Closes #4990
See merge request GNOME/gtk!6195
Matthias Clasen [Thu, 20 Jul 2023 15:48:13 +0000 (11:48 -0400)]
Make the new compose table test work
This just copies what we do already for other
tests that check parser failures.
Benjamin Otte [Wed, 19 Jul 2023 19:51:57 +0000 (19:51 +0000)]
Merge branch 'wip/otte/vulkan-for-main' into 'main'
vulkan: Various smallish things
See merge request GNOME/gtk!6193
Benjamin Otte [Wed, 19 Jul 2023 05:38:51 +0000 (07:38 +0200)]
vulkan: Be more careful with supported images
Now that we can upload all these fancy formats, we need to make sure
that we actually can.
Benjamin Otte [Wed, 19 Jul 2023 04:45:00 +0000 (06:45 +0200)]
memoryformat: fast-path copies of the same format
Basically, memcpy() asap if possible.
This happens a lot in Vulkan, where we gdk_memory_conert() image
data from memory textures straight into the VulkanBuffer.
And usually we support the format.
Benjamin Otte [Wed, 19 Jul 2023 04:14:55 +0000 (06:14 +0200)]
vulkan: Add premultiply step to texture upload
When a GdkMemoryFormat is not supported natively and there's
postprocessing required, add a way to mark a VulkanImage as such via the
new postprocess flags.
Also allow texting such iamges only with new_for_upload() and detect
when that is the case and then run a postprocessing step that converts
that image to a suitable format.
This is done with a new "convert" shader/op.
This now supports all formats natively, no conversions happen on the CPU
anymore (unless the GPU is old).
Benjamin Otte [Wed, 19 Jul 2023 04:13:28 +0000 (06:13 +0200)]
vulkan: Change fallback formats
Always fall back to a format that isn't swizzled.
That way it can be used as a target format for rendering.
Benjamin Otte [Tue, 18 Jul 2023 22:31:48 +0000 (00:31 +0200)]
vulkan: Split renderpass op into 2
Add an explicit begin() and an end() op. For now, this looks like
overkill, but it allows doing renderpasses with custom ops that are not
meant to render a rendernode.
Examples for this are pre/postprocessing passes or 2-pass blur.
Benjamin Otte [Tue, 18 Jul 2023 22:15:29 +0000 (00:15 +0200)]
vulkan: Don't store the renderpass
It's only used when parsing.
Benjamin Otte [Tue, 18 Jul 2023 22:08:56 +0000 (00:08 +0200)]
vulkan: Pass rectangles where no regions are used
The API was using regions because it always had. But all the code ever
did was get the extents of the region.
So simplify everything by using rectangles everywhere.
Benjamin Otte [Tue, 18 Jul 2023 22:00:34 +0000 (00:00 +0200)]
vulkan: Stop keeping the context around
These days, we can query it with gsk_vulkan_render_get_context().
Makes quite a few functions require one less argument.
And it also makes the GskVulkanRenderPass empty. Gotta figure out what
to do with it.
Benjamin Otte [Tue, 18 Jul 2023 21:15:22 +0000 (23:15 +0200)]
vulkan: Remove unused stuff fom renderpass
... and move it to the one place where it is used.
Benjamin Otte [Mon, 17 Jul 2023 19:03:13 +0000 (21:03 +0200)]
vulkan: Free storage buffer when disposing render object
This caused a lot of leaked memory on the GPU when rendering textures.
(Read: inside node-editor)
Benjamin Otte [Mon, 17 Jul 2023 19:02:33 +0000 (21:02 +0200)]
vulkan: Fix leaks with pipeline cache
In particular, we were leaking the actual cache and then created a new
one.
Benjamin Otte [Wed, 19 Jul 2023 13:36:55 +0000 (15:36 +0200)]
build: Move the glslc check into the top meson file
Put it with the other Vulkan checks, so it's easy to find.
Benjamin Otte [Wed, 19 Jul 2023 12:15:57 +0000 (14:15 +0200)]
vulkan: Remove the pre-compiled shaders
Instead, build-depnd on glslc to build them.
glslc is available in all important distros for a while:
Fedora >= 28
Ubuntu >= 23.04
Debian >= 12
Arch
Opensuse >= 15.2
msys2
are the ones I checked.
So we can depend on it and avoid having to deal with keeping spirv files
up-to-date in all commits.
It's also 700kB of data, and not updating it helps.
Benjamin Otte [Wed, 19 Jul 2023 12:55:07 +0000 (14:55 +0200)]
ci: Include glslc for Vulkan builds
Luca Bacci [Wed, 19 Jul 2023 15:40:52 +0000 (17:40 +0200)]
Add test for large compose file
See #4990
Luca Bacci [Wed, 19 Jul 2023 14:19:28 +0000 (16:19 +0200)]
Add check for large compose files
Fixes #4990
Daniel Boles [Wed, 19 Jul 2023 13:02:28 +0000 (13:02 +0000)]
Merge branch 'dboles/theme-no-backdrop-list-view-text' into 'main'
theme: Don't dim text in backdropped list/listview
See merge request GNOME/gtk!6175
Benjamin Otte [Sun, 16 Jul 2023 12:22:35 +0000 (12:22 +0000)]
Merge branch 'wip/otte/vulkan-for-main' into 'main'
vulkan: Make RenderOps into proper structs
See merge request GNOME/gtk!6188
Benjamin Otte [Sun, 16 Jul 2023 11:52:15 +0000 (13:52 +0200)]
vulkan: Rebuild the shaders
Just to be sure I didn't forget rebuilding some shader at some point.
Benjamin Otte [Sat, 15 Jul 2023 20:19:20 +0000 (22:19 +0200)]
vulkan: Redo barriers
We now store all the relevant state of the image inside the VulkanImage
struct, so we can delay barriers for as long as possible.
Whenever we want to use an image, we call the new
gsk_vulkan_image_transition() and it will add a barrier to the desired
state if one is necessary.
Benjamin Otte [Sat, 15 Jul 2023 14:38:03 +0000 (16:38 +0200)]
vulkan: Track the current pipeline stage of images
This way, we can in theory properly transition images because we know
which stage to transition from.
IN practice this is happening in future commits.