gtk4.git
2 years agovulkan: Don't transform the viewport rect
Benjamin Otte [Tue, 9 May 2023 21:48:44 +0000 (23:48 +0200)]
vulkan: Don't transform the viewport rect

We don't want to render the offscreen trnsformed, we want to render it
as-is.

We lose the correct scale factor, but that requires some separate work,
so for now it gets a bit blurry on hidpi.

2 years agovulkan: Make quarks global variables
Benjamin Otte [Tue, 9 May 2023 20:30:49 +0000 (22:30 +0200)]
vulkan: Make quarks global variables

I don't want to ensure there's a RenderPass available everywhere and
recreate the quarks in each, I just want to use them.

2 years agovulkan: Split out a function
Benjamin Otte [Tue, 9 May 2023 20:26:13 +0000 (22:26 +0200)]
vulkan: Split out a function

We can now create offscreens explicitly.

2 years agovulkan: offscreens are used as color attachments
Benjamin Otte [Tue, 9 May 2023 20:25:22 +0000 (22:25 +0200)]
vulkan: offscreens are used as color attachments

... so set the corresponding flag.

Also name the function "new_for_offscreen()" because thats what this
function is about, "texture" is ambiguous.

2 years agovulkan: compute new modelview directly
Benjamin Otte [Sun, 7 May 2023 08:07:02 +0000 (10:07 +0200)]
vulkan: compute new modelview directly

no need to go through a GskTransform

2 years agovulkan: Make border shader handle fractional widths
Benjamin Otte [Sun, 7 May 2023 01:41:38 +0000 (03:41 +0200)]
vulkan: Make border shader handle fractional widths

We were rounding widths properly, make sure we always round up.

2 years agovulkan: Don't round corners when growing rounded rect
Benjamin Otte [Sun, 7 May 2023 01:40:44 +0000 (03:40 +0200)]
vulkan: Don't round corners when growing rounded rect

If the corner is set to 0, keep it there.

2 years agovulkan: Rewrite rounded rectangle to use SDF distance
Benjamin Otte [Sat, 6 May 2023 23:49:29 +0000 (01:49 +0200)]
vulkan: Rewrite rounded rectangle to use SDF distance

We can use this to properly compute distance in scaled situations.
We also now compute coverage with (imperfect) antialiasing.

2 years agovulkan: Start rework on shaders to allow antialiased drawing
Benjamin Otte [Sat, 6 May 2023 23:06:52 +0000 (01:06 +0200)]
vulkan: Start rework on shaders to allow antialiased drawing

This introduces the rect object and adds a rect_distance() and
rect_coverage() function.

_distance() returns the signed distance tp the rectangle.
_coverage() returns the coverage of a pixel centered at that position.

Note that the pixel size is computed using dFdx/dFdy.

2 years agovulkan: Render whole texture
Benjamin Otte [Fri, 5 May 2023 07:29:47 +0000 (09:29 +0200)]
vulkan: Render whole texture

When the node bounds were a non-integer size, the texture would get
ceil()ed pixels, but various viewport or scissor computations might
floor() instead, leaving the right/bottom row of pixels untouched.
Make sure those functions ceil(), too.

2 years agorenderer: return_if_fail() if the given texture size is 0
Benjamin Otte [Sat, 20 May 2023 23:27:09 +0000 (01:27 +0200)]
renderer: return_if_fail() if the given texture size is 0

All renderers SEGV currently when that happens.

2 years agoMerge branch 'drop-x11-dnd-keynav' into 'main'
Matthias Clasen [Sat, 3 Jun 2023 19:38:24 +0000 (19:38 +0000)]
Merge branch 'drop-x11-dnd-keynav' into 'main'

x11: Stop using passive grabs

See merge request GNOME/gtk!6055

2 years agoRevert "gdk/x11: Also grab keyboard during XDnD grabs"
Matthias Clasen [Sat, 3 Jun 2023 16:17:55 +0000 (12:17 -0400)]
Revert "gdk/x11: Also grab keyboard during XDnD grabs"

This reverts commit ae94417f80c92b26792280a9b798cafc01e49232.

2 years agox11: Stop using passive grabs
Matthias Clasen [Sat, 3 Jun 2023 14:44:21 +0000 (10:44 -0400)]
x11: Stop using passive grabs

The keynav that this implements is half-broken under
xwayland anyway, and it confused and complicates things
on the compositor side.

