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.
Zander Brown [Sun, 21 May 2023 18:02:16 +0000 (19:02 +0100)]
marshallers: fix up some mistypes in drags
Fix:
ff330668cfee65c9b969911adb16f7d5a2bb6749
Matthias Clasen [Sun, 21 May 2023 14:25:59 +0000 (14:25 +0000)]
Merge branch 'gdk-introspection-fix' into 'main'
introspection: Include deprecated gdk api in gir
See merge request GNOME/gtk!5999
Matthias Clasen [Sun, 21 May 2023 13:46:49 +0000 (09:46 -0400)]
gdk: Fix up introspection build
Referring to files across directories is not
easy, we need to use files() in just the right
way to make this work.
Matthias Clasen [Sun, 21 May 2023 10:58:35 +0000 (06:58 -0400)]
introspection: Include deprecated gdk api in gir
This was overlooked in when the headers were moved
in
ed265f6a7e7e6f24f48.
Matthias Clasen [Sun, 21 May 2023 12:20:12 +0000 (12:20 +0000)]
Merge branch 'ebassi/build-introspection' into 'main'
ci: Add introspection to the feature flags
See merge request GNOME/gtk!6000
Emmanuele Bassi [Sun, 21 May 2023 11:22:50 +0000 (12:22 +0100)]
ci: Add introspection to the feature flags
It should be enabled by default, if we ever want to catch issues.
Matthias Clasen [Sun, 21 May 2023 11:02:45 +0000 (11:02 +0000)]
Merge branch 'docs-css-fix' into 'main'
Fix typo in CSS docs
See merge request GNOME/gtk!5998
Arjan Molenaar [Sat, 20 May 2023 12:11:58 +0000 (14:11 +0200)]
Fix typo in CSS docs
Matthias Clasen [Sun, 21 May 2023 00:51:00 +0000 (00:51 +0000)]
Merge branch 'list-tile-gc' into 'main'
Add gtk_list_item_manager_gc_tiles
See merge request GNOME/gtk!5995
Matthias Clasen [Sat, 20 May 2023 20:45:19 +0000 (16:45 -0400)]
gridview: Use gtk_list_item_manager_gc_tiles
This simplifies the code a bit.
Matthias Clasen [Sat, 20 May 2023 20:12:25 +0000 (16:12 -0400)]
listview: Use gtk_list_item_manager_gc_tiles
This simplifies the code a bit.
Matthias Clasen [Sat, 20 May 2023 20:12:54 +0000 (16:12 -0400)]
testsuite: Use gtk_list_item_manager_gc_tiles
Use this new api instead of open-coding it.
Also, assert that it merges consecutive
multi-item tiles.
Calvin Walton [Sat, 20 May 2023 23:25:43 +0000 (19:25 -0400)]
filelauncher: Use ShowItems to show in File Manager
The non-portal fallback method for launching a file manager to show the
file in its parent directory was incorrectly using the `ShowFolders`
method (open a folder) instead of `ShowItems` (open the parent directory
and show the file).
The `show_item` function (previously `show_folder`) had an unused
`callback` parameter; it has been removed and the type of the parameter
containing the GTask has been renamed and now uses the correct type
instead of gpointer to reduce the amount of casting required.
Fixes GNOME/gtk#5842
Matthias Clasen [Sat, 20 May 2023 23:22:56 +0000 (23:22 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Cosmetics
See merge request GNOME/gtk!5996
Matthias Clasen [Sat, 20 May 2023 22:50:30 +0000 (18:50 -0400)]
Cosmetics
Fix some typos.
Matthias Clasen [Sat, 20 May 2023 22:55:05 +0000 (18:55 -0400)]
listitemmanager: Stop exporting tile_gc
This function is now just used internally,
so make it static.
Matthias Clasen [Sat, 20 May 2023 22:52:44 +0000 (18:52 -0400)]
listitemmanager: Use gc_tiles
Replace an open-coded version of this function
with a call to gtk_list_item_manager_gc_tiles.
Matthias Clasen [Sat, 20 May 2023 20:10:54 +0000 (16:10 -0400)]
Add gtk_list_item_manager_gc_tiles
This will allow us to simplify size allocation
code in listview and gridview.
Benjamin Otte [Sat, 20 May 2023 17:18:53 +0000 (17:18 +0000)]
Merge branch 'drop-filler-tiles' into 'main'
Drop the FILLER tile type
See merge request GNOME/gtk!5993
Matthias Clasen [Sat, 20 May 2023 15:35:31 +0000 (11:35 -0400)]
gridview: Update factories in set_factory
Call update_factories() so the children get their
factories properly updated.
This matches what GtkListView does.
Matthias Clasen [Wed, 17 May 2023 23:13:12 +0000 (19:13 -0400)]
Drop the FILLER tile type
It is not used anymore.
Matthias Clasen [Wed, 17 May 2023 23:09:43 +0000 (19:09 -0400)]
gridview: Stop using a filler tile
We can just use the footer to fill that space.
Matthias Clasen [Wed, 17 May 2023 23:01:08 +0000 (19:01 -0400)]
gridview: Add an assertion
The want to use the footer tile at the end
to fill leftover space at the bottome right.
So lets assert that we actually dealing with
a footer tile, just in case something changes
in the future that might have us end up with
some other kind of tile.
Matthias Clasen [Thu, 18 May 2023 00:10:08 +0000 (20:10 -0400)]
Add some tile helpers
Matthias Clasen [Wed, 17 May 2023 23:26:12 +0000 (19:26 -0400)]
Revert "gridview: GC tiles first"
This reverts commit
e121a5ca6f761fc4433187bf1ad13a093ede205d.
The tile that was causing the critical in #5836
(what that commit was about) was a FILLER, and we
are getting rid of FILLER tiles here. Which will
avoid the issue in a more elegant way.
Matthias Clasen [Sat, 20 May 2023 11:39:21 +0000 (07:39 -0400)]
Cosmetics
Use the proper g_assert variant.
Matthias Clasen [Thu, 18 May 2023 19:10:52 +0000 (19:10 +0000)]
Merge branch 'ci-clang-build' into 'main'
ci: Add a clang build
See merge request GNOME/gtk!5987
Matthias Clasen [Wed, 17 May 2023 15:36:57 +0000 (11:36 -0400)]
ci: Add a clang build
This is meant to catch build errors with clang.
Matthias Clasen [Thu, 18 May 2023 18:39:22 +0000 (14:39 -0400)]
cups: Silence a compiler warning
Bitfields should be unsigned int.
Matthias Clasen [Wed, 17 May 2023 15:51:29 +0000 (11:51 -0400)]
gsk: Mark some variables as unused
Hopefully that shuts up clang.
Asier Sarasua Garmendia [Thu, 18 May 2023 16:30:55 +0000 (16:30 +0000)]
Update Basque translation
(cherry picked from commit
a6931a66c5ff08ce28863d3f61253f2389f6eed7)
Matthias Clasen [Thu, 18 May 2023 13:35:17 +0000 (13:35 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
roaring: Mark a variable as unused
See merge request GNOME/gtk!5990
Matthias Clasen [Thu, 18 May 2023 12:40:50 +0000 (08:40 -0400)]
testsuite: Make this test compile
clang did not like this creative use of
strings at all. Rightfully so.
Matthias Clasen [Thu, 18 May 2023 12:34:48 +0000 (08:34 -0400)]
roaring: Mark a variable as unused
Otherwise clang complains.
Matthias Clasen [Thu, 18 May 2023 12:26:05 +0000 (12:26 +0000)]
Merge branch 'fina/scrolled-window-measure' into 'main'
scrolledwindow: Propagate child measure size whenever possible
Closes #5838
See merge request GNOME/gtk!5986
Fina Wilke [Wed, 17 May 2023 22:55:50 +0000 (00:55 +0200)]
scrolledwindow: Propagate child measure size whenever possible
In height-for-width and hscrollbar-policy = never, we can provide
the child with a proper for_size when measuring it. The same is true for
width-for-height and vscrollbar-policy = never.
This allows for accurately measuring the size of eg. wrapping labels.
Benjamin Otte [Wed, 17 May 2023 18:57:28 +0000 (18:57 +0000)]
Merge branch 'listview-factory-leak' into 'main'
listview: Don't leak the factories
See merge request GNOME/gtk!5989
Matthias Clasen [Wed, 17 May 2023 18:32:55 +0000 (14:32 -0400)]
gridview: Don't leak the factory
Matthias Clasen [Wed, 17 May 2023 18:16:38 +0000 (14:16 -0400)]
listview: Don't leak the factories
Benjamin Otte [Wed, 17 May 2023 17:04:43 +0000 (17:04 +0000)]
Merge branch 'fix-gridview-critical' into 'main'
gridview: GC tiles first
Closes #5836
See merge request GNOME/gtk!5988
Matthias Clasen [Wed, 17 May 2023 16:30:16 +0000 (12:30 -0400)]
gridview: GC tiles first
Before checking that there are no tiles,
we need to gc any possibly leftover filler
tiles.
Fixes: #5836
Matthias Clasen [Wed, 17 May 2023 10:15:26 +0000 (10:15 +0000)]
Merge branch 'pathbar-early-return-on-cancellation' into 'main'
pathbar: Fail setting the path on cancellation
Closes #5792
See merge request GNOME/gtk!5982
Matthias Clasen [Wed, 17 May 2023 10:14:44 +0000 (10:14 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Reduce pixbuf helpers
See merge request GNOME/gtk!5984
Matthias Clasen [Wed, 17 May 2023 02:00:08 +0000 (22:00 -0400)]
Rename pixbuf utils to texture utils
That is what this is now.
Matthias Clasen [Wed, 17 May 2023 01:53:55 +0000 (21:53 -0400)]
Reduce pixbuf helpers
Concentrate pixbuf handling in gdkpixbufutils.c.
Matthias Clasen [Wed, 17 May 2023 00:58:48 +0000 (00:58 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
gsk: Cosmetics
See merge request GNOME/gtk!5983
Matthias Clasen [Wed, 17 May 2023 00:29:40 +0000 (00:29 +0000)]
Merge branch 'gl-renderer-more-defensive' into 'main'
gsk: Stop setting uniforms when we are out of batches
See merge request GNOME/gtk!5981
Benjamin Otte [Wed, 17 May 2023 00:19:06 +0000 (00:19 +0000)]
Merge branch 'wip/otte/ci-emergency' into 'main'
CI: Actually build our code
See merge request GNOME/gtk!5980
Matthias Clasen [Tue, 16 May 2023 18:53:43 +0000 (14:53 -0400)]
gsk: Don't build unused functions
The only caller is #if 0 ed, so don't build
these functions.
Matthias Clasen [Tue, 16 May 2023 18:53:20 +0000 (14:53 -0400)]
gsk: Cosmetics
Get the context from the driver.
Matthias Clasen [Tue, 16 May 2023 17:45:38 +0000 (13:45 -0400)]
Improve test coverage for property lookup models
Olivier Crête [Wed, 17 May 2023 00:08:34 +0000 (01:08 +0100)]
pathbar: Fail setting the path on cancellation
The cancellation path already clears the GCancellable, if we let it
continue, it causes a later assertion, so just exit early in this case
and hope a new path has been set.
Fixes: #5792
Matthias Clasen [Wed, 17 May 2023 00:03:19 +0000 (20:03 -0400)]
gsk: Stop setting uniforms when we are out of batches
When the command queue is out of batches, there is
no point in doing further work like allocating uniforms.
This helps us avoid assertions in the uniform code
that we would hit when we run out of uniform space
too.
Benjamin Otte [Tue, 16 May 2023 23:52:42 +0000 (01:52 +0200)]
glrenderer: Remove unused function
Thanks, macos CI.
(We should have a Fedora clang build.)
Benjamin Otte [Tue, 16 May 2023 23:24:22 +0000 (01:24 +0200)]
tests: Remove some tests
They are failing to build because they use deprecated functions and
nobody thinks they're worth fixing.
Benjamin Otte [Tue, 16 May 2023 19:21:01 +0000 (21:21 +0200)]
CI: Actually build our code
Commit
3090795351404735672c45a02a577a4e4bf67586 accidentally caused all
CI builds (or at least the ones with -Werror) to no longer build tests,
examples and demos, so none of them had made sure that they compile.
Matthias Clasen [Tue, 16 May 2023 22:20:51 +0000 (22:20 +0000)]
Merge branch 'fix-gsk-assertions' into 'main'
gsk: Fix a crash
See merge request GNOME/gtk!5979
Matthias Clasen [Tue, 16 May 2023 21:32:13 +0000 (17:32 -0400)]
gsk: Fix a crash
When we start ignoring batches, we must do it everywhere,
or we may run into assertions. This was triggered by an
enormous text node tree produced by tests/rendernode-create.
Matthias Clasen [Tue, 16 May 2023 21:28:29 +0000 (21:28 +0000)]
Merge branch 'ebassi/issue-5837' into 'main'
Fix various compiler warnings with GCC 13
Closes #5837
See merge request GNOME/gtk!5977
Emmanuele Bassi [Tue, 16 May 2023 20:22:01 +0000 (21:22 +0100)]
Replace deprecated CSS loading API
Use gtk_css_provider_load_from_string() when loading CSS from C
strings.
Emmanuele Bassi [Tue, 16 May 2023 17:51:07 +0000 (18:51 +0100)]
Implement GtkSelectionModel for GtkNotebookPages
The documentation says that the model returned by
gtk_notebook_get_pages() implements the GtkSelectionModel interface, but
checking the history confirms this is a lie.
Instead of fixing the documentation, we can easily make it true, and
reduce the differences between GtkNotebook and GtkStack.
Fixes: #5837
Emmanuele Bassi [Tue, 16 May 2023 17:50:00 +0000 (18:50 +0100)]
Fix various compiler warnings with GCC 13
There are various null dereference warnings in GtkListItemManager that
make the build noisy.
Matthias Clasen [Tue, 16 May 2023 20:51:01 +0000 (20:51 +0000)]
Merge branch 'no-deprecations-in-demos' into 'main'
demos: Stop using deprecated api
See merge request GNOME/gtk!5978
Matthias Clasen [Tue, 16 May 2023 20:42:27 +0000 (20:42 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Matthiasc/for main
See merge request GNOME/gtk!5975
Matthias Clasen [Tue, 16 May 2023 20:05:47 +0000 (16:05 -0400)]
demos: Stop using deprecated api
Use texture apis instead of pixbuf ones.
Matthias Clasen [Tue, 16 May 2023 17:25:17 +0000 (17:25 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
gdk: Clamp frame region to surface size
Closes #5812
See merge request GNOME/gtk!5976
Benjamin Otte [Sun, 14 May 2023 21:12:23 +0000 (23:12 +0200)]
nodeparser: Move an error check
By putting the check earlier, it will be emitted for the right token.
Benjamin Otte [Fri, 12 May 2023 15:16:22 +0000 (17:16 +0200)]
node-editor: Print default renderer in title
If there is a value passed to GSK_RENDERER, display it in the window
title.
This is mostly so that when I show off screenshots, people know what
renderer I'm using.
Benjamin Otte [Tue, 16 May 2023 15:18:19 +0000 (17:18 +0200)]
vulkan: Make projection matrix match GL
Vulkan has a different initial coordinate system to GL.
GL:
(-1, 1, -1) +------+.
|`. | `.
| `·--|---·
| : | :
+------+. :
`. : `.:
`·------· (1, -1, 1)
Vulkan:
(-1, -1, 0) +------+.
|`. | `.
| `·--|---·
| : | :
+------+. :
`. : `.:
`·------· (1, 1, 1)
so adjust the near and far plane we pass to
graphene_matrix_init_ortho() to make it end up with the same
projection as the GL renderer.
Benjamin Otte [Wed, 10 May 2023 20:14:26 +0000 (22:14 +0200)]
testsuite: Add crossfade-clip-both-children test
This one tests a crossfade between two non-overlapping nodes with a clip
region that covers neither of the two nodes.
This tests that renderers can deal with clip regions that doesn't
overlap nodes in a situation where they will most likely want to create
an offscreen.
As offscreens are typically clipped to the clip region, this would cause
an empty offscreen and that can cause failures.
Benjamin Otte [Wed, 10 May 2023 19:56:53 +0000 (21:56 +0200)]
testsuite: Add clip-translate-offscreen test
This was an experiment where an offscreen was translated inside an
existing clip.
Because renderers try to limit offscreens to the clip rect, this is
interesting, because they might get the translation wrong.
Benjamin Otte [Fri, 5 May 2023 02:53:08 +0000 (04:53 +0200)]
rendernode: clip when drawing shadows
Ensures the shadow stays small.
Benjamin Otte [Thu, 4 May 2023 23:39:31 +0000 (01:39 +0200)]
build: Make shaders depend on their includes
This does not do any proper dependency tracking, it just makes every
shader depend on every include shader.
But that's good enough for now.
Benjamin Otte [Thu, 11 May 2023 23:31:26 +0000 (01:31 +0200)]
vulkan: Fix typo in clipping code
Benjamin Otte [Fri, 5 May 2023 05:36:03 +0000 (07:36 +0200)]
build: Add a new gcc 13 warning
We don't trigger it and it's a useful warning. So let's use it.
Benjamin Otte [Fri, 12 May 2023 17:20:58 +0000 (19:20 +0200)]
css: Remove crashy resource:// optimization
Using gdk_texture_new_from_resource() is not valid here because we are
not sure if the given resource is valid.
Plus, the previous optimization is no longer relevant, because we are
not using gdk_pixbuf_new_from_resource() anymore - which was what this
optimization was about before it was ported to GdkTexture.
Test attached.
Benjamin Otte [Tue, 16 May 2023 15:29:31 +0000 (17:29 +0200)]
testsuite: Add testcase for z clipping
the near and far clipping plane are at -10000 and 10000 respectively.
Test that the renderers respect that.
Benjamin Otte [Tue, 16 May 2023 16:08:21 +0000 (18:08 +0200)]
gridview: Add border-spacing where it was missed
We were computing column widths without taking border-spacing into
account, making them slightly too big.
Benjamin Otte [Sat, 13 May 2023 16:35:02 +0000 (18:35 +0200)]
gdk: Clamp frame region to surface size
The region may be larger than the surface's size, but many rendering
APIs require the size to be clamped.
Fixes #5812
Matthias Clasen [Tue, 16 May 2023 15:56:47 +0000 (11:56 -0400)]
Cosmetics
Matthias Clasen [Tue, 16 May 2023 15:56:25 +0000 (11:56 -0400)]
Improve test coverage for sorters
Matthias Clasen [Tue, 16 May 2023 15:55:40 +0000 (11:55 -0400)]
Improve test coverage for GtkPropertyLookupListModel
Matthias Clasen [Tue, 16 May 2023 16:31:35 +0000 (16:31 +0000)]
Merge branch 'fix-property-lookup-model' into 'main'
Fix a few bugs in GtkPropertyLookupListModel
See merge request GNOME/gtk!5974
Matthias Clasen [Tue, 16 May 2023 15:54:59 +0000 (11:54 -0400)]
Fix a few bugs in GtkPropertyLookupListModel
Fix bugs in property types.
Matthias Clasen [Tue, 16 May 2023 12:48:40 +0000 (12:48 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
gdk: Drop some unused private api
See merge request GNOME/gtk!5973