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`
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
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.
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.
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
Erik Schilling [Wed, 31 May 2023 12:27:48 +0000 (12:27 +0000)]
label: Fix crashes when executing a11y actions
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
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.
Matthias Clasen [Wed, 31 May 2023 02:37:03 +0000 (22:37 -0400)]
testsuite: Plug a memory leak
Matthias Clasen [Wed, 31 May 2023 02:36:41 +0000 (22:36 -0400)]
testsuite: Use proper alignment when uploading to GL
Matthias Clasen [Wed, 31 May 2023 02:36:10 +0000 (22:36 -0400)]
Improve test coverage for GdkGLTexture
Matthias Clasen [Wed, 31 May 2023 02:35:45 +0000 (22:35 -0400)]
gltexture: Use proper alignment for downloads
Matthias Clasen [Wed, 31 May 2023 00:21:13 +0000 (20:21 -0400)]
NEWS: Updates
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
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.
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.
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.
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.
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
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.
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.
Sophie Herold [Fri, 26 May 2023 16:18:46 +0000 (18:18 +0200)]
gdk: Add gray/alpha memory formats to testsuite
Sophie Herold [Fri, 26 May 2023 13:35:57 +0000 (15:35 +0200)]
gdk: Support gray/alpha in PNG 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
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.
Sophie Herold [Fri, 26 May 2023 12:38:25 +0000 (14:38 +0200)]
gdk: Add grayscale and alpha memory formats
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.
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.
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
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.
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.
Jordi Mas [Tue, 30 May 2023 04:41:10 +0000 (06:41 +0200)]
Update Catalan translation
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
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
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.
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.
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).
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
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.
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
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.
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
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
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.
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
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.
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.
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
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
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.
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
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.
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
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
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.
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.
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.
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.
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.
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.
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
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
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
Matthias Clasen [Tue, 23 May 2023 11:05:29 +0000 (07:05 -0400)]
docs: Cosmetics
Matthias Clasen [Sat, 27 May 2023 18:30:37 +0000 (18:30 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
sortlistmodel: Cosmetics
See merge request GNOME/gtk!6022
Matthias Clasen [Sat, 27 May 2023 17:55:00 +0000 (17:55 +0000)]
Merge branch 'handle-sections-changed' into 'main'
wip: list widgets: handle sections-changed
See merge request GNOME/gtk!6011
Matthias Clasen [Sat, 27 May 2023 12:28:41 +0000 (08:28 -0400)]
Cosmetics
Fix copy-paste errors in line 1.
Matthias Clasen [Sat, 27 May 2023 11:23:05 +0000 (07:23 -0400)]
sortlistmodel: Cosmetics
Make the set_[section]_sorter functions a bit more symmetric.
Matthias Clasen [Mon, 22 May 2023 11:43:41 +0000 (07:43 -0400)]
columnview: Add section plumbing
Add a header-factory property, and pass it through
to the listview.
Matthias Clasen [Sat, 27 May 2023 13:35:27 +0000 (13:35 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
gtk: Annotate new enum values
See merge request GNOME/gtk!6021
Matthias Clasen [Sat, 27 May 2023 13:19:28 +0000 (13:19 +0000)]
Merge branch 'wip/kabus/popover-direction' into 'main'
gtk/popover: Flip anchoring direction in RTL
Closes #5847
See merge request GNOME/gtk!6020
Khalid Abu Shawarib [Sat, 27 May 2023 13:19:28 +0000 (13:19 +0000)]
gtk/popover: Flip anchoring direction in RTL
Matthias Clasen [Sat, 27 May 2023 12:00:47 +0000 (08:00 -0400)]
gtk: Annotate new enum values
We have decorators now to tell compilers when
enum values were added, so lets use them for the
new GtkAlign values.
Matthias Clasen [Tue, 23 May 2023 17:49:04 +0000 (13:49 -0400)]
listitemmanager: Listen to sections-changed
And recreate header and footer tiles as needed.
This commit was tested using a sortlistmodel, changing
the section sorter from sorting only by first char
to sorting by the first two chars, which changes
the number of sections, but leaves the alphabetic
order of items unchanged.
Sabri Ünal [Fri, 26 May 2023 22:48:53 +0000 (22:48 +0000)]
Update Turkish translation
Matthias Clasen [Thu, 25 May 2023 17:40:08 +0000 (17:40 +0000)]
Merge branch 'docs/gdk-RGBA-parse' into 'main'
docs: add HSL to Gdk.RGBA.parse
See merge request GNOME/gtk!6017
FineFindus [Thu, 25 May 2023 15:16:55 +0000 (17:16 +0200)]
docs: add HSL to Gdk.RGBA.parse
Update the Gdk.RGBA.parse docs to reflect the ability to parse HSL, which has been added in 4.5.0.
Matthias Clasen [Thu, 25 May 2023 02:03:48 +0000 (22:03 -0400)]
NEWS: Updates
Jason Francis [Wed, 24 May 2023 22:48:37 +0000 (18:48 -0400)]
win32: implement fullscreen_on_monitor
Track the HMONITOR so it can be used by the toplevel layout.
Benjamin Otte [Wed, 24 May 2023 22:22:48 +0000 (22:22 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
2 GDK GL XWayland improvements
See merge request GNOME/gtk!6014
Jason Francis [Wed, 24 May 2023 21:34:34 +0000 (17:34 -0400)]
win32: Invalidate inactive monitors
Without this, there are still GdkMonitors present for displays that are
present but disconnected (such as when a laptop disables the internal
display to connect to an external monitor).
Benjamin Otte [Thu, 18 May 2023 00:02:03 +0000 (02:02 +0200)]
glx: Implement support for EXT_swap_control
XWayland (at least on gnome-shell) does not support SGI_swap_control,
which we were using to unset the swap interval.
It does support EXT_swap_control though, which is the more modern
version of the same thing, so this commit adds support for that.
And now GDK_DEBUG=no-vsync gives me >1000fps instead of just 60fps,
Benjamin Otte [Wed, 24 May 2023 19:41:47 +0000 (21:41 +0200)]
gl: Update tracked buffers from 2 to 4
With XWayland and direct scanout it is possible that some apps get into
a situation where more than 2 buffers are in flight and in that case we
want to be able to still track the change regions for those buffers.
Usually 3 buffers are in use, so we go one higher, just to be safe.
Benjamin Otte [Wed, 24 May 2023 19:40:20 +0000 (21:40 +0200)]
gl: Rewrite update area tracking code
Make it more generic. That way we could dynamically change the number of
buffers we track.
We don't do that yet though.
Carlos Garnacho [Wed, 24 May 2023 14:23:47 +0000 (14:23 +0000)]
Merge branch 'lores-scroll-mid-detent' into 'main'
Send low-res scroll event in the middle of the wheel detent
See merge request GNOME/gtk!5128
José Expósito [Mon, 17 Oct 2022 17:10:37 +0000 (19:10 +0200)]
gtkeventcontrollerscroll: Send lores scroll in the middle of the detent
Some mice send a value slightly lower than 120 for some detents. The
current approach waits until a value of 120 is reached before sending a
low-resolution scroll event.
For example, the MX Master 3 sends a value of 112 in some detents:
detent detent
| | |
^ ^ ^
112 REL_WHEEL 224
As illustrated, only one event was sent but two were expected. However,
sending the low-resolution scroll event in the middle plus the existing
heuristics to reset the accumulator solve this issue:
detent detent
| | |
^ ^ ^ ^
REL_WHEEL 112 REL_WHEEL 224
Send low-resolution scroll events in the middle of the detent to solve
this problem.
Related to https://gitlab.gnome.org/GNOME/mutter/-/issues/2469
Matthias Clasen [Tue, 23 May 2023 23:49:25 +0000 (23:49 +0000)]
Merge branch 'reomveunused' into 'main'
widget: Don't include gtkpopover.h
See merge request GNOME/gtk!6012
Maximiliano Sandoval R [Tue, 23 May 2023 21:43:15 +0000 (23:43 +0200)]
widget: Don't include gtkpopover.h
It is not used.
Emmanuele Bassi [Tue, 23 May 2023 13:50:26 +0000 (13:50 +0000)]
Merge branch 'zbrown/marshallers' into 'main'
marshallers: fix up some mistypes in drags
See merge request GNOME/gtk!6010
Matthias Clasen [Mon, 22 May 2023 20:50:56 +0000 (20:50 +0000)]
Merge branch 'fix-menu-padding' into 'main'
menus: Avoid unnecessary right padding
Closes #5839
See merge request GNOME/gtk!6008
Daniel Boles [Mon, 22 May 2023 20:39:36 +0000 (21:39 +0100)]
MenuButton: Fix small grammar-o/match related syms
Matthias Clasen [Mon, 22 May 2023 20:14:17 +0000 (16:14 -0400)]
menus: Avoid unnecessary right padding
We are using placeholders in the 'check' column
that are put in a size group, so that they all
take the same space once a check or radio is shown.
Unfortunately, for the inline-buttons option, we
were using a GtkBuiltinIcon as placeholder, and those
respect the -gtk-icon-size CSS property and take
a minimum size of 16px. Use a GtkGizmo instead to
get the expected result of no extra padding unless
there's a check or radio.
Fixes: #5839
Matthias Clasen [Mon, 22 May 2023 13:17:58 +0000 (13:17 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
widget-factory: Align some widgets better
See merge request GNOME/gtk!6007
Matthias Clasen [Mon, 22 May 2023 12:34:54 +0000 (08:34 -0400)]
widget-factory: Align some widgets better
Matthias Clasen [Mon, 22 May 2023 12:25:24 +0000 (12:25 +0000)]
Merge branch 'wip/kabus/date-leak' into 'main'
gtk/recentmanager: Fix date leak
Closes #5842
See merge request GNOME/gtk!6005
Khalid Abu Shawarib [Mon, 22 May 2023 12:25:24 +0000 (12:25 +0000)]
gtk/recentmanager: Fix date leak
Арсений Засыпкин [Mon, 22 May 2023 12:18:13 +0000 (12:18 +0000)]
Update Russian translation
Matthias Clasen [Sun, 21 May 2023 23:57:48 +0000 (23:57 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Improve section model docs
See merge request GNOME/gtk!6003
Matthias Clasen [Sun, 21 May 2023 23:22:57 +0000 (23:22 +0000)]
Merge branch 'fm-showitems' into 'main'
filelauncher: Use ShowItems to show in File Manager
Closes #5842
See merge request GNOME/gtk!5997
Matthias Clasen [Sun, 21 May 2023 23:11:15 +0000 (19:11 -0400)]
Improve section model docs
Mention sections in the list widget overview,
and document the list models that support sections.