2 years agoMerge branch 'wip/otte/fix-glx' into 'main'
Benjamin Otte [Sat, 3 Jun 2023 16:19:09 +0000 (16:19 +0000)]
Merge branch 'wip/otte/fix-glx' into 'main'

glx: Trap errors inside loop

Closes #5857

See merge request GNOME/gtk!6056

2 years agoglx: Trap errors inside loop
Benjamin Otte [Sat, 3 Jun 2023 16:00:56 +0000 (18:00 +0200)]
glx: Trap errors inside loop

Instead of trapping errors for the whole loop trying to create GL
contexts, trap them once per GL context.

Apparently GLX does throw an error when a too high version is requested
and doesn't just return NULL and then that error lingers when we try
lower versions.

Fixes #5857

2 years agoMerge branch 'wip/antoniof/boxlayout-baseline-optional' into 'main'
Matthias Clasen [Sat, 3 Jun 2023 11:01:40 +0000 (11:01 +0000)]
Merge branch 'wip/antoniof/boxlayout-baseline-optional' into 'main'

boxlayout: Don't always reserve height for baseline alignment

Closes #5863

See merge request GNOME/gtk!6053

2 years agoboxlayout: Don't always reserve height for baseline alignment
António Fernandes [Fri, 2 Jun 2023 19:18:56 +0000 (20:18 +0100)]
boxlayout: Don't always reserve height for baseline alignment

Otherwise an horizontal box may have a larger minumum height than
any of its children even though non of them is baseline-aligned.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5863

2 years agoMerge branch 'trap-bad-rr-errors' into 'main'
Matthias Clasen [Fri, 2 Jun 2023 11:31:45 +0000 (11:31 +0000)]
Merge branch 'trap-bad-rr-errors' into 'main'

x11: Trap XRandr errors when getting outputs during init and update

See merge request GNOME/gtk!6046

2 years agoMerge branch 'for-main' into 'main'
Luca Bacci [Fri, 2 Jun 2023 09:34:48 +0000 (09:34 +0000)]
Merge branch 'for-main' into 'main'

GdkWin32 Cleanup

See merge request GNOME/gtk!5714

2 years agox11: Trap XRandr errors when getting outputs during init and update
Marco Trevisan (Treviño) [Thu, 1 Jun 2023 22:23:51 +0000 (00:23 +0200)]
x11: Trap XRandr errors when getting outputs during init and update

We may try to update the XRR outputs and Crtcs when they're changing in
the server, and so we may get BadRROutput that we're currently not
handling properly.

As per this, use traps and check whether we got errors, and if we did
let's ignore the current output.

It's not required to call init_randr13() again because if we got errors
it's very likely that there's a change coming that will be notified at
next iteration during which we'll repeat the init actions.

2 years agoMerge branch 'sumibi-yakitori/fix-glcontext-macos' into 'main'
Matthias Clasen [Thu, 1 Jun 2023 20:58:22 +0000 (20:58 +0000)]
Merge branch 'sumibi-yakitori/fix-glcontext-macos' into 'main'

macOS: Fix problems with OpenGL context creation on macOS

Closes #5811

See merge request GNOME/gtk!6044

2 years agoWindow: Copy caveats from :*visible to the setters
Daniel Boles [Thu, 1 Jun 2023 19:31:22 +0000 (20:31 +0100)]
Window: Copy caveats from :*visible to the setters

2 years agoWindow: Fix wrong case in property attribute which
Daniel Boles [Thu, 1 Jun 2023 19:26:57 +0000 (20:26 +0100)]
Window: Fix wrong case in property attribute which

rendered the literal text `org.gtk.MEthod.set_property focus-visible`.

2 years agoFix an issue where `min_version` was not being used as the minimum version required...
sumibi-yakitori [Thu, 1 Jun 2023 14:05:44 +0000 (23:05 +0900)]
Fix an issue where `min_version` was not being used as the minimum version required by GTK

2 years agoMerge branch 'wip/alice/muxer-fix' into 'main'
Matthias Clasen [Thu, 1 Jun 2023 10:54:33 +0000 (10:54 +0000)]
Merge branch 'wip/alice/muxer-fix' into 'main'

actionmuxer: Correctly notify actions after reparenting

Closes #5861

See merge request GNOME/gtk!6043

2 years agoFix a bug in error checking conditions. This avoids unintentional `Legacy` of the...
sumibi-yakitori [Thu, 1 Jun 2023 07:46:24 +0000 (16:46 +0900)]
Fix a bug in error checking conditions. This avoids unintentional `Legacy` of the created OpenGL context

2 years agoThe GL version reported by epoxy seems to depend on the current GL context, so the...
sumibi-yakitori [Thu, 1 Jun 2023 07:43:57 +0000 (16:43 +0900)]
The GL version reported by epoxy seems to depend on the current GL context, so the GL context to create should be the one determined by `gdk_gl_context_get_matching_version`

2 years agoactionmuxer: Correctly notify actions after reparenting
Alice Mikhaylenko [Thu, 1 Jun 2023 02:27:10 +0000 (06:27 +0400)]
actionmuxer: Correctly notify actions after reparenting

When registering an observer, we send a notification and for that we need
to query the action's state and param type. When setting up a muxer parent,
same thing happens, except the action is queried on the parent instead.

This means that the muxer will notify observers about the parent's actions,
but not about its own.

Add a test to verify it works.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5861

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 31 May 2023 19:14:07 +0000 (19:14 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gsk: Support straight alpha textures

See merge request GNOME/gtk!6041

2 years agogltexturebuilder: Update the docs
Matthias Clasen [Wed, 31 May 2023 18:39:07 +0000 (14:39 -0400)]
gltexturebuilder: Update the docs

We do handle unpremultiplied alpha correctly (albeit
non-optimally) now.

2 years agogsk: Support straight alpha textures
Matthias Clasen [Wed, 31 May 2023 18:33:52 +0000 (14:33 -0400)]
gsk: Support straight alpha textures

This is not the optimal way of doing it: we're
reuploading the texture with client-side conversion.
But it fits nicely into our current handling of mipmaps.

We can do better once we use shaders for colorspace
conversions.

2 years agoMerge branch 'a11y-crash' into 'main'
Matthias Clasen [Wed, 31 May 2023 12:27:49 +0000 (12:27 +0000)]
Merge branch 'a11y-crash' into 'main'

label: Fix crashes when executing a11y actions

See merge request GNOME/gtk!6034

2 years agolabel: Fix crashes when executing a11y actions
Erik Schilling [Wed, 31 May 2023 12:27:48 +0000 (12:27 +0000)]
label: Fix crashes when executing a11y actions

2 years agoMerge branch 'more-texture-tests' into 'main'
Matthias Clasen [Wed, 31 May 2023 12:01:31 +0000 (12:01 +0000)]
Merge branch 'more-texture-tests' into 'main'

testsuite: Add more download tests

See merge request GNOME/gtk!6038

2 years agoGdkWin32: Remove unused functions
Luca Bacci [Tue, 30 May 2023 17:57:17 +0000 (19:57 +0200)]
GdkWin32: Remove unused functions

2 years agoGdkWin32: Remove declarations of unused types from gdkprivate-win32.h
Luca Bacci [Tue, 30 May 2023 17:57:04 +0000 (19:57 +0200)]
GdkWin32: Remove declarations of unused types from gdkprivate-win32.h

2 years agoGdkWin32: Remove declarations of unexisting functions from gdkprivate-win32.h
Luca Bacci [Tue, 30 May 2023 17:56:45 +0000 (19:56 +0200)]
GdkWin32: Remove declarations of unexisting functions from gdkprivate-win32.h

2 years agoGdkWin32: Remove defines for old MinGW headers
Luca Bacci [Tue, 30 May 2023 17:55:21 +0000 (19:55 +0200)]
GdkWin32: Remove defines for old MinGW headers

2 years agoGdkWin32: Remove _gdk_display_hdc global variable
Luca Bacci [Tue, 30 May 2023 17:52:13 +0000 (19:52 +0200)]
GdkWin32: Remove _gdk_display_hdc global variable

2 years agoGdkWin32: Turn a few functions to static
Luca Bacci [Tue, 30 May 2023 17:51:57 +0000 (19:51 +0200)]
GdkWin32: Turn a few functions to static

When used only in the source file they're defined in.
Also remove the corresponding declarations from
gdkrivate-win32.h.

2 years agoGdkWin32: Remove unused debug functions
Luca Bacci [Tue, 30 May 2023 17:51:38 +0000 (19:51 +0200)]
GdkWin32: Remove unused debug functions

 * _gdk_win32_print_paletteentries
 * _gdk_win32_print_system_palette
 * _gdk_win32_print_hpalette
 * _gdk_win32_drag_protocol_to_string
 * _gdk_win32_data_to_string
 * _gdk_win32_gdkrectangle_to_string
 * _gdk_win32_cairo_region_to_string
 * _gdk_win32_surface_description

2 years agoUpdate manifest XML for the GTK DLL
Luca Bacci [Tue, 30 May 2023 17:33:19 +0000 (19:33 +0200)]
Update manifest XML for the GTK DLL

2 years agotestsuite: Add more download tests
Matthias Clasen [Wed, 31 May 2023 02:37:18 +0000 (22:37 -0400)]
testsuite: Add more download tests

Add some odd-sized texture sizes to the
download tests, to trigger alignment issues
in the various upload code paths. And add
a size that is bigger than the max-texture-size
we force in one of our test setups.

To compensate, reduce the number of
runs per size from 20 to 10.

2 years agotestsuite: Plug a memory leak
Matthias Clasen [Wed, 31 May 2023 02:37:03 +0000 (22:37 -0400)]
testsuite: Plug a memory leak

2 years agotestsuite: Use proper alignment when uploading to GL
Matthias Clasen [Wed, 31 May 2023 02:36:41 +0000 (22:36 -0400)]
testsuite: Use proper alignment when uploading to GL

2 years agoImprove test coverage for GdkGLTexture
Matthias Clasen [Wed, 31 May 2023 02:36:10 +0000 (22:36 -0400)]
Improve test coverage for GdkGLTexture

2 years agogltexture: Use proper alignment for downloads
Matthias Clasen [Wed, 31 May 2023 02:35:45 +0000 (22:35 -0400)]
gltexture: Use proper alignment for downloads

2 years agoNEWS: Updates
Matthias Clasen [Wed, 31 May 2023 00:21:13 +0000 (20:21 -0400)]
NEWS: Updates

2 years agoMerge branch 'matthiasc/conversion-tests' into 'main'
Matthias Clasen [Wed, 31 May 2023 00:13:51 +0000 (00:13 +0000)]
Merge branch 'matthiasc/conversion-tests' into 'main'

Texture format work

See merge request GNOME/gtk!6035

2 years agogltexturebuilder: Document format expectations
Matthias Clasen [Tue, 30 May 2023 03:45:06 +0000 (23:45 -0400)]
gltexturebuilder: Document format expectations

Provide some details about storage and alpha handling.

2 years agotestsuite: Exclude some formats on GLES
Matthias Clasen [Tue, 30 May 2023 19:56:30 +0000 (15:56 -0400)]
testsuite: Exclude some formats on GLES

GLES < 3.2 has some problems with 16-bit formats,
so exclude these from our download tests.

2 years agotestsuite: Add tests for native GL textures
Matthias Clasen [Tue, 30 May 2023 00:41:08 +0000 (20:41 -0400)]
testsuite: Add tests for native GL textures

Create GL textures in gray and GA formats
and check that we can download from them
successfully.

2 years agogltexture: Rewrite downloading code
Matthias Clasen [Mon, 29 May 2023 16:51:22 +0000 (12:51 -0400)]
gltexture: Rewrite downloading code

For non-gles, make it handle unpremultiplied formats,
and everything else, by downloading the texture in its
preferred format and, in most cases, doing a
gdk_memory_convert afterwards.

For gles, keep using glReadPixels, but handle cases
where the gl read format doesn't match the texture
format by doing the necessary swizzling before calling
gdk_memory_convert.

2 years agoMerge branch 'fix-selection-input-stream-leak' into 'main'
Matthias Clasen [Tue, 30 May 2023 19:10:49 +0000 (19:10 +0000)]
Merge branch 'fix-selection-input-stream-leak' into 'main'

gtkselectioninputstream-x11: Do not leak the stream and double-free the EOF bytes marker

Closes #4892

See merge request GNOME/gtk!6037

2 years agogdk: Simplify gdk_memory_format_gl_format
Matthias Clasen [Tue, 30 May 2023 04:08:55 +0000 (00:08 -0400)]
gdk: Simplify gdk_memory_format_gl_format

Make the callers of this function check for
straight alpha themselves, and only do the
version compatibility check here. This makes
the function usable in contexts where straight
alpha is acceptable.

2 years agogsk: Use matching memory format
Matthias Clasen [Mon, 29 May 2023 17:41:30 +0000 (13:41 -0400)]
gsk: Use matching memory format

memory_format_gl_format returns the new memory
format if it made a change, we should not drop
that on the floor.

2 years agogdk: Add gray/alpha memory formats to testsuite
Sophie Herold [Fri, 26 May 2023 16:18:46 +0000 (18:18 +0200)]
gdk: Add gray/alpha memory formats to testsuite

2 years agogdk: Support gray/alpha in PNG loader
Sophie Herold [Fri, 26 May 2023 13:35:57 +0000 (15:35 +0200)]
gdk: Support gray/alpha in PNG loader

2 years agogdk: Support gray/alpha in TIFF loader
Sophie Herold [Fri, 26 May 2023 12:57:32 +0000 (14:57 +0200)]
gdk: Support gray/alpha in TIFF loader

Use PHOTOMETRIC_MINISBLACK for grayscale image

2 years agogsk: Support swizzle for gray and alpha formats
Sophie Herold [Fri, 26 May 2023 12:45:05 +0000 (14:45 +0200)]
gsk: Support swizzle for gray and alpha formats

Swizzling is needed to display one channel memory formats
as gray etc.

2 years agogdk: Add grayscale and alpha memory formats
Sophie Herold [Fri, 26 May 2023 12:38:25 +0000 (14:38 +0200)]
gdk: Add grayscale and alpha memory formats

2 years agoDo not keep HINSTANCE variables around
Luca Bacci [Thu, 23 Mar 2023 15:27:17 +0000 (16:27 +0100)]
Do not keep HINSTANCE variables around

Use &__ImageBase for the GTK DLL and GetModuleHandle (NULL)
for the application module. Then remove DllMain as it's not
necessary anymore.

References:

 [1] Accessing the current module's HINSTANCE from a static library:
     https://devblogs.microsoft.com/oldnewthing/20041025-00/?p=37483

2 years agogdkselectioninputstream-x11: Explicitly handle stream ownership in signal
Marco Trevisan (Treviño) [Tue, 30 May 2023 15:59:06 +0000 (17:59 +0200)]
gdkselectioninputstream-x11: Explicitly handle stream ownership in signal

The display xevent signal connection takes the ownership of the stream
until we get a valid event, so it should manage the stream lifetime.

So make this clearer, by automatically removing the stream reference
when we disconnect from the xevent signal handler.

2 years agogdkselectioninputstream-x11: Make it clearer how we manage the stream ownership
Marco Trevisan (Treviño) [Tue, 30 May 2023 15:54:00 +0000 (17:54 +0200)]
gdkselectioninputstream-x11: Make it clearer how we manage the stream ownership

It gets unreffed during gdk_x11_selection_input_stream_complete, so use
APIs that make this clearer.

2 years agogtkselectioninputstream-x11: Do not add an extra reference to the returned stream
Marco Trevisan (Treviño) [Tue, 30 May 2023 15:50:56 +0000 (17:50 +0200)]
gtkselectioninputstream-x11: Do not add an extra reference to the returned stream

We create a new stream during gdk_x11_selection_input_stream_new_async()
then such stream is referenced when passed to the task via
g_task_return_pointer(), so there's no need to reference it again before
returning it, or we'd end up leaking.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4892
2 years agogtkselectioninputstream-x11: Do not add unreffed bytes to the chunks queue
Marco Trevisan (Treviño) [Tue, 30 May 2023 15:43:57 +0000 (17:43 +0200)]
gtkselectioninputstream-x11: Do not add unreffed bytes to the chunks queue

This should never happen, but we may exit the loop because of count value
with an unreffed bytes pointer being added back to the chunks queue.

2 years agogtkselectioninputstream-x11: Do not add EOF marker twice to the chunks queue
Marco Trevisan (Treviño) [Tue, 30 May 2023 15:42:59 +0000 (17:42 +0200)]
gtkselectioninputstream-x11: Do not add EOF marker twice to the chunks queue

We were adding the same EOF marker two times back to the chunks queue,
one implicitly, and the other time could happen when exiting the loop.

2 years agoUpdate Catalan translation
Jordi Mas [Tue, 30 May 2023 04:41:10 +0000 (06:41 +0200)]
Update Catalan translation

2 years agoMerge branch 'fix_gtkstack_crash' into 'main'
Matthias Clasen [Mon, 29 May 2023 23:38:05 +0000 (23:38 +0000)]
Merge branch 'fix_gtkstack_crash' into 'main'

GtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child

See merge request GNOME/gtk!6031

2 years agoMerge branch 'macos-fixes' into 'main'
Matthias Clasen [Mon, 29 May 2023 23:37:22 +0000 (23:37 +0000)]
Merge branch 'macos-fixes' into 'main'

For main

See merge request GNOME/gtk!6032

2 years agotestsuite: Add conversion tests
Benjamin Otte [Sun, 28 May 2023 22:37:37 +0000 (00:37 +0200)]
testsuite: Add conversion tests

Ensure we can convert from any format to any other format.

2 years agotestsuite: Disable certain texture download tests
Benjamin Otte [Mon, 29 May 2023 00:34:19 +0000 (02:34 +0200)]
testsuite: Disable certain texture download tests

The GL renderers like to premultiply content that isn't, and due to the
data loss with alpha == 0 (transparent white, transparent black and
transparent anything are all represented by (0, 0, 0, 0) when
premultiplied) these values cannot be converted back.

2 years agotestsuite: Update memorytexture test for TextureDownloader
Benjamin Otte [Sun, 28 May 2023 23:15:33 +0000 (01:15 +0200)]
testsuite: Update memorytexture test for TextureDownloader

There is no longer a need to use gdk_texture_download() and force
conversion to ARGB8 format. We can download the pixels in the original
format again.

That way we avoid testing the conversion code and avoid having to deal
with differences in representable colors.

However, some formats do do conversions, so we allow pixel comparisons
to be accurate (requires 16bit comparison accuracy) or inaccurate (we
only care about 8bit).
Note that for the default RGBA formats, this is identical and means they
need to be bit-exact the same, no matter what.
But the higher bit depth formats may be more different - floating point
can even have different values with high accuracy (the float mantissa is
23 bit, we only care about 16).

2 years agotestsuite: Imitate gdk_memory_convert() correctly
Benjamin Otte [Mon, 29 May 2023 21:32:25 +0000 (23:32 +0200)]
testsuite: Imitate gdk_memory_convert() correctly

The formula use to compute pixel values from GdkRGBA floats was slightly
adapted some time ago, copy that adaptation

2 years agotestsuite: rename 'wait' function to 'timed_loop'
Luca Bacci [Fri, 26 May 2023 15:46:08 +0000 (17:46 +0200)]
testsuite: rename 'wait' function to 'timed_loop'

When compiling for macOS, CLang errors out because a non-static
wait function is declared in sys/wait.h.

2 years agoCheck for NULL groups in gtk_action_muxer_get_group ()
Luca Bacci [Wed, 17 May 2023 12:00:56 +0000 (14:00 +0200)]
Check for NULL groups in gtk_action_muxer_get_group ()

The groups hash table is initialized lazily when inserting
the first GActionGroup (gtk_action_muxer_insert ()). Do as
all surrounding code does and check for NULL before using
groups.

This avoids triggering a warning

2 years agoGtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child
Lukáš Tyrychtr [Mon, 29 May 2023 13:14:51 +0000 (15:14 +0200)]
GtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child

This one can occur when the stack has no pages.

2 years agoMerge branch 'win32-monitors' into 'main'
Luca Bacci [Mon, 29 May 2023 09:50:30 +0000 (09:50 +0000)]
Merge branch 'win32-monitors' into 'main'

GdkWin32Monitor fixes

See merge request GNOME/gtk!6015

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 28 May 2023 17:58:38 +0000 (17:58 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

css: Add a test for non-ASCII font family

See merge request GNOME/gtk!6028

2 years agocss: Add a test for non-ASCII font family
Matthias Clasen [Sun, 28 May 2023 11:57:40 +0000 (07:57 -0400)]
css: Add a test for non-ASCII font family

This came up in #5852, so make sure that it works.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 28 May 2023 11:41:48 +0000 (11:41 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Annotate more enum additions

See merge request GNOME/gtk!6027

2 years agolistitemmanager: Small docs clarifications
Matthias Clasen [Sun, 28 May 2023 11:04:49 +0000 (07:04 -0400)]
listitemmanager: Small docs clarifications

If we write docs for private functions,
lets make them relevant.

2 years agoAnnotate more enum additions
Matthias Clasen [Sun, 28 May 2023 11:18:42 +0000 (07:18 -0400)]
Annotate more enum additions

We have the technology now, lets use it.

2 years agoMenuButton: Always mention child@always-show-arrow
Daniel Boles [Sun, 28 May 2023 10:35:44 +0000 (11:35 +0100)]
MenuButton: Always mention child@always-show-arrow

get_always_show_arrow() did not mention at all that the custom child is
relevant. set_always_show_arrow() only did in the blurb, not for the arg

2 years agoMerge branch 'test-sections' into 'main'
Matthias Clasen [Sun, 28 May 2023 01:54:06 +0000 (01:54 +0000)]
Merge branch 'test-sections' into 'main'

testsections: A testbed for sections

See merge request GNOME/gtk!6025

2 years agotestsections: A testbed for sections
Matthias Clasen [Wed, 17 May 2023 20:27:06 +0000 (16:27 -0400)]
testsections: A testbed for sections

Add a simple test client that lets us compare
and explore the section handling in listview
and gridview.

2 years agoMerge branch 'slice-sections' into 'main'
Matthias Clasen [Sun, 28 May 2023 01:00:04 +0000 (01:00 +0000)]
Merge branch 'slice-sections' into 'main'

Beef up our section models

Closes #5854

See merge request GNOME/gtk!6009

2 years agosortlistmodel: Optimize signals
Matthias Clasen [Sat, 27 May 2023 23:40:20 +0000 (19:40 -0400)]
sortlistmodel: Optimize signals

When we emit items-changed due to a section
sorter change, don't also emit sections-changed.
Instead make the items-changed signal cover the
whole range.

Tests included.

2 years agoMerge branch 'fix-section-sorter-keys' into 'main'
Matthias Clasen [Sat, 27 May 2023 23:37:35 +0000 (23:37 +0000)]
Merge branch 'fix-section-sorter-keys' into 'main'

sortlistmodel: Fix handling of section sort keys

Closes #5854

See merge request GNOME/gtk!6024

2 years agosortlistmodel: Fix handling of section sort keys
Matthias Clasen [Sat, 27 May 2023 21:26:39 +0000 (17:26 -0400)]
sortlistmodel: Fix handling of section sort keys

When the section sorter changes, we need to update
the keys, otherwise the sorter will continue to report
the old sections.

This code is currently a bit suboptimal, since the
creation of sort keys and section sort keys are
muddled together.

Fixes: #5854
2 years agomultiselection: Pass through sections-changed
Matthias Clasen [Tue, 23 May 2023 15:24:02 +0000 (11:24 -0400)]
multiselection: Pass through sections-changed

If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.

2 years agosingleselection: Pass through sections-changed
Matthias Clasen [Tue, 23 May 2023 15:17:54 +0000 (11:17 -0400)]
singleselection: Pass through sections-changed

If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.

2 years agonoselection: Pass through sections-changed
Matthias Clasen [Tue, 23 May 2023 15:10:49 +0000 (11:10 -0400)]
noselection: Pass through sections-changed

If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.

2 years agofilterlistmodel: Pass through sections-changed
Matthias Clasen [Tue, 23 May 2023 13:13:00 +0000 (09:13 -0400)]
filterlistmodel: Pass through sections-changed

If our underlying model emits sections-changed,
we need to pass it on.

Add a test for this too.

2 years agoslicelistmodel: Pass through sections
Matthias Clasen [Tue, 23 May 2023 10:24:34 +0000 (06:24 -0400)]
slicelistmodel: Pass through sections

Implement GtkSectionModel in the obvious way.

Tests included.

2 years agosortlistmodel: Emit sections-changed
Matthias Clasen [Tue, 23 May 2023 10:30:40 +0000 (06:30 -0400)]
sortlistmodel: Emit sections-changed

When a new section sorter is set, potentially
all sections have changed. So emit sections-changed
for all items.

Tests included.

2 years agosortlistmodel: Fix handling of section sort keys
Matthias Clasen [Sat, 27 May 2023 21:26:39 +0000 (17:26 -0400)]
sortlistmodel: Fix handling of section sort keys

    When the section sorter changes, we need to update
    the keys, otherwise the sorter will continue to report
    the old sections.

    This code is currently a bit suboptimal, since the
    creation of sort keys and section sort keys are
    muddled together.

Fixes: #5854
2 years agoMerge branch 'columnview-sections' into 'main'
Benjamin Otte [Sat, 27 May 2023 18:51:12 +0000 (18:51 +0000)]
Merge branch 'columnview-sections' into 'main'

Columnview sections

See merge request GNOME/gtk!6006

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 27 May 2023 18:42:34 +0000 (18:42 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

docs: Cosmetics

See merge request GNOME/gtk!6023