Matthias Clasen
594620c054
listview: Accessibility support
...
Set GTK_ACCESSIBLE_RELATION_ROW_COUNT on the listview,
and GTK_ACCESSIBLE_RELATION_ROW_INDEX on the listitemwidgets.
2023-06-17 08:50:09 -04:00
Matthias Clasen
c66577bd79
listview: Handle model being NULL
...
When updating accessible properties, don't stumble
over a NULL model.
2023-06-17 08:50:09 -04:00
Benjamin Otte
cc603bf657
Merge branch 'dropdown-sections' into 'main'
...
dropdown: Add section support
See merge request GNOME/gtk!6102
2023-06-17 06:41:30 +00:00
Matthias Clasen
0652e05e0b
gtk-demo: Add an example for dropdown sections
...
Make one of the dropdowns in the Selections
demo have sections.
2023-06-16 21:13:26 -04:00
Matthias Clasen
1347d23658
dropdown: Add section support
...
Add a header-factory property and pass it through
to the listview in the popup.
2023-06-16 21:13:26 -04:00
Matthias Clasen
3cf349eb6e
Merge branch 'fix-c4013' into 'main'
...
gtkprintoperation-win32.c: Fix build
See merge request GNOME/gtk!6099
2023-06-16 16:38:22 +00:00
Matthias Clasen
53503e3f19
Merge branch 'a11y-computed-name' into 'main'
...
atcontext: Update name computation
See merge request GNOME/gtk!6088
2023-06-16 16:30:51 +00:00
Daniel Boles
8106dc0f46
reference/gtk/coordinates: Fix typos of “widget’s”
2023-06-15 17:40:08 +01:00
Matthias Clasen
8dec07b6c4
Merge branch 'better_gtkstacksidebar' into 'main'
...
GtkStackSidebar: Explicitly mark the sidebar items as labeled by the labels
See merge request GNOME/gtk!6100
2023-06-15 12:54:20 +00:00
Lukáš Tyrychtr
29cf15a444
GtkStackSidebar: Explicitly mark the sidebar items as labeled by the labels
...
That improves the reading of the GtkStackSidebar widget considerably.
Previously, Orca would not read the items at all, now it does.
2023-06-15 14:29:31 +02:00
Chun-wei Fan
abe5eda0f0
gtkprintoperation-win32.c: Fix build
...
Include the needed headers so that we don't break the build with C4013
warnings, which are treated as errors if msvc_recommended_pragmas.h is
found during build configuration.
2023-06-15 18:50:10 +08:00
Benjamin Otte
fa98e2baf3
Merge branch 'listitem' into 'main'
...
signallistitemfactory: finish prototype change
See merge request GNOME/gtk!6098
2023-06-15 10:10:55 +00:00
Matthias Clasen
e5eba26eac
Merge branch 'no_random_screen_coords' into 'main'
...
gtkatspicomponent: Don't return unitialized stack data as screen positions of widgets
See merge request GNOME/gtk!6097
2023-06-15 10:02:19 +00:00
Marc-André Lureau
611439aad7
signallistitemfactory: finish prototype change
...
Complete the API change from commit be1729b316
("signallistitemfactory:
Update signal prototype").
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2023-06-15 09:52:34 +02:00
Lukáš Tyrychtr
cb3045bf38
gtkatspicomponent: Don't return unitialized stack data as screen positions of widgets
...
We can not compute the correct value, but that does not mean we should return
basically random values from an unitialized stack space.
Rather than that behavior, return zeros concistently.
2023-06-15 09:06:30 +02:00
Benjamin Otte
447d1fab62
Merge branch 'wip/otte/vulkan-for-main' into 'main'
...
vulkan: Move some code
See merge request GNOME/gtk!6096
2023-06-14 06:01:47 +00:00
Benjamin Otte
9836389fde
vulkan: Repurpose debug flags for image uploads
...
Now that we don't use the old environment variables anymore to force
staging buffer/image uploads, we don't need them.
However, we do autodetect the fast path for avoiding a staging buffer
now, and we might want to be able to turn that off for testing.
So add GSK_DEBUG=staging that does exactly that.
2023-06-14 03:34:07 +02:00
Benjamin Otte
7f26f5a160
vulkan: Remove gsk_vulkan_image_new_from_data()
...
This is unused now that all the code uses map/unmap.
The only thing that map/unmap doesn't do that the old code did, was use
a staging image instead as alternative to a staging buffer for image
uploads.
However, that code is not necessary for anything, so I'm sure we can do
without.
2023-06-14 03:34:07 +02:00
Benjamin Otte
6a009b7182
vulkan: Add upload fastpath
...
If the memory heap that the GPU uses allows CPU access
(which is the case on basically every integrated GPU, including phones),
we can avoid a staging buffer and write directly into the image memory.
Check for this case and do that automatically.
Unfortunately we need to change the image format we use from
VK_IMAGE_TILING_OPTIMAL to VK_IMAGE_TILING_LINEAR, I haven't found a way
around that yet.
2023-06-14 03:34:07 +02:00
Benjamin Otte
17dd100f43
vulkan: Add gsk_vulkan_memory_can_map()
...
.. nd use it to assert memory is mappable when mapping it.
2023-06-14 03:34:07 +02:00
Benjamin Otte
49c2c2da1a
vulkan: Use map/unmap for fallback images
2023-06-14 03:34:07 +02:00
Benjamin Otte
f88b1cef21
vulkan: Render fallback into vulkan memory
...
Use the new map/unmap image upload method for Cairo node drawing:
1. map() the memory
2. create an image surface or that memory
3. draw to that image surface
4. success
There's no longer a need for Cairo to allocate image memory.
2023-06-14 03:34:07 +02:00
Benjamin Otte
c27e412ff1
vulkan: Use new upload method for texture uploads
...
gsk_vulkan_image_new_from_texture() now uses the direct copy via
gdk_texture_downloader_download_into().
2023-06-14 03:34:07 +02:00
Benjamin Otte
0c72f19cb1
vulkan: Add a new way to upload data into images
...
As an alternative to gsk_vulkan_image_new_from_data() that
takes a given data and creates an image from it, add a 3 step process:
gsk_vulkan_image_new_for_upload()
gsk_vulkan_image_map_memory()
/* put data into memory */
gsk_vulkan_image_unmap_memory()
The benefit of this approach is that it potentially avoids a copy;
instead of creating a buffer to pass and writing the data into it before
then memcpy()ing it into the image, the data can be written straight
into image memory.
So far, only the staging buffer upload is implemented.
There are also no users, those come in the next commit(s).
2023-06-14 03:34:07 +02:00
Benjamin Otte
cb4e92946b
vulkan: Move some code
...
Add gsk_vulkan_image_new_from_texture() and use it.
Also rewrite the actual code from using Cairo surfaces to using
GdkTextureDownloader.
2023-06-14 03:34:07 +02:00
Benjamin Otte
e7c86f4608
vulkan: Constify upload function
2023-06-14 03:34:07 +02:00
Matthias Clasen
4d026857dc
Merge branch 'wip/carlosg/pad-detection' into 'main'
...
gdk/wayland: Create pad devices on enter
See merge request GNOME/gtk!6094
2023-06-14 00:10:32 +00:00
Carlos Garnacho
c523c68cef
gdk: Include pads in GDK_SEAT_CAPABILITY_ALL
...
The GDK_SEAT_CAPABILITY_TABLET_PAD stood awkwardly out of the
ALL value. Even though it's not a keyboard, its focus has more
resemblance to it, so it should be part of this group together
with keyboards.
2023-06-14 01:42:53 +02:00
Carlos Garnacho
9f4320a4ac
gdk/wayland: Create pad devices on enter
...
We were creating the pad device on wp_tablet_pad.done, but
at that time we do not know what tablet it is associated with,
thus we cannot get appropriate vid/pid/name properties for it.
To get that, we need to wait for the pad to enter a surface,
at that time we do know what tablet it is associated with, so
we can get better information about the device.
There are pads that may plausibly "change" tablet between
one .enter event and the next (e.g. Wacom Express Key Remote),
but this situation is highly unlikely. The pad devices created
are thus persistent until that situation happens.
2023-06-14 01:42:53 +02:00
Matthias Clasen
8f6cc19fdb
Merge branch 'mcatanzaro/gtk-show-uri-deprecated-for' into 'main'
...
Change recommended replacement for gtk_show_uri()
See merge request GNOME/gtk!6093
2023-06-13 18:28:32 +00:00
Matthias Clasen
9831632fbd
a11y docs: Some updates
...
Clarify what UI properties go into the name computation,
and mention the inspector tools for accessiblity.
2023-06-13 14:12:16 -04:00
Michael Catanzaro
bef1c69254
Change recommended replacement for gtk_show_uri()
...
Problem is GtkFileLauncher is unable to handle all the types of URIs
that are supported by gtk_show_uri(), e.g. help: URIs. GtkUriLauncher
avoids this problem.
Another problem is that GtkUriLauncher is just generally a better choice
for launching URIs, since you don't have to create a GFile in order to
use it. Porting code is slightly simpler.
The documentation still mentions both GtkFileLauncher and GtkUriLauncher
as options, but most people will use whatever the compiler recommends
when it prints the deprecation warning.
2023-06-13 13:03:04 -05:00
Carlos Garnacho
f381cdef5b
Merge branch 'window-clear-resize_cursor-on' into 'main'
...
window: Clear resize_cursor on leave notify events
See merge request GNOME/gtk!6090
2023-06-13 11:39:04 +00:00
Michel Dänzer
f8fd04402e
window: Clear resize_cursor on leave notify events
...
When the pointer leaves the window surface, gtk_window_capture_motion
will not be called anymore, so priv->resize_cursor may remain non-NULL
indefinitely without this.
If update_cursor is later called (via gtk_window_maybe_update_cursor) on
a virtual enter notify event (e.g. because the pointer entered a
descendant surface), it would previously re-set the window surface
cursor to priv->resize_cursor, which could result in the wrong cursor
shape being shown for descendant surfaces.
This affected mutter-x11-frames, see
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1557 .
One could also say that if the pointer leaves the window surface, it's
trivially not over any window edge.
2023-06-13 12:01:29 +02:00
Matthias Clasen
e5f570045e
Merge branch 'matthiasc/for-main' into 'main'
...
Matthiasc/for main
See merge request GNOME/gtk!6091
2023-06-12 19:18:49 +00:00
Matthias Clasen
4bee0e2454
ci: Collect artifacts from the asan build
2023-06-12 14:54:28 -04:00
Matthias Clasen
fb6ce30fb4
listitemmanager: Quiet a compiler warning
2023-06-12 14:54:21 -04:00
Matthias Clasen
11108ed048
Merge branch 'a11y-overlay' into 'main'
...
inspector: Add an a11y overlay
Closes #5883
See merge request GNOME/gtk!6085
2023-06-12 17:56:26 +00:00
Matthias Clasen
deac44962a
Fix a crash in gtk-demo
...
Fixes #5889
2023-06-12 12:12:49 -04:00
Daniel Boles
0f6219c9ca
docs/reference/gtk/running: Incl GDK_DEBUG=portals
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5871
2023-06-12 16:29:52 +01:00
Luca Bacci
cf980cdefb
Merge branch 'focus-modal-windows' into 'main'
...
win32: Focus modal windows when clicking on unfocused parent
See merge request GNOME/gtk!6051
2023-06-12 13:55:45 +00:00
Luca Bacci
51265e2367
Merge branch 'center-dialogs' into 'main'
...
win32: Center newly created transient windows
Closes #5407
See merge request GNOME/gtk!6050
2023-06-12 13:53:00 +00:00
Daniel Rusek
f1484df60a
Update Czech translation
2023-06-12 13:14:31 +00:00
Matthias Clasen
92a8cf3f29
inspector: Add an a11y overlay
...
Add an overlay that shows a11y issues.
For now, this checks for:
- abstract roles being used
- elements without labels
- required attributes
- required context
2023-06-12 07:31:49 -04:00
Alice Mikhaylenko
5a877c8d43
menubutton: Horizontally expand child
...
Set hexpand on the outer box so we don't propagate that expand.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5883
2023-06-12 07:31:49 -04:00
Alice Mikhaylenko
1ffaf486af
menubutton: Normalize label layout
...
- Remove unnecessary halign=center and hexpand=0 dance
- Set hexpand=false on the outer box so we don't propagate hexpand
2023-06-12 07:31:49 -04:00
Matthias Clasen
9c3e514d3f
Merge branch 'misc-a11y-fixes' into 'main'
...
Various a11y improvements
See merge request GNOME/gtk!6089
2023-06-12 01:48:04 +00:00
Matthias Clasen
1b829c7d01
gtk4-demo: Some a11y improvements
...
Add some labels in the pickers demo.
2023-06-11 20:29:25 -04:00
Matthias Clasen
0f39069be1
filechooser: Some accessibility improvements
2023-06-11 20:29:25 -04:00
Matthias Clasen
bc27b54367
togglebutton: Set a11y properties on realize
...
The pressed property is required, so we need to
make sure that it is set.
2023-06-11 20:29:25 -04:00
Matthias Clasen
9e784f47c9
fontchooser: Add one more accessible property
2023-06-11 20:29:25 -04:00
Matthias Clasen
ade66c84ed
aboutdialog: Set some accessible properties
2023-06-11 20:29:25 -04:00
Matthias Clasen
57c34fca96
menubutton: Set accessible relations
...
In the case where we create the popover, mark it
as labelled by the button.
2023-06-11 20:29:25 -04:00
Matthias Clasen
10e91f6281
shortcutswindow: Add some accessible properties
2023-06-11 20:29:25 -04:00
Matthias Clasen
aada893352
passwordentry: Change an accessible role
...
The caps-lock icon is really an alert. Maybe
this is in vain, since orca ignores these images.
2023-06-11 20:29:25 -04:00
Matthias Clasen
79847f20c4
atcontext: Change the way we handle fallback
...
The tooltip text should only be considered after
all other means are exhausted. but it can be used
for both the name and the description.
See https://www.w3.org/TR/accname-1.2/
2023-06-11 20:27:31 -04:00
Matthias Clasen
22548785b0
atcontext: Update name computation
...
Implement this sentence from the "Accessible Name
and Description Computation 1.2" spec:
If the root node's role prohibits naming,
return the empty string ("").
See https://www.w3.org/TR/accname-1.2/
2023-06-11 20:27:22 -04:00
Matthias Clasen
2349f13f45
Merge branch 'wip/alice/menu-button' into 'main'
...
menubutton: Horizontally expand child
Closes #5883
See merge request GNOME/gtk!6084
2023-06-11 15:14:02 +00:00
Matthias Clasen
084b4361b6
Merge branch 'master' into 'main'
...
Reset chars_changed_stamp in _gtk_text_btree_unref
Closes #5544
See merge request GNOME/gtk!6087
2023-06-11 11:12:52 +00:00
Daniel Boles
d0ebd42e3e
Popover: If can't get widget rect, zero output ptr
...
cherry-pick of commit a6d40b610b
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/893#note_1766079
2023-06-11 11:46:36 +01:00
Bart Jacobs
a4330aae38
Reset chars_changed_stamp in _gtk_text_btree_unref
...
This causes an "Invalid text buffer iterator" warning to be produced if a TextIter is used after the TextBuffer is disposed.
2023-06-11 08:57:41 +00:00
Benjamin Otte
a02fc2d290
Merge branch 'wip/otte/for-main' into 'main'
...
mediafile: Load extension at startup with GTK_MEDIA
See merge request GNOME/gtk!6086
2023-06-11 02:19:13 +00:00
Benjamin Otte
9df935591c
vulkan: Handle new nodes being added correctly
...
When nodes are added, nothing was warning us that we need to bump
N_RENDER_NODES.
Make sure that that's no longer necessary by refactoring the code to
remove the define.
2023-06-11 03:54:50 +02:00
Benjamin Otte
1f8045ddbe
vulkan: Do intersection check for every node
...
This is more expensive, but it finds more cases, and in particular it
catches corner cases like empty nodes or fully clipped nodes that might
otherwise make the kernel throw signals in our direction.
2023-06-11 03:54:50 +02:00
Benjamin Otte
82ba8c848b
vulkan: Handle empty rects in intersects_rect()
...
Apart from the none case, this was already handled, so we just check if
the rect is empty now.
2023-06-11 03:15:08 +02:00
Benjamin Otte
cf48f83709
mediafile: Load extension at startup with GTK_MEDIA
...
When the GTK_MEDIA env var is set, check at startup that it works, not
only when the first MediaFile is instantiated.
This has the fortunate side effect that it prints help output for
GTK_MEDIA=help at startup, too.
2023-06-11 03:14:55 +02:00
Matthias Clasen
9d79982677
Merge branch 'fontchooser-a11y' into 'main'
...
button: Improve accessible setup
See merge request GNOME/gtk!6081
2023-06-10 20:29:45 +00:00
Alice Mikhaylenko
27599d688e
menubutton: Horizontally expand child
...
Set hexpand on the outer box so we don't propagate that expand.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5883
2023-06-11 00:02:15 +04:00
Alice Mikhaylenko
c0d8716366
menubutton: Normalize label layout
...
- Remove unnecessary halign=center and hexpand=0 dance
- Set hexpand=false on the outer box so we don't propagate hexpand
2023-06-11 00:01:19 +04:00
Benjamin Otte
3681144768
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: Add another test to the listitemmanager
See merge request GNOME/gtk!6083
2023-06-10 18:51:05 +00:00
Benjamin Otte
c2fef6f6fd
listitemmanager: All sections without widgets are unmatched
...
We were failing to mark sections when both the start and end of the
untracked area fell on a section boundary.
Fixes testsuite failure in
https://gitlab.gnome.org/GNOME/gtk/-/jobs/2878290
2023-06-10 20:25:20 +02:00
Benjamin Otte
f06cfa2967
testsuite: Print update after changes, not before
...
This way, we don't do an empty print at the start and don't miss a print
at the end.
2023-06-10 20:25:20 +02:00
Benjamin Otte
2cbee7cf86
testsuite: Check that removing listitem trackers works properly
...
We remove them at the end, so just to be sure, check again.
(Guess if I added this check because removing failed.)
2023-06-10 20:25:20 +02:00
Benjamin Otte
f5cdd6fa32
testsuite: Add another test to the listitemmanager
...
Ensure the itemmanager doesn't lose any widgets by ensuring that the
tiles with widgets do account for all children of the list widget.
2023-06-10 20:25:20 +02:00
Matthias Clasen
c49c971f47
colorchooser: Improve accessibility
...
Set up missing accessible relations, labels and roles.
2023-06-10 13:59:32 -04:00
Matthias Clasen
4746e0bdc4
Merge branch 'matthiasc/for-main' into 'main'
...
inspector: Fix an oversight
See merge request GNOME/gtk!6082
2023-06-10 16:15:20 +00:00
Matthias Clasen
f20ef5a0fc
fontchooser: Improve accessibility
...
Set up missing accessible relations, labels and roles.
2023-06-10 11:29:12 -04:00
Matthias Clasen
cf30a4f304
button: Improve accessible setup
...
With the current approach, we get duplicate labels
in the accessible name: _Cancel Cancel. Change things
around to always set the labelled-by accessible relation
if we have a label, and not the label accessible property.
2023-06-10 11:29:12 -04:00
Matthias Clasen
ca189cb5f5
inspector: Fix an oversight
...
There is no margin property, so don't set it.
2023-06-10 11:09:50 -04:00
Matthias Clasen
5e07710f5a
Merge branch 'textview-ctrl-backspace' into 'main'
...
textview: Improve word navigation
Closes #737
See merge request GNOME/gtk!6080
2023-06-10 13:33:10 +00:00
Matthias Clasen
46bb5837e2
textview: Improve word navigation
...
Both Ctrl-Left and Ctrl-Backspace were failing
to step over a non-word at the beginning of
the line. Fix this to match GtkEntry behavior.
Fixes : #737
2023-06-10 09:05:34 -04:00
Matthias Clasen
1888f1e422
Merge branch 'matthiasc/for-main' into 'main'
...
gtk-demo: Change sidebar tab behavior
Closes #3543
See merge request GNOME/gtk!6079
2023-06-10 11:03:02 +00:00
Matthias Clasen
e606313ad1
gtk-demo: Change sidebar tab behavior
...
Change the sidebar to use the 'item' tab
behavior.
Fixes : #3543
2023-06-10 00:02:29 -04:00
Matthias Clasen
b69bfe3799
testsuite: More memleak fixes
2023-06-09 23:23:32 -04:00
Matthias Clasen
5d07c71dd2
builder: Cosmetics
2023-06-09 23:23:32 -04:00
Matthias Clasen
8155b08de8
Merge branch 'matthiasc/for-main' into 'main'
...
inspector: Cosmetics
See merge request GNOME/gtk!6078
2023-06-10 03:17:14 +00:00
Matthias Clasen
0790f24773
gtk: Plug a memory leak
2023-06-09 22:40:38 -04:00
Matthias Clasen
5f02631812
gsk: Fully free mask nodes
...
We were forgetting to chain up in finalize. Oops
2023-06-09 22:40:38 -04:00
Matthias Clasen
c8133ecb50
gsk: Plug a memory leak
2023-06-09 22:40:38 -04:00
Matthias Clasen
b439398d09
testsuite: Plug some memory leaks
2023-06-09 22:40:38 -04:00
Matthias Clasen
fcb9048043
inspector: Show computed values in a11y tab
...
Show the name and description in the a11y tab.
These are not direct property values, but computed
according to ARIA rules.
2023-06-09 21:05:17 -04:00
Matthias Clasen
5816e2fe51
inspector: Cosmetics
...
Don't use technobabble like "fps overlay" in the UI.
2023-06-09 20:10:56 -04:00
Matthias Clasen
298fed6d94
Merge branch 'filechooser-sort-directories-first' into 'main'
...
FileChooser: Sort directories before files by default
See merge request GNOME/gtk!4284
2023-06-09 19:10:58 +00:00
Matthias Clasen
0557b29f5b
Merge branch 'matthiasc/for-main' into 'main'
...
Avoid deprecation warnings from GTK_ALIGN_BASELINE_FILL
Closes #5875
See merge request GNOME/gtk!6077
2023-06-09 14:18:51 +00:00
Matthias Clasen
4c65bdf707
Fix some typos in gtk.supp
...
Actually ignore the media module leak.
2023-06-09 08:28:36 -04:00
Matthias Clasen
351d747909
print: Drop one use of private api
...
We added public api for the foreground color
for just this case, so use it.
2023-06-09 08:23:09 -04:00
Matthias Clasen
53af7208e6
gdk: Fix an oversight in GdkContentFormats
...
When clearing a builder, reset the counts to 0.
Otherwise valgrind spots uninitialized memory
use in our testsuite.
2023-06-09 08:17:34 -04:00
Matthias Clasen
c67f3c5038
Avoid deprecation warnings from GTK_ALIGN_BASELINE_FILL
...
We have to be careful to only use GDK_ALIGN_BASELINE_FILL when
permitted by GDK_VERSION_MAX_ALLOWED because gtkenums.h is a
public header.
Fixes : #5875
I don't think we can avoid conditional compilation here, because the old definition is going to cause deprecated declaration warnings unless you define an old GDK_VERSION_MIN_REQUIRED.
2023-06-09 08:17:34 -04:00
Daniel Boles
1bee1cd180
DrawingArea: Document Widget.get_color, !StyleCont
...
StyleContext is deprecated. To just get foreground colour we now have a
method on Widget, so use that in this example, instead of StyleContext.
2023-06-09 13:02:40 +01:00
Piotr Drąg
e77a17b227
Update POTFILES.in and POTFILES.skip
2023-06-09 13:22:17 +02:00
Benjamin Otte
d8b4249ee9
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: Set GIO_USE_VFS=local everywhere
See merge request GNOME/gtk!6076
2023-06-09 00:47:26 +00:00
Matthias Clasen
da47d9cc3d
Merge branch 'print-subdir' into 'main'
...
Move printing code to its own directory
See merge request GNOME/gtk!6067
2023-06-09 00:32:45 +00:00
Benjamin Otte
53bebd2ed1
testsuite: Set GIO_USE_VFS=local everywhere
...
And do so centrally, not randomly in individual tests.
(Hopefully) fixes spurious test failures in CI.
Related: #5867
2023-06-09 02:29:24 +02:00
Benjamin Otte
ca9f0abdd8
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: Make memorytexture tests random
See merge request GNOME/gtk!6075
2023-06-08 23:54:07 +00:00
Matthias Clasen
8497f97dec
print: Reimplement collate preview
...
Redo this with widgets instead of cairo drawing.
The new private widget is called GtkPageThumbnail.
2023-06-08 19:51:28 -04:00
Matthias Clasen
f22788a3a8
print: Drop some private api use
2023-06-08 19:51:28 -04:00
Matthias Clasen
a30e0fad1f
Move resources too
2023-06-08 19:51:28 -04:00
Benjamin Otte
f033b6c2c6
testsuite: Don't always loop in memorytexture tests
...
When running the tests, only run the random (and potentially large) size
download test once instead of 10 times.
There's no real benefit in doing that, both because it's unlikely to
fail only in the 2nd or 9th run and because the sizes are picked
randomly.
This also speeds up the test massively as the download test was
dominating the runtime.
2023-06-09 01:12:32 +02:00
Benjamin Otte
45656ba426
testsuite: Make memorytexture tests random
...
Instead of picking a few numbers in advance and running them through the
test gauntlet every time, pick the random numbers at runtime.
This both increases the test coverage in that it ultimately tests more
combinations across many runs and it reduces the runtime of individual
runs because every tun only runs the download tests twice (with 1px and
the random size) instead of 5 times.
And that speedup benefits the CI, where the asan runs would cause this
test to timeout sometimes.
2023-06-09 01:12:32 +02:00
Benjamin Otte
83efe2b66c
Merge branch 'wip/otte/for-vulkan' into 'main'
...
vulkan: Fancy gradients
See merge request GNOME/gtk!6073
2023-06-08 21:57:07 +00:00
dgsasha
84840f1f2e
win32: Center newly created transient windows
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5407
2023-06-08 16:42:27 -04:00
Benjamin Otte
2883f4b7a2
vulkan: Antialiasing for linear gradients
...
Shaders are complicated now...
2023-06-08 22:16:18 +02:00
Benjamin Otte
0a0f0d9e7e
testsuite: Add a test for repeating gradients
...
Make sure scaling the image also scales the color stop lookup.
2023-06-08 22:16:18 +02:00
Benjamin Otte
e3cc3f7841
vulkan: Make gradient shader use buffers
...
This allows putting any number of color stops into the buffer, so
fallbacks with too many stops are no longer necessary.
2023-06-08 21:53:06 +02:00
Benjamin Otte
d1135f9e3c
vulkan: Add support for storage buffers
...
And add a default storage buffer that is used for per-frame temporary
data.
So far nothing is using this code, this is just infrastructure.
2023-06-08 21:53:06 +02:00
Benjamin Otte
2d89dfea29
vulkan: Switch GLSL version to 450
...
We need more modern features soon.
2023-06-08 21:53:06 +02:00
Benjamin Otte
89f20c2fb6
vulkan: Only update descriptor sets with contents
...
If one of the descriptor sets doesn't have any items, don't include it
in the sets passed to vkUpdateDescriptorSets().
This has no effect right now, because we either have both images and
samplers or neither, but it will become relevant once we also support
buffers.
2023-06-08 21:53:06 +02:00
Matthias Clasen
c019eb9eea
print: Some more include cleanup
2023-06-07 15:35:12 -04:00
Matthias Clasen
216e415186
Update POTFILES.in
...
The moving the printing sources needs to
be reflected here.
2023-06-07 14:41:46 -04:00
Matthias Clasen
28fb91e85e
Merge branch 'matthiasc/for-main' into 'main'
...
Fix a compiler warning
See merge request GNOME/gtk!6070
2023-06-07 15:11:29 +00:00
Matthias Clasen
7f3d4fa66e
ci: Mark asan as must-pass
...
The asan test run seems to pass pretty
reliably now, so lets keep it that way.
2023-06-07 10:54:48 -04:00
Matthias Clasen
0505c8fac9
Fix a compiler warning
...
Compilers these days are very picky about
their NULLs.
2023-06-07 10:39:24 -04:00
Benjamin Otte
ccb7c9057a
Merge branch 'wip/otte/for-main' into 'main'
...
gtk-demo: Remove random numbers
See merge request GNOME/gtk!6069
2023-06-07 14:21:32 +00:00
Benjamin Otte
ac6f18da12
gtk-demo: make the sidebar request proper width
...
- 25 chars sounds about right for the texts we use
- don't use min width so we allow shrinking the widget (large text or
small mobile devices)
- ellipsize the text instead of clipping it.
2023-06-07 16:00:44 +02:00
Benjamin Otte
0d7069452b
gtk-demo: Remove random numbers
...
There were 3 different random numbers set to determine the sidebar width
and all of them were wrong. Remove them.
Instead, propagate the natural width of the listitems.
2023-06-07 16:00:44 +02:00
Matthias Clasen
5aa62b6273
Fix a compiler warning
...
Compilers these days are very picky about
their NULLs.
2023-06-07 07:41:30 -04:00
Matthias Clasen
41d03c68f8
Make introspection build
2023-06-07 07:41:16 -04:00
Matthias Clasen
30ff352960
print: Maintain compatibility
...
gtkunixprint.h is a public header, that needs
to keep being installed in the same location.
2023-06-07 07:16:26 -04:00
Matthias Clasen
2adc017048
print: Start sorting apart includes
...
Use gtk/gtk.h in the print sources, so that it
becomes apparent where we are using private apis.
2023-06-07 00:18:14 -04:00
Matthias Clasen
d1aae4bffa
print: Move all the remaining sources
...
Move the unix- and Windows-specific print
sources to the gtk/print subdirectory.
2023-06-07 00:06:33 -04:00
Matthias Clasen
434a747d42
print: Move frontend sources
...
Move the cross-platform printing sources
to the gtk/print subdirectory.
2023-06-06 23:21:19 -04:00
Matthias Clasen
50cf1c08dd
print: Install headers in a subdir
...
This is a first step towards isolating the printing
code within gtk.
2023-06-06 23:16:09 -04:00
Matthias Clasen
caaeaedf1f
Merge branch 'matthiasc/for-main' into 'main'
...
Drop gtkunixprint-autocleanups.h
See merge request GNOME/gtk!6066
2023-06-07 03:14:17 +00:00
Matthias Clasen
19362522e0
print: Rename private headers
...
Rename private print-related headers to follow our
naming conventions:
gtkprintutils.h -> gtkprintutilsprivate.h
gtkprinteroption.h -> gtkprinteroptionprivate.h
gtkprinteroptionset.h => gtkprinteroptionsetprivate.h
gtkprinteroptionwidget.h -> gtkprinteroptionwidgetprivate.h
2023-06-06 22:32:18 -04:00
Matthias Clasen
50c3ea064b
Drop gtkunixprint-autocleanups.h
...
Move these definitions where they belong
and git rid of an auxiliary header we don't
need anymore.
2023-06-06 22:18:12 -04:00
Matthias Clasen
84e345adac
Merge branch 'matthiasc/for-main' into 'main'
...
ci: More asan test runs
See merge request GNOME/gtk!6064
2023-06-06 11:17:32 +00:00
Marco Trevisan
d2638f0955
Merge branch 'wip/otte/fix-glx' into 'main'
...
glx: Ignore all errors
See merge request GNOME/gtk!6065
2023-06-06 10:56:55 +00:00
Benjamin Otte
e580dcf18d
glx: Fake an X request to make GLX hack work
...
Sometimes, GLX can decide to use the previous request serial when faking
XErrors via __glXSendError() (look through the Mesa sources to enjoy).
This can cause the error trap we just installed to not feel responsible
for the error. And that makes GDK decide to immediately abort the
application.
That is not what we or GLX want.
So we use a no-op X Request to bump the request number so that when GLX
does its shenanigans, it uses a serial that our error trap will catch.
Fixes a crash in mutter's CI which apparently manages to drive GLX
without an X server.
2023-06-06 05:20:34 +02:00
Benjamin Otte
14e44f36bf
glx: Move error trap even further out
...
This way we only create one error trap for all attempts to create a
context instead of up to 3.
2023-06-06 05:20:34 +02:00
Benjamin Otte
1e60ad1430
glx: Ignore all errors
...
In error cases, glXCreateContextAttribsARB() will always return NULL so
it is enough to run the loop until the first non-NULL context is
returned.
And at that point, we can just look at the return value and ignore all
errors.
2023-06-06 05:20:34 +02:00
Matthias Clasen
2c67d9f7cf
ci: Build less for asan
...
The asan build is all about running the tests
with asan, so lets not waste time building
demos and examples.
2023-06-05 22:05:16 -04:00
Matthias Clasen
4bcaeab4dc
ci: More asan test runs
2023-06-05 21:47:36 -04:00
Matthias Clasen
97a4cc301a
Merge branch 'matthiasc/for-main' into 'main'
...
Revert "ci: More verbose output from asan"
See merge request GNOME/gtk!6063
2023-06-06 01:37:47 +00:00
Matthias Clasen
baaa748248
ci: Disable headless tests under asan
...
Our use of LD_PRELOAD for these tests does not
sit right with asan, so just skip them in this
case.
2023-06-05 21:15:31 -04:00
Matthias Clasen
cf69fecc87
ci: Tweak asan options
...
Allow the allocator to return NULL, so our
g_try_malloc tests don't fail.
2023-06-05 21:09:51 -04:00
Matthias Clasen
29ad2c1247
ci: Turn off LeakSanitizer
...
When it is enabled, almost every report from asan is
"LeakSanitizer has encountered a fatal error."
So try without.
2023-06-05 20:56:53 -04:00
Matthias Clasen
1450789052
ci: Reenable asan builds
...
This is an attempts to catch sporadic ci failures.
2023-06-05 20:55:00 -04:00
Matthias Clasen
51f4ad55cf
wayland: Free seat globals in dispose
...
This matches what we do for the display globals.
2023-06-05 20:50:09 -04:00
Matthias Clasen
94d65f6ef1
gdk: Dispose seats when a display is closed
...
We dispose the display itself. It does not make
sense to hold onto seat resources beyond that point.
2023-06-05 20:50:09 -04:00
Matthias Clasen
c3f446a95a
wayland: Don't leak all globals
2023-06-05 20:50:09 -04:00
Matthias Clasen
ad8e5c3a39
wayland: Drop an unused field
...
Nobody is using the wl_input_device field.
2023-06-05 20:50:09 -04:00
Matthias Clasen
6b26a4f9be
Revert "ci: More verbose output from asan"
...
This reverts commit 4f65c121b7
.
2023-06-05 14:52:15 -04:00
Matthias Clasen
40f215ea46
Post-release version bump
2023-06-05 07:39:28 -04:00
Matthias Clasen
55dd5f4780
4.11.3
2023-06-05 07:26:41 -04:00
Matthias Clasen
1e878d3928
Merge branch 'search-entry-allocation' into 'main'
...
text: Make the placeholder non-intrusive
See merge request GNOME/gtk!6060
2023-06-05 10:17:46 +00:00
Benjamin Otte
66c57a8f4e
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: Adapt color-matrix testcase
See merge request GNOME/gtk!6018
2023-06-05 04:07:27 +00:00
Benjamin Otte
ee22f8f52f
stringsorter: Handle NULL strings
...
NULL is a valid string GValue, so we need to handle it.
The utf8 normalizing and collating functions do not, so we better catch
it early.
2023-06-05 05:33:07 +02:00
Benjamin Otte
9070c457d6
testsuite: Make clipped-repeat test work universally
...
Cover the rounded corners so that they cause no visible difference in
the end result.
2023-06-05 05:33:07 +02:00
Benjamin Otte
bba324ce30
rendernode: Scale repeat offscreens properly
...
Respect the matrix in use at time of encountering a repeat node so that
the offscreen uses roughly the same device pixel density as the target.
Fixes the handling of the clipped-repeat test.
2023-06-05 05:33:07 +02:00
Benjamin Otte
c322ab34c7
rendernode: Use cairo_set_device_offset()
...
Simplifies the code.
2023-06-05 05:33:07 +02:00
Benjamin Otte
8c5e046574
testsuite: Adapt color-matrix testcase
...
Make it use an alpha value that is well defined, ie 0.4 instead of 0.5.
0.4 * 255 = 102
0.5 * 255 = 127.5
This avoids rounding issues where some math may cause the resulting
alpha value to be 127, and some other math ends up with 128.
2023-06-05 05:33:07 +02:00
Benjamin Otte
8860a2a688
testsuite: fix memleak
...
Also use the actual diff command we found instead of searching for it
again.
2023-06-05 05:33:07 +02:00
Matthias Clasen
5ca40c3660
Merge branch 'matthiasc/for-main' into 'main'
...
gl: Free all tracked buffers
See merge request GNOME/gtk!6061
2023-06-05 03:03:01 +00:00
Matthias Clasen
a9f9fb2022
gl: Free all tracked buffers
...
This was overlooked when the number of tracked
buffers was bumped from 2 to 4 in 46e3454eb7
.
2023-06-04 22:17:56 -04:00
Matthias Clasen
a8a49d270b
searchentry: Improve size allocation
...
We want to always reserve space for the clear icon,
but let the text widget use that space when the icon
isn't shown. A plain box layout can't do that, so
do our own size allocation.
2023-06-04 21:50:35 -04:00
Matthias Clasen
419c431f29
text: Make the placeholder non-intrusive
...
We never want to let the placeholder cause
the widget to grow, so set its max-width-chars
to a small value to make it ellipsize.
2023-06-04 21:47:11 -04:00
Benjamin Otte
fd5d15004e
Merge branch 'wip/otte/vulkan' into 'main'
...
Vulkan hacking going overboard
See merge request GNOME/gtk!5992
2023-06-04 18:21:21 +00:00
Benjamin Otte
5409f0b350
vulkan: Create multiple render objects
...
Sometimes the GPU is still busy when the next frame starts (like when
no-vsync benchmarking), so we need to keep all those resources alone and
create new ones.
That's what the render object is for, so we just create another one.
However, when we create too many, we'll starve the CPU. So we'll limit
it. Currently, that limit is at 4, but I've never reached it (I've also
not starved the GPU yet), so that number may want to be set lower/higher
in the future.
Note that this is different from the number of outstanding buffers, as
those are not busy on the GPU but on the compositor, and as such a
buffer may have not finished rendering but have been returend from the
compositor (very busy GPU) or have finished rendering but not been
returned from the compositor (very idle GPU).
2023-06-04 19:42:01 +02:00
Benjamin Otte
f1b1aacc34
vulkan: Stop differentiating rounded from cicular corners
...
Our shaders can handle both, so don'ttry to tell them apart anymore.
Removes a lot of unnecessary fallbacks.
2023-06-04 19:42:01 +02:00
Benjamin Otte
e7201968d6
vulkan: Cleanup: Initialize constants at the top
2023-06-04 19:42:01 +02:00
Benjamin Otte
67f2ad817e
vulkan: Add support for texture-scale nodes
2023-06-04 19:42:01 +02:00
Benjamin Otte
f420c143e0
vulkan: Split textures and samplers
...
The idea here is that we can do more complex combinations and use that
to support texture-scale nodes or use fancy texture formats (suc as
YUV).
I'm not sure this is actually necessary, but for now it gives more
flexibility.
2023-06-04 19:42:01 +02:00
Benjamin Otte
1cf6dfab2f
vulkan: Add a hackish way to handle empty children
...
For blend and crossfade nodes, one of the children may exist and
influence the rendering, while the other does not.
Previously, we would skip the node, which would cause the required
rendering to not happen. We now send a valid texture id for the
invalid offscreen, thereby actually rendering the required parts.
Fixes the blend-invisible-child compare test
Current state for compare tests:
Ok: 397
Expected Fail: 0
Fail: 26
Unexpected Pass: 0
Skipped: 2
Timeout: 0
2023-06-04 19:42:01 +02:00
Benjamin Otte
330a8b1cdb
vulkan: Convert blend shader
...
Same work as crossfade shader pretty much.
2023-06-04 19:42:01 +02:00
Benjamin Otte
8d19db6732
vulkan: Update the cross-fade shader
...
This also fixes it rendering weird things when the bounds of start and
end node don't match.
2023-06-04 19:42:01 +02:00
Benjamin Otte
0f1b039306
vulkan: Implement bindless texture rendering
...
Instead of having a descriptor set per operation, we just have one
descriptor set and bind all our images into it.
Then the shaders get to use an index into the large texture array
instead.
Getting this to work - because it's a Vulkan extension that needs to be
manually enabled, even though it's officially part of Vulkan 1.2 - is
insane.
2023-06-04 19:42:01 +02:00
Benjamin Otte
b791aa0301
vulkan: Clip using scissors
...
If we have a rectangular clip without transforms, we can use
scissoring. This works particularly well because it allows intersecting
rounded rectangles with regular rectangles in all cases:
Use the scissor rect for the rectangle and the normal clipping code for
the rounded rectangle.
2023-06-04 19:42:01 +02:00
Benjamin Otte
7fd94c1828
vulkan: Make scissoring an explicit operation
...
The idea is to use it for clip nodes when they are integer-aligned.
To do that, we need to track the scissor rect in the parse state, so we
do that, too.
Also move the viewport offset out of the projection matrix, as it is
part of the transform between clip and scissor, so it needs to live in
the offset.
2023-06-04 19:42:01 +02:00
Benjamin Otte
dd4c1167b2
vulkan: Remove unneeded struct member
...
We can use gsk_vulkan_pipeline_get_vertex_stride() whenever we need that
value.
2023-06-04 19:42:01 +02:00
Benjamin Otte
d411912396
vulkan: Bind vertex buffers only once
...
We can index into the same buffer from every pipeline due to the aligned
buffer writes (see previous commit).
So we do that.
2023-06-04 19:42:01 +02:00
Benjamin Otte
0e93ad8671
vulkan: Align vertex data
...
We align the data to a multiple of vertex stride, that way we use more
memory, but we could compute an offset into the vertex buffer without
changing the offset.
2023-06-04 19:42:01 +02:00
Benjamin Otte
d98991a0ad
vulkan: Set offsets when counting
...
We can set the vertex offset while counting the data, this gets rid of
the need of passing all the counting machinery into the actual data
collection code.
2023-06-04 19:42:01 +02:00
Benjamin Otte
1f7dcc1286
vulkan: Simplify switch statement
...
All branches do the same thing now, so pull them all into the same
branch.
2023-06-04 19:42:01 +02:00
Benjamin Otte
328cdf7b2a
vulkan: Simplify collect_vertex_data()
...
We don't have any size arguments to it, so don't use them.
2023-06-04 19:42:01 +02:00
Benjamin Otte
79a227bc64
vulkan: Remove a function from pipeline impls
...
That function is available already in the structs we feed to Vulkan.
Store it from there and reuse it.
2023-06-04 19:42:01 +02:00
Benjamin Otte
0fee26252c
vulkan: Don't draw fully clipped nodes
...
... if they are container nodes. Other nodes will get culled by the
vertex shader.
2023-06-04 19:42:01 +02:00
Benjamin Otte
d48b6b9ad5
vulkan: Add optimization for transforms
...
When attempting a complex transform, check if the clip can be ignored
and do that if possible.
That way we don't cause fallbacks when transforming the clip is too
complex.
2023-06-04 19:42:01 +02:00
Benjamin Otte
d4618ea8a6
vulkan: Don't crash with overly large nodes
...
... when these nodes are used as children of a complex transform nodes
and we lose the clip.
2023-06-04 19:42:01 +02:00
Benjamin Otte
a73530f952
vulkan: Update texture shader to do AA
2023-06-04 19:42:01 +02:00
Benjamin Otte
3e620a8fe5
vulkan: Split generic code off
...
No need to duplicate code in shaders when it can be shared.
2023-06-04 19:42:01 +02:00
Benjamin Otte
6d8c8199d9
vulkan: Use rounded rect APIs to improve clips
...
There are a bunch of intersection APIs available these days.
Let's use them.
2023-06-04 19:42:01 +02:00
Benjamin Otte
968ceb71d5
gsk: Add (private) gsk_rounded_rect_intersection()
...
The idea is that for a rectangle intersection, each corner of the
result is either entirely part of one original rectangle or it is
an intersection point.
By detecting those 2 cases and treating them differently, we can
simplify the code to compare rounded rectangles.
2023-06-04 19:42:01 +02:00
Benjamin Otte
7f5504bea4
vulkan: Set the initial clip rect
...
Instead of rendering unclipped, set the clip region to the extents of
the current clip region.
2023-06-04 19:42:01 +02:00
Benjamin Otte
4b2b239550
vulkan: Only draw one rect
...
Instead of emitting the render commands once per rectangle of the clip
region, just emit them once with the region's extents.
This is generally faster because it emits fewer commands to the GPU,
even though it may touch significantly more pixels.
For a proper method, we'd need to record the commands per clip rectangle
instead of emitting all of them all the time.
2023-06-04 19:42:01 +02:00
Benjamin Otte
23c10d434c
vulkan: Use CLAMP_TO_EDGE in sampler
...
We don't want to clamp to the border, that causes fade-outs at the
edges.
2023-06-04 19:42:01 +02:00
Benjamin Otte
87c9503293
vulkan: Rewrite AA shaders to respect scale
...
The border and color shaders - the ones that do AA - now multiply their
coordinates by the scale factor, which gives them better rounding
capabilities.
This in particular improves the case where they are used in fractional
scaling situations, where the scale is defined at the root element.
2023-06-04 19:42:01 +02:00
Benjamin Otte
76634cb68b
vulkan: Don't allocate no descriptor sets
...
If we don't need them, exit early.
Shuts up the validation layers when running simple denos without
textures.
2023-06-04 19:42:01 +02:00
Benjamin Otte
52eefdb7d9
vulkan: Only use a single pipeline layout
...
There's no need to use 3 different ones when they are compatible.
2023-06-04 19:42:01 +02:00
Benjamin Otte
ea9f0a3372
vulkan: Don't cull vertices
...
We end up with the backside, when we scale(-1) and we still want it to
be visible, just flipped.
2023-06-04 19:42:01 +02:00
Benjamin Otte
8561ff37c4
vulkan: Use scale factor for offscreens and fallbacks
...
Previously, we just used the defaultscale factor, but now that we're
having it available in push constants, we can read it back for creating
offscreens and rendering fallbacks.
So do that.
2023-06-04 19:42:01 +02:00
Benjamin Otte
a09580b9ef
vulkan: Split scale from matrix
...
Now, the scale is no longer part of the matrix. This allows shaders to
transform points by the scale which increases accuracy for antialiasing.
2023-06-04 19:42:01 +02:00
Benjamin Otte
0511227379
vulkan: Keep the modelview as a GskTransform
...
This allows doing more optimized math on it.
2023-06-04 19:42:01 +02:00
Benjamin Otte
4183ce0b52
vulkan: Split modelview and projection
...
This is adding extra work, but the benefits should become visible
in future commits.
2023-06-04 19:42:01 +02:00
Benjamin Otte
57222cc64c
vulkan: Add scale to push constants
...
This way, it can be pushed to the shaders
2023-06-04 19:42:01 +02:00
Benjamin Otte
b3c1284382
vulkan: Move scale into the state object
2023-06-04 19:42:01 +02:00
Benjamin Otte
b02e054592
vulkan: Add offset to the Vulkan clip checks
...
This was forgotten when tracking the offset was added, so code was
actually selecting the wrong shaders.
2023-06-04 19:42:01 +02:00
Benjamin Otte
870ee06d1f
vulkan: Move offset into the state object
2023-06-04 19:42:01 +02:00
Benjamin Otte
8d586be693
vulkan: Add a new GskVulkanParseState
...
It's a 1:1 replacement for GskVulkanPushConstants, just without the
indirection through a different file.
GskVulkanPushConstants as a struct is gone now.
The file still exists to handle the push_constants operation.
2023-06-04 19:42:01 +02:00
Benjamin Otte
94ab11b999
vulkan: Don't store push constants in RenderOp
...
Instead, only store the values that are needed.
2023-06-04 19:42:01 +02:00
Benjamin Otte
9b1dcd3872
vulkan: Split out gsk_vulkan_render_pass_append_push_constants()
...
Simplifies the code and makes future refactoring easier
2023-06-04 19:42:01 +02:00
Benjamin Otte
c37171f4d6
vulkan: Pass values to push directly
...
Don't require a GskVulkanPushConstants there.
2023-06-04 19:42:01 +02:00
Benjamin Otte
c479f93372
vulkan: Add a static assert
...
We don't want to make the push constants larger than what the spec
guarantees. And that is 128 bytes, see value for
maxPushConstantsSize in table 55 of
https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-minmax
2023-06-04 19:42:01 +02:00
Benjamin Otte
186e056c56
vulkan: Handle clip properly for offscreens
...
This was broken in the last commit.
2023-06-04 19:42:01 +02:00
Benjamin Otte
d8b9c3ae96
vulkan: Track offset in the renderpass
...
This avoids emitting lots of push constant updates as most of the
transforms we have are simple translations to adjust drawing for the
next widget.
2023-06-04 19:42:01 +02:00
Benjamin Otte
5de6f12e88
vulkan: Pass scale to offscreens
...
Create offscreens with enough pixels for the given scale and ensure
the scale is passed on.
This improves text rendering on offscreens quite a bit.
2023-06-04 19:42:01 +02:00
Benjamin Otte
5422c12577
vulkan: Clean up scale handling
...
1. Use a graphene_vec2_t
2. Ensure it's always positive
3. Don't break with fallback
The scale value is nothing more than an indication of how many pixels to
assume per unit of a node.
2023-06-04 19:42:01 +02:00
Benjamin Otte
bb145b9bc1
vulkan: Fix typo
2023-06-04 19:42:01 +02:00
Benjamin Otte
a55fda0b49
vulkan: Don't store unused matrices
...
We can compute it when needed, so do that.
2023-06-04 19:42:01 +02:00
Benjamin Otte
5b93a32f90
vulkan: Remove unneeded argument
...
The initial matrix can be computed as needed, so we don't need to
precompute it.
2023-06-04 19:42:01 +02:00
Benjamin Otte
495ee1be3d
vulkan: Don't explode without vertex data
...
If no buffer has any vertex data (read: if nothing gets drawn), don't
try to allocate a 0 bytes buffer.
2023-06-04 19:42:01 +02:00
Benjamin Otte
7f1bd1f047
vulkan: Handle empty child bounds in repeat node
...
Also add test to the testsuite for it.
2023-06-04 19:42:01 +02:00
Benjamin Otte
da147dca92
vulkan: Fix repeat nodes
2023-06-04 19:42:01 +02:00
Benjamin Otte
8ba5ff98aa
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.
2023-06-04 19:42:01 +02:00
Benjamin Otte
34f4493c36
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.
2023-06-04 19:42:01 +02:00
Benjamin Otte
314923d4b5
vulkan: Split out a function
...
We can now create offscreens explicitly.
2023-06-04 19:42:00 +02:00
Benjamin Otte
d2f45dae96
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.
2023-06-04 19:42:00 +02:00
Benjamin Otte
0e31cf9542
vulkan: compute new modelview directly
...
no need to go through a GskTransform
2023-06-04 19:42:00 +02:00
Benjamin Otte
af901a10e3
vulkan: Make border shader handle fractional widths
...
We were rounding widths properly, make sure we always round up.
2023-06-04 19:42:00 +02:00
Benjamin Otte
3d1a607367
vulkan: Don't round corners when growing rounded rect
...
If the corner is set to 0, keep it there.
2023-06-04 19:42:00 +02:00
Benjamin Otte
1be21a33d9
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.
2023-06-04 19:42:00 +02:00
Benjamin Otte
64bcdb713c
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.
2023-06-04 19:42:00 +02:00
Benjamin Otte
4a868736f9
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.
2023-06-04 19:42:00 +02:00
Benjamin Otte
cfeaa0ac72
renderer: return_if_fail() if the given texture size is 0
...
All renderers SEGV currently when that happens.
2023-06-04 19:42:00 +02:00
Matthias Clasen
b44ef07e22
Merge branch 'matthiasc/for-main' into 'main'
...
wayland: Don't leak cursor structs
See merge request GNOME/gtk!6058
2023-06-04 17:35:04 +00:00
Ekaterine Papava
7f119b5ad2
Update Georgian translation
2023-06-04 14:45:45 +00:00
Matthias Clasen
d427933c61
testsuite: Improve test coverage
2023-06-04 09:04:25 -04:00
Matthias Clasen
85bafbdff0
wayland: Don't leak cursor structs
...
Found by gcc's -fanalyzer.
2023-06-04 07:58:24 -04:00
Matthias Clasen
7ae7356284
NEWS: Cosmetics
2023-06-04 07:58:24 -04:00
Matthias Clasen
444d5fa500
Merge branch 'drop-x11-dnd-keynav' into 'main'
...
x11: Stop using passive grabs
See merge request GNOME/gtk!6055
2023-06-03 19:38:24 +00:00
Matthias Clasen
c380d17621
Revert "gdk/x11: Also grab keyboard during XDnD grabs"
...
This reverts commit ae94417f80
.
2023-06-03 12:25:25 -04:00
Matthias Clasen
686d18dfc2
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.
2023-06-03 12:25:25 -04:00
Benjamin Otte
0a1702ae99
Merge branch 'wip/otte/fix-glx' into 'main'
...
glx: Trap errors inside loop
Closes #5857
See merge request GNOME/gtk!6056
2023-06-03 16:19:09 +00:00
Benjamin Otte
0016fea36b
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
2023-06-03 18:03:56 +02:00
Matthias Clasen
7ef46293aa
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
2023-06-03 11:01:40 +00:00
António Fernandes
6b59c138b2
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
2023-06-02 20:18:56 +01:00
dgsasha
b7e3a231b4
win32: Focus modal windows when clicking on unfocused parent
2023-06-02 12:33:03 -04:00
Matthias Clasen
c8c895d160
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
2023-06-02 11:31:45 +00:00
Luca Bacci
acbd7f212e
Merge branch 'for-main' into 'main'
...
GdkWin32 Cleanup
See merge request GNOME/gtk!5714
2023-06-02 09:34:48 +00:00
Marco Trevisan (Treviño)
f2a2889153
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.
2023-06-02 00:30:14 +02:00
Matthias Clasen
a4ae215309
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
2023-06-01 20:58:22 +00:00
Daniel Boles
fa16ba12cf
Window: Copy caveats from :*visible to the setters
2023-06-01 20:31:22 +01:00
Daniel Boles
ec2421b187
Window: Fix wrong case in property attribute which
...
rendered the literal text `org.gtk.MEthod.set_property focus-visible`.
2023-06-01 20:26:57 +01:00
sumibi-yakitori
1fce2b1e06
Fix an issue where min_version
was not being used as the minimum version required by GTK
2023-06-01 23:05:44 +09:00
Matthias Clasen
38bf843de8
Merge branch 'wip/alice/muxer-fix' into 'main'
...
actionmuxer: Correctly notify actions after reparenting
Closes #5861
See merge request GNOME/gtk!6043
2023-06-01 10:54:33 +00:00
sumibi-yakitori
7b8a5235d4
Fix a bug in error checking conditions. This avoids unintentional Legacy
of the created OpenGL context
2023-06-01 16:46:24 +09:00
sumibi-yakitori
3c9b3ead6f
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
2023-06-01 16:43:57 +09:00
Alice Mikhaylenko
1549ec5f9b
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
2023-06-01 06:39:44 +04:00
Matthias Clasen
4339e8e464
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Support straight alpha textures
See merge request GNOME/gtk!6041
2023-05-31 19:14:07 +00:00
Matthias Clasen
39f4d5ccf7
gltexturebuilder: Update the docs
...
We do handle unpremultiplied alpha correctly (albeit
non-optimally) now.
2023-05-31 14:39:07 -04:00
Matthias Clasen
957fa87fce
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.
2023-05-31 14:37:33 -04:00
Matthias Clasen
e8bdd46d8d
Merge branch 'a11y-crash' into 'main'
...
label: Fix crashes when executing a11y actions
See merge request GNOME/gtk!6034
2023-05-31 12:27:49 +00:00
Erik Schilling
d03b27b441
label: Fix crashes when executing a11y actions
2023-05-31 12:27:48 +00:00
Matthias Clasen
f4cbe26af3
Merge branch 'more-texture-tests' into 'main'
...
testsuite: Add more download tests
See merge request GNOME/gtk!6038
2023-05-31 12:01:31 +00:00
Luca Bacci
24af4b48cc
GdkWin32: Remove unused functions
2023-05-31 12:15:57 +02:00
Luca Bacci
1c8caf745f
GdkWin32: Remove declarations of unused types from gdkprivate-win32.h
2023-05-31 12:15:57 +02:00
Luca Bacci
395d80f131
GdkWin32: Remove declarations of unexisting functions from gdkprivate-win32.h
2023-05-31 12:15:57 +02:00
Luca Bacci
74229572e7
GdkWin32: Remove defines for old MinGW headers
2023-05-31 12:15:57 +02:00
Luca Bacci
cbb3d3f177
GdkWin32: Remove _gdk_display_hdc global variable
2023-05-31 12:15:57 +02:00
Luca Bacci
8861d0eb53
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.
2023-05-31 12:15:57 +02:00
Luca Bacci
a23bc894e9
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
2023-05-31 12:15:57 +02:00
Luca Bacci
156e25b6aa
Update manifest XML for the GTK DLL
2023-05-31 12:15:49 +02:00
Matthias Clasen
96f6787a3e
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.
2023-05-30 23:01:20 -04:00
Matthias Clasen
cc665f29ea
testsuite: Plug a memory leak
2023-05-30 22:37:03 -04:00
Matthias Clasen
8d2047c824
testsuite: Use proper alignment when uploading to GL
2023-05-30 22:36:41 -04:00
Matthias Clasen
a79da8b655
Improve test coverage for GdkGLTexture
2023-05-30 22:36:10 -04:00
Matthias Clasen
f29c7e76f5
gltexture: Use proper alignment for downloads
2023-05-30 22:35:45 -04:00
Matthias Clasen
29867e7ae1
NEWS: Updates
2023-05-30 20:21:13 -04:00
Matthias Clasen
876b439d4a
Merge branch 'matthiasc/conversion-tests' into 'main'
...
Texture format work
See merge request GNOME/gtk!6035
2023-05-31 00:13:51 +00:00
Matthias Clasen
4f6d7c69a1
gltexturebuilder: Document format expectations
...
Provide some details about storage and alpha handling.
2023-05-30 19:46:13 -04:00
Matthias Clasen
2bf2635635
testsuite: Exclude some formats on GLES
...
GLES < 3.2 has some problems with 16-bit formats,
so exclude these from our download tests.
2023-05-30 19:46:13 -04:00
Matthias Clasen
67ed09f5ae
testsuite: Add tests for native GL textures
...
Create GL textures in gray and GA formats
and check that we can download from them
successfully.
2023-05-30 19:46:13 -04:00
Matthias Clasen
1c72f46eed
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.
2023-05-30 15:57:18 -04:00
Matthias Clasen
f5e7a1d4cc
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
2023-05-30 19:10:49 +00:00
Matthias Clasen
0f61c52593
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.
2023-05-30 14:49:45 -04:00
Matthias Clasen
a4bae6a62d
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.
2023-05-30 14:41:01 -04:00
Sophie Herold
d141ac5adf
gdk: Add gray/alpha memory formats to testsuite
2023-05-30 14:41:01 -04:00
Sophie Herold
894a4bda85
gdk: Support gray/alpha in PNG loader
2023-05-30 14:41:01 -04:00
Sophie Herold
2b88505ca4
gdk: Support gray/alpha in TIFF loader
...
Use PHOTOMETRIC_MINISBLACK for grayscale image
2023-05-30 14:41:01 -04:00
Sophie Herold
ef8c835762
gsk: Support swizzle for gray and alpha formats
...
Swizzling is needed to display one channel memory formats
as gray etc.
2023-05-30 14:41:01 -04:00
Sophie Herold
50115d70c6
gdk: Add grayscale and alpha memory formats
2023-05-30 14:41:01 -04:00
Luca Bacci
1a058a41c9
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
2023-05-30 19:31:54 +02:00
Marco Trevisan (Treviño)
be4f6ff3da
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.
2023-05-30 17:59:19 +02:00
Marco Trevisan (Treviño)
4fcf899852
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.
2023-05-30 17:54:29 +02:00
Marco Trevisan (Treviño)
371e860184
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
2023-05-30 17:50:56 +02:00
Marco Trevisan (Treviño)
bce1e0bfdd
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.
2023-05-30 17:43:57 +02:00
Marco Trevisan (Treviño)
468d2cb7f2
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.
2023-05-30 17:42:59 +02:00
Jordi Mas
b520a5ceda
Update Catalan translation
2023-05-30 06:41:10 +02:00
Matthias Clasen
e6bc82cff5
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
2023-05-29 23:38:05 +00:00
Matthias Clasen
d021aa7bd2
Merge branch 'macos-fixes' into 'main'
...
For main
See merge request GNOME/gtk!6032
2023-05-29 23:37:22 +00:00
Benjamin Otte
3dc3d03a08
testsuite: Add conversion tests
...
Ensure we can convert from any format to any other format.
2023-05-30 00:42:10 +02:00
Benjamin Otte
788bd575d6
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.
2023-05-30 00:42:10 +02:00
Benjamin Otte
94a2dc4c47
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).
2023-05-30 00:42:10 +02:00
Benjamin Otte
169a7f83e6
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
2023-05-30 00:39:46 +02:00
Luca Bacci
703494c7fa
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.
2023-05-29 16:43:28 +02:00
Luca Bacci
d642072603
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
2023-05-29 16:43:28 +02:00
Lukáš Tyrychtr
ab7a4f64cb
GtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child
...
This one can occur when the stack has no pages.
2023-05-29 15:14:51 +02:00
Luca Bacci
21c53a1969
Merge branch 'win32-monitors' into 'main'
...
GdkWin32Monitor fixes
See merge request GNOME/gtk!6015
2023-05-29 09:50:30 +00:00
Matthias Clasen
ae2dd1d907
Merge branch 'matthiasc/for-main' into 'main'
...
css: Add a test for non-ASCII font family
See merge request GNOME/gtk!6028
2023-05-28 17:58:38 +00:00
Matthias Clasen
f10c234361
css: Add a test for non-ASCII font family
...
This came up in #5852 , so make sure that it works.
2023-05-28 07:57:40 -04:00
Matthias Clasen
3a650bff66
Merge branch 'matthiasc/for-main' into 'main'
...
Annotate more enum additions
See merge request GNOME/gtk!6027
2023-05-28 11:41:48 +00:00
Matthias Clasen
e9f622b81f
listitemmanager: Small docs clarifications
...
If we write docs for private functions,
lets make them relevant.
2023-05-28 07:19:02 -04:00
Matthias Clasen
a85ad2ce67
Annotate more enum additions
...
We have the technology now, lets use it.
2023-05-28 07:19:02 -04:00
Daniel Boles
2af7e45860
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
2023-05-28 11:35:44 +01:00
Matthias Clasen
2741e00210
Merge branch 'test-sections' into 'main'
...
testsections: A testbed for sections
See merge request GNOME/gtk!6025
2023-05-28 01:54:06 +00:00
Matthias Clasen
495411e16d
testsections: A testbed for sections
...
Add a simple test client that lets us compare
and explore the section handling in listview
and gridview.
2023-05-27 21:30:14 -04:00
Matthias Clasen
9880f9d16a
Merge branch 'slice-sections' into 'main'
...
Beef up our section models
Closes #5854
See merge request GNOME/gtk!6009
2023-05-28 01:00:04 +00:00
Matthias Clasen
5c1c22156c
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.
2023-05-27 20:37:28 -04:00
Matthias Clasen
d7e8c52d37
Merge branch 'fix-section-sorter-keys' into 'main'
...
sortlistmodel: Fix handling of section sort keys
Closes #5854
See merge request GNOME/gtk!6024
2023-05-27 23:37:35 +00:00
Matthias Clasen
c3d3e2d47b
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
2023-05-27 19:09:05 -04:00
Matthias Clasen
9c1049e710
multiselection: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
a1352a88ff
singleselection: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
8825917140
noselection: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
ba8d4902b5
filterlistmodel: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
8f3d3ca587
slicelistmodel: Pass through sections
...
Implement GtkSectionModel in the obvious way.
Tests included.
2023-05-27 17:27:19 -04:00
Matthias Clasen
aeba1e08e8
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.
2023-05-27 17:27:19 -04:00
Matthias Clasen
9f47bfe193
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
2023-05-27 17:27:19 -04:00
Benjamin Otte
43417e9e55
Merge branch 'columnview-sections' into 'main'
...
Columnview sections
See merge request GNOME/gtk!6006
2023-05-27 18:51:12 +00:00
Matthias Clasen
bbb7446e93
Merge branch 'matthiasc/for-main' into 'main'
...
docs: Cosmetics
See merge request GNOME/gtk!6023
2023-05-27 18:42:34 +00:00
Matthias Clasen
6623baeb52
docs: Cosmetics
2023-05-27 14:40:49 -04:00
Matthias Clasen
d90b09f8c3
Merge branch 'matthiasc/for-main' into 'main'
...
sortlistmodel: Cosmetics
See merge request GNOME/gtk!6022
2023-05-27 18:30:37 +00:00
Matthias Clasen
bcae6271df
Merge branch 'handle-sections-changed' into 'main'
...
wip: list widgets: handle sections-changed
See merge request GNOME/gtk!6011
2023-05-27 17:55:00 +00:00
Matthias Clasen
fc524ed346
Cosmetics
...
Fix copy-paste errors in line 1.
2023-05-27 13:51:39 -04:00
Matthias Clasen
c80a0c0e85
sortlistmodel: Cosmetics
...
Make the set_[section]_sorter functions a bit more symmetric.
2023-05-27 13:47:46 -04:00
Matthias Clasen
7572f2ed87
columnview: Add section plumbing
...
Add a header-factory property, and pass it through
to the listview.
2023-05-27 13:39:55 -04:00
Matthias Clasen
54ec750238
Merge branch 'matthiasc/for-main' into 'main'
...
gtk: Annotate new enum values
See merge request GNOME/gtk!6021
2023-05-27 13:35:27 +00:00
Matthias Clasen
5d78cf6546
Merge branch 'wip/kabus/popover-direction' into 'main'
...
gtk/popover: Flip anchoring direction in RTL
Closes #5847
See merge request GNOME/gtk!6020
2023-05-27 13:19:28 +00:00
Khalid Abu Shawarib
d329b00bda
gtk/popover: Flip anchoring direction in RTL
2023-05-27 13:19:28 +00:00
Matthias Clasen
ddf1ea9917
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.
2023-05-27 08:02:15 -04:00
Matthias Clasen
215f60e450
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.
2023-05-27 06:33:50 -04:00
Sabri Ünal
87070e0bdd
Update Turkish translation
2023-05-26 22:48:53 +00:00
Matthias Clasen
19f51b5de2
Merge branch 'docs/gdk-RGBA-parse' into 'main'
...
docs: add HSL to Gdk.RGBA.parse
See merge request GNOME/gtk!6017
2023-05-25 17:40:08 +00:00
FineFindus
2d8c112f08
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.
2023-05-25 17:16:55 +02:00
Matthias Clasen
f1901081a6
NEWS: Updates
2023-05-24 22:03:48 -04:00
Jason Francis
cf79ad4433
win32: implement fullscreen_on_monitor
...
Track the HMONITOR so it can be used by the toplevel layout.
2023-05-24 18:48:37 -04:00
Benjamin Otte
d912628583
Merge branch 'wip/otte/for-main' into 'main'
...
2 GDK GL XWayland improvements
See merge request GNOME/gtk!6014
2023-05-24 22:22:48 +00:00
Jason Francis
f254ab700c
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).
2023-05-24 17:34:34 -04:00
Benjamin Otte
c7b62d89e3
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,
2023-05-24 21:44:43 +02:00
Benjamin Otte
46e3454eb7
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.
2023-05-24 21:44:43 +02:00
Benjamin Otte
7573a9d2a7
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.
2023-05-24 21:44:29 +02:00
Carlos Garnacho
d24d193301
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
2023-05-24 14:23:47 +00:00
José Expósito
e61938793a
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
2023-05-24 13:42:49 +00:00
Matthias Clasen
2f584c16f0
Merge branch 'reomveunused' into 'main'
...
widget: Don't include gtkpopover.h
See merge request GNOME/gtk!6012
2023-05-23 23:49:25 +00:00
Maximiliano Sandoval R
2565a28e59
widget: Don't include gtkpopover.h
...
It is not used.
2023-05-23 23:43:15 +02:00
Emmanuele Bassi
793a2b2a70
Merge branch 'zbrown/marshallers' into 'main'
...
marshallers: fix up some mistypes in drags
See merge request GNOME/gtk!6010
2023-05-23 13:50:26 +00:00
Matthias Clasen
146223cd74
Merge branch 'fix-menu-padding' into 'main'
...
menus: Avoid unnecessary right padding
Closes #5839
See merge request GNOME/gtk!6008
2023-05-22 20:50:56 +00:00
Daniel Boles
d8e7f0a8a9
MenuButton: Fix small grammar-o/match related syms
2023-05-22 21:39:36 +01:00
Matthias Clasen
a9adf7163f
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
2023-05-22 16:16:45 -04:00
Matthias Clasen
10825cdc72
Merge branch 'matthiasc/for-main' into 'main'
...
widget-factory: Align some widgets better
See merge request GNOME/gtk!6007
2023-05-22 13:17:58 +00:00
Matthias Clasen
3b105a637c
widget-factory: Align some widgets better
2023-05-22 08:36:13 -04:00
Matthias Clasen
fdbc203690
Merge branch 'wip/kabus/date-leak' into 'main'
...
gtk/recentmanager: Fix date leak
Closes #5842
See merge request GNOME/gtk!6005
2023-05-22 12:25:24 +00:00
Khalid Abu Shawarib
26c583227e
gtk/recentmanager: Fix date leak
2023-05-22 12:25:24 +00:00
Арсений Засыпкин
1ea0bebf15
Update Russian translation
2023-05-22 12:18:13 +00:00
Matthias Clasen
ca0e27ec9d
Merge branch 'matthiasc/for-main' into 'main'
...
Improve section model docs
See merge request GNOME/gtk!6003
2023-05-21 23:57:48 +00:00
Matthias Clasen
5edf9fc449
Merge branch 'fm-showitems' into 'main'
...
filelauncher: Use ShowItems to show in File Manager
Closes #5842
See merge request GNOME/gtk!5997
2023-05-21 23:22:57 +00:00
Matthias Clasen
534f11e317
Improve section model docs
...
Mention sections in the list widget overview,
and document the list models that support sections.
2023-05-21 19:20:08 -04:00
Zander Brown
d8cffa9350
marshallers: fix up some mistypes in drags
...
Fix: ff330668cf
2023-05-21 19:14:45 +01:00
Matthias Clasen
60dfa777f0
Merge branch 'gdk-introspection-fix' into 'main'
...
introspection: Include deprecated gdk api in gir
See merge request GNOME/gtk!5999
2023-05-21 14:25:59 +00:00
Matthias Clasen
d6fc0d6c94
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.
2023-05-21 09:46:49 -04:00
Matthias Clasen
4e71bd92aa
introspection: Include deprecated gdk api in gir
...
This was overlooked in when the headers were moved
in ed265f6a7e
.
2023-05-21 09:39:13 -04:00
Matthias Clasen
8aec42244e
Merge branch 'ebassi/build-introspection' into 'main'
...
ci: Add introspection to the feature flags
See merge request GNOME/gtk!6000
2023-05-21 12:20:12 +00:00
Emmanuele Bassi
6ff36977f4
ci: Add introspection to the feature flags
...
It should be enabled by default, if we ever want to catch issues.
2023-05-21 12:22:50 +01:00
Matthias Clasen
ed84ccdaca
Merge branch 'docs-css-fix' into 'main'
...
Fix typo in CSS docs
See merge request GNOME/gtk!5998
2023-05-21 11:02:45 +00:00
Arjan Molenaar
d9ec27ab29
Fix typo in CSS docs
2023-05-21 12:11:19 +02:00
Matthias Clasen
ca744b925e
Merge branch 'list-tile-gc' into 'main'
...
Add gtk_list_item_manager_gc_tiles
See merge request GNOME/gtk!5995
2023-05-21 00:51:00 +00:00
Matthias Clasen
53c63673e4
gridview: Use gtk_list_item_manager_gc_tiles
...
This simplifies the code a bit.
2023-05-20 19:50:11 -04:00
Matthias Clasen
431458ed78
listview: Use gtk_list_item_manager_gc_tiles
...
This simplifies the code a bit.
2023-05-20 19:50:11 -04:00
Matthias Clasen
56cfef3544
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.
2023-05-20 19:50:11 -04:00
Calvin Walton
be897646b1
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
2023-05-20 19:40:09 -04:00
Matthias Clasen
e23358e09f
Merge branch 'matthiasc/for-main' into 'main'
...
Cosmetics
See merge request GNOME/gtk!5996
2023-05-20 23:22:56 +00:00
Matthias Clasen
833e1bdcf6
Cosmetics
...
Fix some typos.
2023-05-20 19:03:41 -04:00
Matthias Clasen
0091425729
listitemmanager: Stop exporting tile_gc
...
This function is now just used internally,
so make it static.
2023-05-20 18:59:16 -04:00
Matthias Clasen
b1c2a1c015
listitemmanager: Use gc_tiles
...
Replace an open-coded version of this function
with a call to gtk_list_item_manager_gc_tiles.
2023-05-20 18:59:16 -04:00
Matthias Clasen
31d03f9f26
Add gtk_list_item_manager_gc_tiles
...
This will allow us to simplify size allocation
code in listview and gridview.
2023-05-20 16:17:11 -04:00
Benjamin Otte
3beaf0962c
Merge branch 'drop-filler-tiles' into 'main'
...
Drop the FILLER tile type
See merge request GNOME/gtk!5993
2023-05-20 17:18:53 +00:00
Matthias Clasen
48e49b4c50
gridview: Update factories in set_factory
...
Call update_factories() so the children get their
factories properly updated.
This matches what GtkListView does.
2023-05-20 12:53:39 -04:00
Matthias Clasen
1d4f383ba5
Drop the FILLER tile type
...
It is not used anymore.
2023-05-20 12:28:19 -04:00
Matthias Clasen
8cb3e01eef
gridview: Stop using a filler tile
...
We can just use the footer to fill that space.
2023-05-20 12:28:19 -04:00
Matthias Clasen
42a0dcc7e4
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.
2023-05-20 12:26:51 -04:00
Matthias Clasen
e9731fc99b
Add some tile helpers
2023-05-20 12:26:39 -04:00
Matthias Clasen
2890557236
Revert "gridview: GC tiles first"
...
This reverts commit e121a5ca6f
.
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.
2023-05-20 12:25:33 -04:00
Matthias Clasen
43a22bb350
Cosmetics
...
Use the proper g_assert variant.
2023-05-20 07:39:21 -04:00
Matthias Clasen
cd9c277820
Merge branch 'ci-clang-build' into 'main'
...
ci: Add a clang build
See merge request GNOME/gtk!5987
2023-05-18 19:10:52 +00:00
Matthias Clasen
42a12f1788
ci: Add a clang build
...
This is meant to catch build errors with clang.
2023-05-18 14:39:46 -04:00
Matthias Clasen
5f39820729
cups: Silence a compiler warning
...
Bitfields should be unsigned int.
2023-05-18 14:39:46 -04:00
Matthias Clasen
c2a8620660
gsk: Mark some variables as unused
...
Hopefully that shuts up clang.
2023-05-18 13:29:28 -04:00
Asier Sarasua Garmendia
647d5e17c1
Update Basque translation
...
(cherry picked from commit a6931a66c5
)
2023-05-18 16:31:00 +00:00
Matthias Clasen
d87b9ee4c5
Merge branch 'matthiasc/for-main' into 'main'
...
roaring: Mark a variable as unused
See merge request GNOME/gtk!5990
2023-05-18 13:35:17 +00:00
Matthias Clasen
70ba00ae53
testsuite: Make this test compile
...
clang did not like this creative use of
strings at all. Rightfully so.
2023-05-18 08:40:50 -04:00
Matthias Clasen
c4fb473d4b
roaring: Mark a variable as unused
...
Otherwise clang complains.
2023-05-18 08:34:48 -04:00
Matthias Clasen
b4fbd74f98
Merge branch 'fina/scrolled-window-measure' into 'main'
...
scrolledwindow: Propagate child measure size whenever possible
Closes #5838
See merge request GNOME/gtk!5986
2023-05-18 12:26:05 +00:00
Fina Wilke
7fae0bc0de
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.
2023-05-18 13:25:20 +02:00
Benjamin Otte
89b61eeec4
Merge branch 'listview-factory-leak' into 'main'
...
listview: Don't leak the factories
See merge request GNOME/gtk!5989
2023-05-17 18:57:28 +00:00
Matthias Clasen
e2492dd568
gridview: Don't leak the factory
2023-05-17 14:32:55 -04:00
Matthias Clasen
ca000287fc
listview: Don't leak the factories
2023-05-17 14:17:47 -04:00
Benjamin Otte
ff14fea672
Merge branch 'fix-gridview-critical' into 'main'
...
gridview: GC tiles first
Closes #5836
See merge request GNOME/gtk!5988
2023-05-17 17:04:43 +00:00
Matthias Clasen
e121a5ca6f
gridview: GC tiles first
...
Before checking that there are no tiles,
we need to gc any possibly leftover filler
tiles.
Fixes : #5836
2023-05-17 12:31:16 -04:00
Matthias Clasen
e79851502c
Merge branch 'pathbar-early-return-on-cancellation' into 'main'
...
pathbar: Fail setting the path on cancellation
Closes #5792
See merge request GNOME/gtk!5982
2023-05-17 10:15:26 +00:00
Matthias Clasen
0132ab046b
Merge branch 'matthiasc/for-main' into 'main'
...
Reduce pixbuf helpers
See merge request GNOME/gtk!5984
2023-05-17 10:14:44 +00:00
Matthias Clasen
c2ba1d69a1
Rename pixbuf utils to texture utils
...
That is what this is now.
2023-05-16 22:00:08 -04:00
Matthias Clasen
847739aed7
Reduce pixbuf helpers
...
Concentrate pixbuf handling in gdkpixbufutils.c.
2023-05-16 21:56:22 -04:00
Matthias Clasen
4d66598f31
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Cosmetics
See merge request GNOME/gtk!5983
2023-05-17 00:58:48 +00:00
Matthias Clasen
2ec1bd7248
Merge branch 'gl-renderer-more-defensive' into 'main'
...
gsk: Stop setting uniforms when we are out of batches
See merge request GNOME/gtk!5981
2023-05-17 00:29:40 +00:00
Benjamin Otte
646d1a8923
Merge branch 'wip/otte/ci-emergency' into 'main'
...
CI: Actually build our code
See merge request GNOME/gtk!5980
2023-05-17 00:19:06 +00:00
Matthias Clasen
4a8a6e9f70
gsk: Don't build unused functions
...
The only caller is #if 0 ed, so don't build
these functions.
2023-05-16 20:13:57 -04:00
Matthias Clasen
0a9d25c9e8
gsk: Cosmetics
...
Get the context from the driver.
2023-05-16 20:13:57 -04:00
Matthias Clasen
188677724c
Improve test coverage for property lookup models
2023-05-16 20:13:57 -04:00
Olivier Crête
22cd3ea268
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
2023-05-17 01:10:23 +01:00
Matthias Clasen
71a231b71d
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.
2023-05-16 20:03:19 -04:00
Benjamin Otte
112fe06323
glrenderer: Remove unused function
...
Thanks, macos CI.
(We should have a Fedora clang build.)
2023-05-17 01:52:42 +02:00
Benjamin Otte
8bcb918de5
tests: Remove some tests
...
They are failing to build because they use deprecated functions and
nobody thinks they're worth fixing.
2023-05-17 01:24:22 +02:00
Benjamin Otte
6f6293c38c
CI: Actually build our code
...
Commit 3090795351
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.
2023-05-17 00:56:23 +02:00
Matthias Clasen
1b885cc317
Merge branch 'fix-gsk-assertions' into 'main'
...
gsk: Fix a crash
See merge request GNOME/gtk!5979
2023-05-16 22:20:51 +00:00
Matthias Clasen
9dd83ab354
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.
2023-05-16 17:33:21 -04:00
Matthias Clasen
0bbc6f8932
Merge branch 'ebassi/issue-5837' into 'main'
...
Fix various compiler warnings with GCC 13
Closes #5837
See merge request GNOME/gtk!5977
2023-05-16 21:28:29 +00:00
Emmanuele Bassi
1ad4c04b2a
Replace deprecated CSS loading API
...
Use gtk_css_provider_load_from_string() when loading CSS from C
strings.
2023-05-16 16:59:05 -04:00
Emmanuele Bassi
0bbe68db0b
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
2023-05-16 16:59:05 -04:00
Emmanuele Bassi
b2a3a5e226
Fix various compiler warnings with GCC 13
...
There are various null dereference warnings in GtkListItemManager that
make the build noisy.
2023-05-16 16:59:05 -04:00
Matthias Clasen
0434ad3bd9
Merge branch 'no-deprecations-in-demos' into 'main'
...
demos: Stop using deprecated api
See merge request GNOME/gtk!5978
2023-05-16 20:51:01 +00:00
Matthias Clasen
9d3046f187
Merge branch 'matthiasc/for-main' into 'main'
...
Matthiasc/for main
See merge request GNOME/gtk!5975
2023-05-16 20:42:27 +00:00
Matthias Clasen
6b2c088a29
demos: Stop using deprecated api
...
Use texture apis instead of pixbuf ones.
2023-05-16 16:25:59 -04:00
Matthias Clasen
4efc736a6e
Merge branch 'wip/otte/for-main' into 'main'
...
gdk: Clamp frame region to surface size
Closes #5812
See merge request GNOME/gtk!5976
2023-05-16 17:25:17 +00:00
Benjamin Otte
2b0e3a5b1a
nodeparser: Move an error check
...
By putting the check earlier, it will be emitted for the right token.
2023-05-16 18:53:53 +02:00
Benjamin Otte
bac41ce644
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.
2023-05-16 18:53:53 +02:00
Benjamin Otte
2b0ad09423
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.
2023-05-16 18:53:27 +02:00
Benjamin Otte
f5955feea1
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.
2023-05-16 18:53:27 +02:00
Benjamin Otte
853e8719c6
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.
2023-05-16 18:53:27 +02:00
Benjamin Otte
8d528350b9
rendernode: clip when drawing shadows
...
Ensures the shadow stays small.
2023-05-16 18:53:27 +02:00
Benjamin Otte
d51c92f54d
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.
2023-05-16 18:53:27 +02:00
Benjamin Otte
b9bd7124c0
vulkan: Fix typo in clipping code
2023-05-16 18:53:27 +02:00
Benjamin Otte
14f67550d0
build: Add a new gcc 13 warning
...
We don't trigger it and it's a useful warning. So let's use it.
2023-05-16 18:53:27 +02:00
Benjamin Otte
ee6ef41e71
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.
2023-05-16 18:53:27 +02:00
Benjamin Otte
fde3d2cd50
testsuite: Add testcase for z clipping
...
the near and far clipping plane are at -10000 and 10000 respectively.
Test that the renderers respect that.
2023-05-16 18:53:27 +02:00
Benjamin Otte
099955b0c0
gridview: Add border-spacing where it was missed
...
We were computing column widths without taking border-spacing into
account, making them slightly too big.
2023-05-16 18:53:09 +02:00
Benjamin Otte
b530ade8c6
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
2023-05-16 18:53:09 +02:00
Matthias Clasen
3a9234dadc
Cosmetics
2023-05-16 12:33:12 -04:00
Matthias Clasen
3e27232028
Improve test coverage for sorters
2023-05-16 12:33:12 -04:00
Matthias Clasen
c2676ad785
Improve test coverage for GtkPropertyLookupListModel
2023-05-16 12:33:12 -04:00
Matthias Clasen
4a1598dc2a
Merge branch 'fix-property-lookup-model' into 'main'
...
Fix a few bugs in GtkPropertyLookupListModel
See merge request GNOME/gtk!5974
2023-05-16 16:31:35 +00:00
Matthias Clasen
5f70b00bea
Fix a few bugs in GtkPropertyLookupListModel
...
Fix bugs in property types.
2023-05-16 12:00:08 -04:00
Matthias Clasen
3377460fb8
Merge branch 'matthiasc/for-main' into 'main'
...
gdk: Drop some unused private api
See merge request GNOME/gtk!5973
2023-05-16 12:48:40 +00:00
Matthias Clasen
05a0aca5ab
Improve test coverage for GtkStringSorter
2023-05-15 23:21:06 -04:00
Matthias Clasen
9463e0f56c
Only build iconcache validator if it is used
2023-05-15 23:06:07 -04:00
Matthias Clasen
1c308431a6
Drop unneeded exports from gdkpixbufutils.c
2023-05-15 23:05:52 -04:00
Matthias Clasen
fb996f6e6d
Drop an unused include
2023-05-15 23:05:52 -04:00
Matthias Clasen
edfd37dfe2
docs: Mention pixbufs in the migration guide
2023-05-15 23:05:52 -04:00
Matthias Clasen
4bede73f62
Deprecate from-pixbuf apis for widgets
...
We want to drop GdkPixbuf from our apis.
These have easy replacements already, so
lets deprecate them.
2023-05-15 23:05:52 -04:00
Matthias Clasen
0b59290bad
gdk: Drop some unused private api
2023-05-15 20:30:38 -04:00
Matthias Clasen
e8c7d0e5ec
Merge branch 'wip/corey/filesystemmodel' into 'main'
...
filesystemmodel: Ignore changes on the parent directory
Closes #4233
See merge request GNOME/gtk!5970
2023-05-16 00:09:56 +00:00
Matthias Clasen
3fb06ca29d
Merge branch 'matthiasc/for-main' into 'main'
...
tools: Cosmetics
See merge request GNOME/gtk!5972
2023-05-16 00:02:15 +00:00
Matthias Clasen
013401b594
Fix texture tests with GLES
...
No sync for you if you're using GLES.
2023-05-15 19:11:35 -04:00
Matthias Clasen
484c4bdf22
Merge branch 'deprecate-pixbuf-apis' into 'main'
...
gdk: Deprecated some pixbuf apis
See merge request GNOME/gtk!5971
2023-05-15 23:03:42 +00:00
Corey Berla
133231e12b
filesystemmodel: Ignore changes on the parent directory
...
The filesystemmodel tracks changes and additions to child files
through G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED. This event will also
occur if the parent directory is changed. Since the parent directory
doesn't exist in the model, it creates a non-existent item.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4233
2023-05-15 15:50:40 -07:00
Corey Berla
ef2024736d
filechooserwidget: Stop leaking file system models
2023-05-15 15:50:32 -07:00
Matthias Clasen
ed265f6a7e
gdk: Deprecated some pixbuf apis
...
These are already documented as 'don't use
in new apis'. Lets make it official and
deprecate them properly.
2023-05-15 18:22:37 -04:00
Matthias Clasen
0152286fa0
Improve test coverage for GdkGLContext
2023-05-15 16:49:12 -04:00
Corey Berla
4ef560d3b8
.gitignore: Ignore .flatpak-builder directory
2023-05-15 13:08:56 -07:00
Matthias Clasen
343472931d
Cosmetics
...
Linkify a reference.
2023-05-15 15:25:11 -04:00
Matthias Clasen
41b606b16d
Add tests for GdkTextureDownloader
2023-05-15 15:24:56 -04:00
Matthias Clasen
f83c00c928
Test gltexture update functionality
2023-05-15 12:50:28 -04:00
Matthias Clasen
f497cb2b6e
Improve gdk test coverage
2023-05-15 11:56:31 -04:00
Matthias Clasen
2f8c0b7aec
tools: Cosmetics
...
Make gtk-builder-tool screenshot be quiet unless
it had to make up a filename. And tweak --help
output a bit.
2023-05-15 08:03:20 -04:00
Matthias Clasen
d517b25ea3
Merge branch 'export-handles-properly' into 'main'
...
Add testfilelauncher
See merge request GNOME/gtk!5968
2023-05-15 10:12:29 +00:00
Matthias Clasen
37345670c8
Add testfilelauncher
...
This is a test to use GtkFileLauncher a bit
more intensively than usual.
2023-05-15 00:20:24 -04:00
Matthias Clasen
89d993b6ec
wayland: Try harder to be compatible
...
We can keep the old unexport_handle api working
in the case that there is only a single exported
handle.
2023-05-15 00:20:24 -04:00
Matthias Clasen
250a5c0dfd
Deprecate gdk_wayland_toplevel_unexport_handle
...
It doesn't do anything anymore, and is no longer
used internally. The replacement is
gdk_wayland_toplevel_drop_exported_handled().
2023-05-15 00:20:24 -04:00
Matthias Clasen
af3ceb5755
wayland: Reimplement exporting
...
Change things so that every call to export_handle
creates a new handle, and unexport_handle destroys
the handle that it is given.
2023-05-14 23:49:44 -04:00
Matthias Clasen
982a696311
wayland: Give toplevels a destroy hook
...
We will need to do some cleanup before the
wl_surface is destroyed, so add a hook for that.
2023-05-14 23:49:44 -04:00
Matthias Clasen
e5f1e4545d
gdk: Change the private export handle api
...
Make unexport_handle take the handle, so we
can in the future deal with multiple exports.
Update the one caller in gtkwindow.c to pass
the handle.
2023-05-14 23:49:44 -04:00
Matthias Clasen
bf87a40b20
wayland: Add new backend api
...
Add an alternative to unexport_handle that
does take the handle.
2023-05-14 23:49:44 -04:00
Matthias Clasen
18b8baaf25
Merge branch 'input-doc-fixes' into 'main'
...
GTK reference docs: Some fixes
See merge request GNOME/gtk!5969
2023-05-14 21:49:10 +00:00
Matthias Clasen
4c69192837
gtk: Change the private export handle api
...
Make unexport_handle take the handle, which will
let us deal with multiple exports in the future.
Update all callers to store their handle, and
pass it to unexport_handle.
2023-05-14 17:19:45 -04:00
FeRD (Frank Dana)
c01be6cac7
doc/actions: Fix end-of-file :
...
The actions document ended with a : where there used to be a period,
seemingly a bug in the conversion from XML. Replace that : with a
period, and remove another spurious : inserted during the conversion.
2023-05-14 17:01:38 -04:00
FeRD (Frank Dana)
8b4e7a638c
docs/input: <kbd>␣</kbd> => <kbd>Space</kbd>
...
- Switch to semantic newlines, where adding <kbd> caused wrapped text
to grow wider than 80 characters on some lines.
2023-05-14 16:23:41 -04:00
FeRD (Frank Dana)
59acec21d4
docs/input-handling: A few more <kbd> wrappings
...
- Format a few missed keypresses/combos using <kbd>
- Switch to semantic newlines for those (paragraphs, bullet points)
2023-05-14 16:20:33 -04:00
Matthias Clasen
38f610f85e
Fix a typo
2023-05-14 13:26:14 -04:00
Matthias Clasen
5393173afa
wayland: Remove some unused fields
2023-05-14 13:06:00 -04:00
Matthias Clasen
951b448e90
Merge branch 'matthiasc/for-main' into 'main'
...
Add a README to examples/hello
See merge request GNOME/gtk!5967
2023-05-14 16:58:44 +00:00
Matthias Clasen
51ad2a55a8
gdk: Add an assertion
...
We simply overwrite any previous region,
so assert that the field was NULL before.
2023-05-14 07:50:11 -04:00
Matthias Clasen
e50209a535
Add more texture load tests
...
Add some tests for handling of failures.
The test data here is taking from gdk-pixbufs
tests/test-images/fail directory, excluding anything
but png, tiff and jpg images.
2023-05-14 07:50:11 -04:00
Matthias Clasen
d6430995ad
Improve gdk test coverage
...
Test the loadable icon implementation of GdkTexture.
2023-05-14 07:50:11 -04:00
FeRD (Frank Dana)
9b1026886b
docs/input-handling: Don't leave reader hanging
...
Strangely, the document's last sentence ended with a colon,
giving the impression there's missing text that should follow.
There is not.
Even more strange, it's _always_ ended with a colon,
ever since the file was converted from XML
(in commit 10cd539104
).
BUT, the XML file it was converted _from_ ended that same sentence
with a period! I have no idea where the colon came from.
2023-05-14 05:29:18 -04:00
Matthias Clasen
cea15fc63e
Improve gdk test coverage
...
Add tests for GdkToplevvelLayout and
GdkPopupLayout.
2023-05-13 21:56:29 -04:00
Matthias Clasen
f99fbab24f
docs: Mention the current build options
...
Some of these got renamed recently.
2023-05-13 21:56:29 -04:00
Matthias Clasen
6acd4361ab
ci: Stop using deprecated build options
...
demos got renamed to build-demos.
2023-05-13 21:56:29 -04:00
Matthias Clasen
05f488011a
Add a README to examples/hello
...
Just so nobody wonders why there's a meson.build
in this subdirectory.
2023-05-13 21:56:29 -04:00
Georges Basile Stavracas Neto
ef7679235a
Merge branch 'revert-78f68d79' into 'main'
...
Revert "Merge branch 'gbsneto/css-parser-annotation' into 'main'"
See merge request GNOME/gtk!5965
2023-05-14 00:37:47 +00:00
Matthias Clasen
d65f9b298c
Merge branch 'new-css-load-apis' into 'main'
...
Add new css provider load apis
See merge request GNOME/gtk!5966
2023-05-14 00:27:23 +00:00
Matthias Clasen
5c9de08159
Deprecate gtk_css_provider_load_From_data
2023-05-13 20:00:36 -04:00
Matthias Clasen
f2a297f56d
Stop using gtk_css_provider_load_from_data
2023-05-13 19:59:17 -04:00
Matthias Clasen
a1d9cb8ad6
Add new css provider load apis
...
gtk_css_provider_load_from_data has turned out
to be problematic for language bindings. Add two
new variants, from_string and from_bytes, to
replace it.
2023-05-13 19:46:29 -04:00
Emmanuele Bassi
8da911db81
Revert "Merge branch 'gbsneto/css-parser-annotation' into 'main'"
...
This reverts merge request !5964
2023-05-13 21:53:04 +00:00
Georges Basile Stavracas Neto
78f68d7992
Merge branch 'gbsneto/css-parser-annotation' into 'main'
...
gtk/css-provider: Add back array length annotation
See merge request GNOME/gtk!5964
2023-05-13 20:51:00 +00:00
Georges Basile Stavracas Neto
8a190b200b
gtk/css-provider: Add back array length annotation
...
This partially reverts commit 93a875bf20
.
Removing this annotation broke bindings, which now treat the
length of the array as a standalone parameter.
This broke Spiel, and probably other non-C apps that rely on
GtkCssProvider through bindings.
2023-05-13 17:18:21 -03:00
Matthias Clasen
e72b4ae6e2
Merge branch 'more-marshaller-cleanup' into 'main'
...
Add missing va marshallers
See merge request GNOME/gtk!5963
2023-05-13 19:46:30 +00:00
Daniel Boles
9f1f4850fe
Widget: Fix doubled word need, missing possessives
2023-05-13 18:17:17 +01:00
Matthias Clasen
0b9e5e6db4
Drop duplication between marshallers
...
gtk and gdk have their own marshallers, for historic
reasons. But there's no reason to duplicate the same
code here.
Eventually, we should just move all marshallers to
the same place.
2023-05-13 12:50:45 -04:00
Matthias Clasen
2cd5b4df1b
Add missing va marshallers
...
Whenever we pass a marshaller to g_signal_new,
call g_signal_set_va_marshaller with the corresponding
va marshaller.
2023-05-13 12:38:24 -04:00
Matthias Clasen
57a070fc8d
Merge branch 'marshaller-cleanup' into 'main'
...
Avoid generic marshallers
See merge request GNOME/gtk!5962
2023-05-13 15:35:14 +00:00
Matthias Clasen
ccc6b7165e
Drop unused marshallers
...
This list was found by a combination of
grep, sed, and sort.
2023-05-13 11:15:49 -04:00
Matthias Clasen
ff330668cf
Avoid generic marshallers
...
The libffi-based generic marshallers give sysprof
difficulties in getting good stacktraces, so avoid
them.
2023-05-13 11:15:49 -04:00
Matthias Clasen
63f9e5453d
Merge branch 'matthiasc/for-main' into 'main'
...
popover: Stop making assumptions about corners
See merge request GNOME/gtk!5961
2023-05-13 12:40:35 +00:00
Matthias Clasen
f849823a07
popover: Stop making assumptions about corners
...
The popover tail drawing code was just assuming that
the corner values are numbers. Which they won't, anymore.
2023-05-13 07:36:35 -04:00
Matthias Clasen
9a2d6d6d88
Improve css parser test coverage
2023-05-13 07:36:28 -04:00
Matthias Clasen
72c37d566c
Merge branch 'matthiasc/for-main' into 'main'
...
css: Fix transition of font features
See merge request GNOME/gtk!5957
2023-05-13 02:02:48 +00:00
Matthias Clasen
01c0d5e04b
Merge branch 'volumemedia' into 'main'
...
mediacontrols: Set valign=center on volume button
See merge request GNOME/gtk!5955
2023-05-13 01:43:59 +00:00
Matthias Clasen
57dd88ee53
testsuite: Cosmetics
2023-05-12 19:52:42 -04:00
Matthias Clasen
8c92c619de
Test the deprecation support
...
Test gtk4-builder-tool validate --deprecations
2023-05-12 19:52:42 -04:00
Matthias Clasen
78d2002965
Add tests for gtk4-builder-tool enumerate
2023-05-12 19:52:42 -04:00
Matthias Clasen
25c4acb6d2
Add tests for hsv<>rgb conversion
2023-05-12 19:52:42 -04:00
Matthias Clasen
0a3dac10c6
Improve test coverage for the css parser
2023-05-12 19:52:42 -04:00
Matthias Clasen
c9afcd31c2
css: Improve transition test coverage
2023-05-12 19:52:42 -04:00
Matthias Clasen
3565facdaf
css: Fix initial rotate transform value
2023-05-12 19:52:42 -04:00
Matthias Clasen
494cff94d6
css: Make some corner values static
...
Provide static value for uniform corners
with lengths from 0 to 8px. This covers
the majority of corners in widget-factory.
2023-05-12 15:00:13 -04:00
Matthias Clasen
17644b12a5
css: More static length values
...
Make all length values from 0px to 8px available
as static values. This will help with cutting
down on the number of corner values (we have a
lot of 5px corners).
2023-05-12 14:50:02 -04:00
Matthias Clasen
54ff5d8edd
Revert "css: Simplify default values"
...
This reverts commit 1efa39672b
.
We want to use corner values for corner properties.
2023-05-12 14:50:02 -04:00
Matthias Clasen
b18320fe05
Revert "csscornervalue: Accept other values if x == y"
...
This reverts commit 1f2f2777e1
.
It broke transitioning of corner values.
2023-05-12 14:50:02 -04:00
Jordi Mas
0ce60ad214
Update Catalan translation
2023-05-12 19:42:35 +02:00
Matthias Clasen
76642f2bf9
css: Correct initial shadow filter values
...
This was using numbers instead of lengths,
causing confusion in the transition code.
2023-05-12 13:15:35 -04:00
Guillaume Bernard
fcac150641
Update French translation
2023-05-12 13:24:14 +00:00
Matthias Clasen
4d13c61aaf
css: Fix transition of font features
...
If we store ints as values, we better use
g_hash_table_lookup_extended, or zeros will
show up as missing values.
2023-05-12 09:13:00 -04:00
Matthias Clasen
09bab2b2df
Improve css parser test coverage
2023-05-12 08:38:39 -04:00
Maximiliano Sandoval R
b44f43e996
mediacontrols: Set valign=center on volume button
...
To match the play button.
2023-05-12 11:35:53 +02:00
Daniel Boles
52fa641dff
Overlay: Add minimal doc blurb for property :child
2023-05-12 10:30:37 +01:00
Matthias Clasen
a3ebc0329d
Improve test coverage for list models
2023-05-11 23:24:23 -04:00
Matthias Clasen
8dc04d3fc8
Merge branch 'matthiasc/for-main' into 'main'
...
Add a little wait to focus tests
See merge request GNOME/gtk!5954
2023-05-12 02:41:26 +00:00
Matthias Clasen
ba64e5588d
Add a little wait to focus tests
...
I don't know exactly why, but this seems
to help the tests not fail on X11.
2023-05-11 22:24:10 -04:00
Matthias Clasen
fcdcdb7e78
Merge branch 'matthiasc/for-main' into 'main'
...
ci: Use the same options for the scan-build job
See merge request GNOME/gtk!5953
2023-05-12 02:08:37 +00:00
Matthias Clasen
3d5789a66e
Merge branch 'validate-uris' into 'main'
...
urilauncher: Validate the uri
Closes #5829
See merge request GNOME/gtk!5952
2023-05-12 00:19:07 +00:00
Matthias Clasen
59343e4efb
gtk-demo: Rename the new Settings demo
...
"v2" does not look great in the sidebar.
Lets call this "Alternative Settings".
2023-05-11 20:14:58 -04:00
Matthias Clasen
41219ae489
gtk-demo: Fix a typo
2023-05-11 19:53:42 -04:00
Matthias Clasen
7055250692
ci: Stop special-casing broadway
...
We are not running the broadway tests anymore,
so no need to special-case them in the run-test.sh
script either.
2023-05-11 19:53:03 -04:00
Matthias Clasen
98f63d09c0
ci: Use the same options for the scan-build job
...
In particular, not building the tests should
help cutting down on time spent linking.
2023-05-11 19:53:03 -04:00
Matthias Clasen
85b9a6f1b0
urilauncher: Validate the uri
...
We don't want to send nonsense to the portal.
Fixes : #5829
2023-05-11 18:34:26 -04:00
Matthias Clasen
3353eac289
Merge branch 'fix-focus-tests' into 'main'
...
spinbutton: Update baseline child
See merge request GNOME/gtk!5950
2023-05-11 22:28:46 +00:00
Matthias Clasen
cdc135f11d
Merge branch 'shortcuts-focus' into 'main'
...
theme: Show focus in shortcuts windows
See merge request GNOME/gtk!5951
2023-05-11 20:16:07 +00:00
Matthias Clasen
069ce48ac5
theme: Show focus in shortcuts windows
...
The individual items are now focusable,
so we need to show a focus ring, otherwise
this is just confusing.
2023-05-11 15:58:15 -04:00
Matthias Clasen
625c7c3d26
widgetfocus: Sort children better for TAB
...
When tabbing in a box, we really want to sort
children just along the main axis. Make it so.
2023-05-11 15:35:27 -04:00
Matthias Clasen
4ea2aac561
spinbutton: Update baseline child
...
When the orientation changes, the entry changes
position, so we need to update baseline-child to match.
2023-05-11 15:34:44 -04:00
Matthias Clasen
e88e31dde2
Merge branch 'balance-ci-jobs' into 'main'
...
ci: Balance the work between jobs
See merge request GNOME/gtk!5949
2023-05-11 13:47:56 +00:00
Matthias Clasen
fb2e67638d
testsuite: Simplify shader test
...
Simplify the shader to something GLES
will successfully compile.
2023-05-11 09:20:25 -04:00
Matthias Clasen
f11dd83ab5
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Dispose the driver when the display is closed
See merge request GNOME/gtk!5948
2023-05-11 13:11:56 +00:00
Matthias Clasen
92804b5b55
Drop the duplicate x11 testsuite run
...
We currently run the testsuite against x11 in both
the debug and release builds. Once ought to
be enough.
2023-05-11 08:52:48 -04:00
Matthias Clasen
87e7ea6080
ci: Balance the work between jobs
...
The fedora-x86-64 build does not only build with debug,
it also does the hello build, and it runs the testsuite
multiple times.
Move the hello build to the fedora release build. The idea
is that this lets us do more work in parallel, and spend
less time waiting for the longest-running ci job.
2023-05-11 08:39:38 -04:00
Matthias Clasen
b1945b38e8
ci: Drop the broadway test run
...
We are ignoring failures here, and nobody is working
on fixing them. And the failures end up at the end
of the log, adding annoyance to finding the actual
failures.
2023-05-11 08:34:14 -04:00
Matthias Clasen
13ca3187f2
testsuite: fix another surface unref warning
2023-05-11 06:40:57 -04:00
Matthias Clasen
18fd506360
build: Cosmetics
2023-05-11 06:13:42 -04:00
Matthias Clasen
9faf1a0377
gsk: Comment out some debug code
...
The calls of these functions are #ifdef'ed out,
so no point in compiling these functions.
2023-05-11 06:13:42 -04:00
Matthias Clasen
1a9c03449e
gtk: Don't drop too many references
...
We only have one reference to the surface,
and it is dropped by gdk_surface_destroy.
All the users of surfaces in gtk had the same
bug: they were all stealing an extra reference
to drop - the one that the renderer was leaking
until recently.
2023-05-11 06:13:03 -04:00
Matthias Clasen
aee214b09d
gsk: Fix some renderer gotchas
...
unrealize() needs to clean up the surface that was set
in realize(), and both need to emit property change
notification.
2023-05-10 20:21:54 -04:00
Matthias Clasen
dc3003bc4d
gsk: Improve test coverage
...
Add more tests for gsk transforms, render node
and renderer apis.
2023-05-10 20:21:31 -04:00
Matthias Clasen
845f4b1536
gsk: Drop an unused function
2023-05-10 20:21:12 -04:00
Matthias Clasen
abbb3a2da6
testsuite: Close displays in the gsk tests
...
This gives us better coverage of the dispose
codepath for a driver that has actually been
used.
2023-05-10 20:21:12 -04:00
Matthias Clasen
1a93efecf3
gsk: Dispose the driver when the display is closed
...
This was the intention, but the object data by itself
does not achieve that: We do run dispose on the display
when it is closed, but object data is only cleared in
finalize. So listen to the ::closed signal and remove
the driver ourselves.
Fix up the drivers dispose implementation enough for
that to actually work.
2023-05-10 20:21:12 -04:00
Matthias Clasen
440d56a44f
Use gsk_matrix_transform_point3d consistently
2023-05-10 20:21:12 -04:00
Matthias Clasen
f10603e97d
Merge branch 'matthiasc/for-main' into 'main'
...
tests: Stop copying the tool tests
See merge request GNOME/gtk!5947
2023-05-10 10:38:07 +00:00
Matthias Clasen
9a9257d7be
tests: Don't disable vertex arrays
...
It doesn't work, and that makes tests fail.
2023-05-09 23:02:48 -04:00
Matthias Clasen
5c10f2b4cd
Improve coverage for half-float fallbacks
2023-05-09 23:02:30 -04:00
Matthias Clasen
ba6a618d44
build: Rename another option
2023-05-09 21:41:27 -04:00
Matthias Clasen
5fbeea3870
build: Deprecate an option
...
Rename the demos option to build-demos, to match
the other options for building optional parts.
2023-05-09 21:34:05 -04:00
Matthias Clasen
27368a418a
build: Require meson 0.63
...
This is needed for option deprecation.
2023-05-09 21:34:05 -04:00
Matthias Clasen
676cd1e673
tests: Stop copying the tool tests
...
No point in doing that, and the meson feature
we are using here is deprecated.
2023-05-09 21:21:39 -04:00
Matthias Clasen
d6a4c65bfa
Post-release version bump
2023-05-09 20:48:33 -04:00
Matthias Clasen
4695f583c1
4.11.2
2023-05-09 20:46:21 -04:00
Matthias Clasen
fa88d738dc
Update baseline docs a bit
2023-05-09 18:59:11 -04:00
Matthias Clasen
7841248c1d
Merge branch 'deprecate-align-value' into 'main'
...
Deprecate GTK_ALIGN_BASELINE
See merge request GNOME/gtk!5946
2023-05-09 20:53:59 +00:00
Matthias Clasen
ef5f34c985
Update tests
2023-05-09 16:36:07 -04:00
Matthias Clasen
1dfa54c117
Deprecate GTK_ALIGN_BASELINE
...
We can deprecated enum values now.
2023-05-09 14:28:26 -04:00
Matthias Clasen
ff920d98ec
Use GTK_ALIGN_BASELINE_FILL
...
Replace GTK_ALIGN_BASELINE with its new name
everywhere.
2023-05-09 14:28:26 -04:00
Matthias Clasen
91ca6d0851
Merge branch 'wip/ebassi/gen-version-macros' into 'main'
...
Generate version and deprecation macros at build time
See merge request GNOME/gtk!5945
2023-05-09 18:23:40 +00:00
Emmanuele Bassi
cdeeb3275a
build: Internal tests must set GTK_COMPILATION
...
Otherwise they won't be able to use the appropriate function visibility
on Windows.
2023-05-09 19:01:21 +01:00
Emmanuele Bassi
9d68bebdd1
Minimize the amount of inclusions in public headers
...
Public headers should mainly include gdktypes.h, which already include
the symbol visibility and versioning macros; we can also modify
gdktypes.h to include the enumerations.
2023-05-09 17:36:59 +01:00
Matthias Clasen
526ddfa866
Merge branch 'wip/otte/sections' into 'main'
...
Add GtkSectionModel
See merge request GNOME/gtk!5818
2023-05-09 16:36:55 +00:00
Matthias Clasen
d7b9d35c02
Use #pragma once
...
We switched over to using #pragma once, so lets
use it consistently, in generated headers as well.
2023-05-09 16:43:35 +01:00
Matthias Clasen
383c404792
Drop the gdk/gdkversionmacros.h header
...
It was just added to avoid touching too many files.
Touching them now.
2023-05-09 16:43:35 +01:00
Emmanuele Bassi
33d0cfd4f8
demos: Drop symbol visibility macros from demo types
...
Since the corresponding source files do not include "config.h", and are
not compiled with `GTK_COMPILATION`, they will generate the wrong symbol
exporting under Windows.
2023-05-09 16:43:35 +01:00
Emmanuele Bassi
43311f3a80
build: Minor style nitpicks
2023-05-09 16:43:35 +01:00
Emmanuele Bassi
265bc90524
build: Use Meson's gnu_symbol_visibility
...
Instead of injecting `-fvisibility=hidden` depending on a compiler check
ourselves, let Meson do it for us.
This also avoids us having to filter `-fvisibility=hidden` when reusing
the common compiler flags.
2023-05-09 16:43:25 +01:00
Matthias Clasen
197d921347
Add a missing file
2023-05-09 16:43:25 +01:00
Matthias Clasen
3d5529760a
Fix install location
2023-05-09 16:43:25 +01:00
Matthias Clasen
3a2c4be44b
Use GTK_COMPILATION throughout
...
It is a bit ugly that it doesn't fit the neat
namespace schema, but it is what we use everywhere.
2023-05-09 16:43:25 +01:00
Matthias Clasen
e216f469a1
Don't excessively define GDK_EXTERN
...
Once is enough.
2023-05-09 16:43:25 +01:00
Matthias Clasen
5ae25519a7
Make it build
...
Fix the circular dependency by moving the generated
headers to gdk/version/, and build that directory
first.
Misc other fixes, such as putting the custom targets
as sources, not depedencies, and using the correct
major version in the generator script.
2023-05-09 16:43:25 +01:00
Emmanuele Bassi
4d1f7a476d
Generate version and deprecation macros at build time
...
Let's poach the same script used by GLib to avoid having to add all the
version macros by hand every time we increment the GTK version.
This is a work in progress:
- need to rename the GLIB_STATIC_COMPILATION check
- circular dependency: libgtkcss depends on gdkversionmacros.h, but libgdk
depends on libgtkcss
2023-05-09 16:43:25 +01:00
Benjamin Otte
a959fba18a
Merge branch 'wip/otte/no-vsync' into 'main'
...
Add GDK_DEBUG=no-vsync
See merge request GNOME/gtk!5944
2023-05-09 15:16:43 +00:00
Benjamin Otte
c88ac79437
listview: Make inertness not depend on factory
...
The inertness concept introduced in 62e9d1e470
assumed a listview was
inert when no factory was set. This has 2 problems:
1. columnview uses a listview without factories.
2. header factory being set but factory not being set technically makes
the listiew inert - but should it?
So for now, make inertness only depend on visibility and root.
A side benefit is that this matches columnview semantics.
2023-05-09 17:03:35 +02:00
Benjamin Otte
ddefbfa8b5
gtk-demo: Add alternative settings demo
...
This one displays a long list of all settings with sections and allows
filtering the list to quickly search for keys.
2023-05-09 17:03:35 +02:00
Benjamin Otte
435a405c55
gtk-demo: Split out code from the settings demo
...
I want to add another demo using settings and share relevant code.
2023-05-09 17:01:20 +02:00
Benjamin Otte
e1ed9f10c6
theme: Add some random CSS for section headers
2023-05-09 17:00:40 +02:00
Benjamin Otte
46adfbef4f
listitemmanager: Create header items for sections
...
Now, finally, listitemmanager has all the necessary support to make
section headers work.
2023-05-09 17:00:40 +02:00
Benjamin Otte
53bfcf7f0a
listview: GtkListHeader and gtk_list_view_set_header_factory()
...
Adds infrastructure for handling factories for list headers.
For now, listitemmanager doesn't instantiate them, so they aren't used.
2023-05-09 17:00:40 +02:00
Benjamin Otte
76d601631d
listitemmanager: Add GtkListItemChange
...
... for tracking widgets during changes.
This just pulls all the different disjointed parts into one struct with
a sensible API.
2023-05-09 17:00:40 +02:00
Benjamin Otte
38844fef4d
listitemmanager: Add GtkListHeaderBase and vfuncs
...
This is plumbing for section handling.
The vfuncs don't do anything, this is just the infrastructure.
2023-05-09 17:00:40 +02:00
Benjamin Otte
03ac6611c1
listitembase: exit early
...
When update() is called but no values are changed, exit early.
2023-05-09 17:00:40 +02:00
Benjamin Otte
0ff88346cd
listitemmanager: Make sections configurable
...
Add a gtk_list_item_manager_set_has_sections() (default: FALSE) that
requires explicit turning on for the listitemmanager to gain section
support.
2023-05-09 17:00:40 +02:00
Benjamin Otte
a73256e5c9
listitemmanager: Add/remove sections as needed
...
When ensuring widgets, ensure that their section is known. This will
be relevant when we use section widgets.
Also ensure that sections that don't cover any widget get destroyed.
2023-05-09 17:00:40 +02:00
Benjamin Otte
5d2605a151
testsuite: assert widgets are in matched sections
...
All widgets that we display should have their sections known, so assert
that that is the case.
2023-05-09 17:00:40 +02:00
Benjamin Otte
40a7ec73a9
testsuite: Add a print function for the listitemmanager
...
This is very useful when debugging.
2023-05-09 17:00:40 +02:00
Benjamin Otte
ccbe762103
listitemmanager: Add gtk_list_tile_get_next_skip()
...
... and gtk_list_tile_get_previous_skip() and use them.
Allows skipping over REMOVED and FILLER tiles which makes the code a lot
more readable.
2023-05-09 17:00:40 +02:00
Benjamin Otte
88d5c9a5e1
listitemmanager: Add gtk_list_tile_set_type()
2023-05-09 17:00:39 +02:00
Benjamin Otte
6df8eafc3a
testsuite: Add verbose output to listitemmanager test
2023-05-09 17:00:39 +02:00
Benjamin Otte
8e69c5c89c
listitemmanager: Properly handle sections during add/remove
...
We don't insert sections ourselves yet, but we handle the existing one
when items get added or removed.
2023-05-09 17:00:39 +02:00
Benjamin Otte
8bf6498265
listitemmanager: Augment header/footer info
2023-05-09 17:00:39 +02:00
Benjamin Otte
e680abc723
listitemmanager: Add section tiles
...
For now, we just have a HEADER at the start and a FOOTER at the end.
That's hard enough to get right.
2023-05-09 17:00:39 +02:00
Benjamin Otte
cecaede610
testsuite: Improve listitemmanager test
...
It now has trackers!
2023-05-09 17:00:39 +02:00
Benjamin Otte
81e7e67cef
listitemmanager: Add tile types
...
We have a FILLER and a REMOVED type now.
Also makes gc() more sensitive to types.
2023-05-09 17:00:39 +02:00
Benjamin Otte
35543f60d9
listitemmanager: Add a type to tiles
...
There's only one type for now, but hey, you have to start somewhere.
2023-05-09 17:00:39 +02:00
Benjamin Otte
7856c52882
testsuite: Add tests for sections to filterlistmodel
2023-05-09 17:00:39 +02:00
Matthias Clasen
568023e6e6
Add a test for filterlistmodel sections
2023-05-09 17:00:39 +02:00
Matthias Clasen
cabb2625f5
filterlistmodel: Support sections
...
Propagate sections from the child model to
the filter model.
2023-05-09 17:00:39 +02:00
Benjamin Otte
5f64f1c8df
sortlistmodel: add a fast path for get_section()
2023-05-09 17:00:39 +02:00
Benjamin Otte
41faddea40
testsuite: Add section tests to sortlistmodel test
2023-05-09 17:00:39 +02:00
Matthias Clasen
a09146df5a
Add a test for sortlistmodel sections
2023-05-09 17:00:39 +02:00
Benjamin Otte
bd7ee3f3e1
sortlistmodel: Implement GtkSectionModel
...
The get_section() implementation is a slow and steady implementation
that has to be careful to not screw up when an incremental sort is only
partially sorted.
2023-05-09 17:00:39 +02:00
Benjamin Otte
ff6c5ad710
flattenlistmodel: Implement GtkSectionModel
...
Each child model is reported as one section.
2023-05-09 17:00:39 +02:00
Benjamin Otte
bd999c72c9
Implement GtkSectionModel for all selection models
2023-05-09 17:00:39 +02:00
Benjamin Otte
45c9e7aff4
Add GtkSectionModel
...
Prototyping the interface to be used for sections in listview, so people
can review and play with it.
2023-05-09 17:00:39 +02:00
Benjamin Otte
d24291db98
testsuite: Add a listitemmanager test
2023-05-09 17:00:39 +02:00
Matthias Clasen
661022f2eb
Merge branch 'reftest-msvc' into 'main'
...
reftest-snapshot.c: Fix running reftests on Visual Studio
See merge request GNOME/gtk!5937
2023-05-09 14:48:18 +00:00
Matthias Clasen
168eb941a1
Merge branch 'inspect-a11y-bounds' into 'main'
...
Inspector accessibility pane improvements
See merge request GNOME/gtk!5941
2023-05-09 14:47:51 +00:00
Benjamin Otte
961a6c12ec
wayland: Don't assert when requesting another frame
...
When GDK_DEBUG=no-vsync is on, we might have more than one outstanding
frame. Don't assert when that hapens. Just request a frame callback for
the first and skip the others.
2023-05-09 16:29:41 +02:00
Benjamin Otte
c227493c65
frameclock: Keep more history
...
Not all frames get timing info with GDK_DEBUG=no-vsync, so make sure
that even when we render tons of frames, the one frame that does get
timing info is still there when the timing info arrives.
I set it to 128 from 16 now.
This is roughly good enough to go to 5000fps from on a 60Hz monitor.
2023-05-09 16:29:41 +02:00
Benjamin Otte
30acf00bf8
gtk-demo: Update fps with higher priority
...
We want to make sure to always update it, so make sure it has a higher
priority than redraws.
2023-05-09 16:29:41 +02:00
Benjamin Otte
02e2a6f311
gdk: Add GDK_DEBUG=no-vsync
...
That turns off waiting and freezing in the frame clock and in
surfaces and triggers redraws asap.
2023-05-09 16:29:41 +02:00
Benjamin Otte
fa42e02a76
frameclock: Add gdk_frame_clock_idle_is_frozen()
...
This is in preparation for a future commit.
Also turn some macros into inline functions and pass the clock instead
of its priv pointer.
2023-05-09 16:29:37 +02:00
Matthias Clasen
c85b3a8d35
Merge branch 'fix-wgl' into 'main'
...
Few fixes for WGL after recent updates
Closes #5808
See merge request GNOME/gtk!5936
2023-05-09 12:51:29 +00:00
Matthias Clasen
285685044f
Merge branch 'fix-gsk-crash' into 'main'
...
Fix a refcounting mishap in gsk
Closes #5823
See merge request GNOME/gtk!5943
2023-05-09 11:29:11 +00:00
Matthias Clasen
97bc4f77c6
gsk: Fix a refcounting mishap
...
This may fix #5823
2023-05-09 06:56:09 -04:00
Chun-wei Fan
0073ee29da
gdkglcontext-win32-wgl.c: Always request alpha bits
...
...when we are using wglChoosePixelFormatARHB(). This ensures that we
hvae a HDC with a pixel format that will really support alpha bits, as
we did for the traditional ChoosePixelFormat().
Thanks to Patrick Zacharias for testing and pointing things out.
2023-05-09 18:15:23 +08:00
Benjamin Otte
e9ed5e21ef
win32: Turn off multisampling
...
We know we draw beautiful Windows, but drawing them once is totally
enough.
2023-05-09 18:15:23 +08:00
Benjamin Otte
c37786af36
win32: Actually increase the counter
...
We were sending random junk to ChoosePixelFormat().
Also assert that we don't overflow the array. That might be usefu to
know if we carelessly add attributes later.
2023-05-09 18:15:23 +08:00
Chun-wei Fan
a7b09e19f1
GDK/Win32: Use dummy WGL contexts more
...
... for creating the actual WGL contexts, so that we can cut down on the
number of times where we need to create the base, legacy WGL contexts in
order to create the WGL contexts with attributes. We could just use the
dummy context that we have to make it current to create the needed
WGL contexts.
2023-05-09 18:15:23 +08:00
Chun-wei Fan
50ef36d387
gdkglcontext-win32-wgl.c: Fix using wglChoosePixelFormatARB()
...
If we are querying the best supported pixel format for our HDC via
wglChoosePixelFormatARB() (i.e. we have the WGL_ARB_pixel_format extension),
it may return a pixel format that is different from the pixel format that we
used for the dummy context that we have setup, in order to, well, run
wglChoosePixelFormatARB(), which sadly requires a WGL context (HGLRC) to be
current in order to use it, which means the dummy HDC already has a pixel
format that has been set (notice that each HDC is only allowed to have its
pixel format to be set *once*). This is notably the case on Intel display
drivers.
Since we are emulating surfaceless GL contexts, we are using the dummy GL
context (and thus dummy HDC that is derived from the notification HWND used in
GdkWin32Display) for doing that, we would get into trouble if th actual HDC
from the GdkWin32Surface has a different pixel format set.
So, as a result, in order to fix this situation, we do the following:
* Create yet another dummy HWND in order to grab the HDC to query for the
capabilities the GL drivers support, and to call wglChoosePixelFormatARB() as
appropriate (or ChoosePixelFormat()) for the final pixel format that we use.
* Ditch the dummy GL context, HDC and HWND after obtaining the pixel format.
* Then set the final pixel format that we obtained onto the HDC that is derived
from the HWND used in GdkWin32Display for notifications, which will become our
new dummy HDC.
* Create a new dummy HGLRC for use with the new dummy HDC to emulate surfaceless
GL support.
2023-05-09 18:15:23 +08:00
Luca Bacci
347561fa68
Merge branch 'fix-5808' into 'main'
...
gdkglcontext-win32-wgl.c: Fix WGL context realization on 32-bit
Closes #5808
See merge request GNOME/gtk!5942
2023-05-09 07:59:17 +00:00
Chun-wei Fan
d02ae09124
gdkglcontext-win32-wgl.c: Fix WGL context realization on 32-bit
...
We are currently using g_clear_pointer() on the intermediate WGL contexts
(HGLRC)'s that we need to create in the way, which means that we need to ensure
that the correct calling convention for wglDeleteContext() is being applied.
To be absolutely safe about it, use the gdk_win32_private_wglDeleteContext()
calls, which will in turn call wglDeleteContext() directly from opengl32.dll
(using the OpenGL headers from the Windows SDK) instead of going via libepoxy,
which will assure us that the correct calling convention is applied.
Fixes issue #5808 .
2023-05-09 11:47:28 +08:00
Jason Francis
f3996a1a66
inspector: show GtkAccessible bounds in a11y pane
2023-05-08 21:33:04 -04:00
Jason Francis
1181ecbf0e
inspector: hide a11y object path when not using AT-SPI backend
2023-05-08 21:31:21 -04:00
Benjamin Otte
d948ac62e4
Merge branch 'wip/otte/for-main' into 'main'
...
Revert "TEST TEST TEST"
See merge request GNOME/gtk!5940
2023-05-08 18:19:03 +00:00
Benjamin Otte
507e346ff1
Revert "TEST TEST TEST"
...
This reverts commit 97aff588d5
.
That was a test commit for demonstrating things that shouldn't have made
it into main.
So throw it out again.
2023-05-08 19:51:08 +02:00
Emmanuele Bassi
98e6ed474f
Merge branch 'new-align-value' into 'main'
...
filterchooser: Maintain filter combo visibility
See merge request GNOME/gtk!5939
2023-05-08 15:07:26 +00:00
Matthias Clasen
ade316eaee
filterchooser: Maintain filter combo visibility
...
This code broke when it was ported to listmodels
since we always have a non-NULL lis model of filters.
It can just be empty.
2023-05-08 10:42:09 -04:00
Matthias Clasen
1e48843616
Merge branch 'new-align-value' into 'main'
...
Introduce GTK_ALIGN_BASELINE_FILL/CENTER
See merge request GNOME/gtk!5935
2023-05-08 13:28:15 +00:00
Matthias Clasen
58a5de6f5d
testsuite: Handle duplicate enum values
...
Our notify tests would fall over if there was
a duplicate enum value (within the first 10 values).
Make it handle that, by skipping the duplicate value.
2023-05-08 07:00:34 -04:00
Chun-wei Fan
a9ca72695f
reftest-snapshot.c: Fix running reftests on Visual Studio
...
On Visual Studio-like builds, shove a ".dll" suffix for the reftest
module so that we look for the correct DLL when running the tests.
2023-05-08 15:10:17 +08:00
Matthias Clasen
082ba6d7c8
Introduce GTK_ALIGN_BASELINE_FILL/CENTER
...
It turns out that the old behavior of GTK_ALIGN_BASELINE
was actually used in libadwaita, so bring it back, and
introduce a new GtkAlign value for the new behavior.
2023-05-07 21:26:09 -04:00
Matthias Clasen
61ff647f71
Merge branch 'node-editor-smarts' into 'main'
...
node-editor: Add some editor smarts
See merge request GNOME/gtk!5934
2023-05-07 13:59:42 +00:00
Matthias Clasen
823f56d263
Cleanup
2023-05-07 09:32:09 -04:00
Matthias Clasen
87332920d5
node-editor: Add some editor smarts
...
Allow control-clicks on some fields to bring up
a more specific UI. This functionality is also
available via Ctrl-E and the context menu.
At this point, it can edit colors, fonts and
files in some places, as well as a few enums.
2023-05-07 09:19:44 -04:00
Matthias Clasen
d2a358206c
Fix a typo in the node format definition
2023-05-07 09:19:44 -04:00
Matthias Clasen
51ea08aa9c
Merge branch 'wip/exalm/action-fixes' into 'main'
...
modelbutton: Fix a use after free when unsetting accel
See merge request GNOME/gtk!5933
2023-05-07 12:12:57 +00:00
Alice Mikhaylenko
380b63fede
modelbutton: Fix a use after free when unsetting accel
...
gtk_widget_remove_controller() already destroys the controller.
2023-05-07 15:21:16 +04:00
Matthias Clasen
df93875c0c
Merge branch 'matthiasc/for-main' into 'main'
...
rendernodeparser: Handle shader nodes better
See merge request GNOME/gtk!5930
2023-05-07 00:58:05 +00:00
Matthias Clasen
5a156e6b5f
rendernodeparser: Handle shader nodes better
...
Avoid criticals when editing shader nodes in
the node editor.
2023-05-06 14:33:45 -04:00
Matthias Clasen
0e488b3dfe
Merge branch 'headless-test-logging' into 'main'
...
ci: Improve headless test logging
See merge request GNOME/gtk!5929
2023-05-06 13:28:06 +00:00
Matthias Clasen
8495e0e412
Add a test for quick key events
2023-05-06 09:09:13 -04:00
Matthias Clasen
c9b0ca0de7
ci: Improve headless test logging
2023-05-06 09:02:25 -04:00
Benjamin Otte
2a950dec71
Merge branch 'wip/otte/update-texture' into 'main'
...
Add texture update regions
See merge request GNOME/gtk!5880
2023-05-06 00:59:25 +00:00
Matthias Clasen
d6c80d4f35
Merge branch 'tiled-states' into 'main'
...
Fix a corner-case in window states
Closes #5809
See merge request GNOME/gtk!5926
2023-05-05 23:58:08 +00:00
Matthias Clasen
e41cc99474
Merge branch 'wip/kabus/column-id-leak' into 'main'
...
gtk/columnviewcolumn: Fix id leak
See merge request GNOME/gtk!5927
2023-05-05 23:55:34 +00:00
Matthias Clasen
61fe5ac684
Handle the opposite case too
...
Just in case.
2023-05-05 19:40:42 -04:00
Khalid Abu Shawarib
1cf3f492b8
gtk/columnviewcolumn: Fix id leak
...
Add a free that was missing in commit 3e2b962a
2023-05-05 22:18:16 +00:00
Matthias Clasen
54fed96f8c
Fix a corner-case in window states
...
Remove detailed tiled states when not tiled.
Fixes : #5809
2023-05-05 16:47:43 -04:00
Matthias Clasen
e2d659d5c2
Merge branch 'matthiasc/for-main' into 'main'
...
ci: Bump timeouts for headless tests
See merge request GNOME/gtk!5925
2023-05-05 20:34:39 +00:00
Matthias Clasen
8ad1189b0b
ci: Bump timeouts for headless tests
2023-05-05 16:21:54 -04:00
Matthias Clasen
b5b7e1f2b4
Merge branch 'matthiasc/for-main' into 'main'
...
Add a masked variation to gsk tests
See merge request GNOME/gtk!5924
2023-05-05 20:12:12 +00:00
Matthias Clasen
e56a539363
Add a masked variation to gsk tests
...
This improves test coverage for mask nodes.
2023-05-05 15:05:08 -04:00
Matthias Clasen
5f91bb81ed
Merge branch 'matthiasc/for-main' into 'main'
...
node-editor: Be a bit better about saving
See merge request GNOME/gtk!5923
2023-05-05 18:50:16 +00:00
Matthias Clasen
1fba59f1d1
node-editor: Be a bit better about saving
...
When we have a file, suggest it for saving.
This has the side benefit of giving us a test case
for gtk_file_dialog_set_initial_file.
2023-05-05 14:18:40 -04:00
Matthias Clasen
68a2ca7e85
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Add a few assertions
See merge request GNOME/gtk!5922
2023-05-05 17:48:14 +00:00
Matthias Clasen
93ccf08c81
ci: Bump timeouts of headless tests
2023-05-05 12:05:10 -04:00
Matthias Clasen
e9f5a3e9e2
gsk: Introduce a constant
...
We need this number in a couple of places,
so pull it out as a constant.
2023-05-05 12:05:10 -04:00
Matthias Clasen
2b85c49fb1
gsk: Add a few assertions
...
Make sure we don't overflow our fixed-size arrays.
2023-05-05 12:05:10 -04:00
Matthias Clasen
d7c3235cd0
gsk: Add some debug helpers
2023-05-05 12:05:09 -04:00
Matthias Clasen
ea94bac79e
Merge branch 'better-masks' into 'main'
...
gsk: Avoid some offscreens
See merge request GNOME/gtk!5921
2023-05-05 15:56:16 +00:00
Matthias Clasen
63713c3b68
Merge branch 'fix-typo' into 'main'
...
gtkapplication-quartz: fix typo
Closes #5807
See merge request GNOME/gtk!5920
2023-05-05 15:39:46 +00:00
Matthias Clasen
81fd9741ff
gsk: Better handling of offscreens
...
Take the scale into account for sizing the
offscreens for masks, blends and cross-fades.
2023-05-05 11:37:23 -04:00
Luca Bacci
c7523cecf1
gtkapplication-quartz: fix typo
...
Fixes #5807
2023-05-05 16:26:26 +02:00
Matthias Clasen
ce6569d1a6
gsk: Avoid some offscreens
...
We don't have to be too conservative when checking
if a rect is contained in a rounded rect, we have
a precise api for this.
2023-05-04 22:30:12 -04:00
Matthias Clasen
852f46df19
Remove a no longer building test
2023-05-04 20:53:15 -04:00
Matthias Clasen
d82f603fcb
Merge branch 'smalltexture-plus-gles' into 'main'
...
Merge wayland_smalltexture and wayland_gles
See merge request GNOME/gtk!5917
2023-05-04 21:12:40 +00:00
Matthias Clasen
5e8e4130a5
Skip another failing gsk test with small textures
2023-05-04 15:36:57 -04:00
Matthias Clasen
f81aa14d93
Merge wayland_smalltexture and wayland_gles
...
We don't really need to have two full separate
test runs for these conditions, so combine them
into one test setup.
2023-05-04 15:13:09 -04:00
Matthias Clasen
81db6e9e61
Merge branch 'headless-tests' into 'main'
...
Get the headless monitor test to work in ci
See merge request GNOME/gtk!5915
2023-05-04 15:51:21 +00:00
Matthias Clasen
ac0311b621
ci: Mark headless monitor test as working
2023-05-04 11:39:35 -04:00
Matthias Clasen
f41e58d179
ci: Make run-docker run work
...
We want to have a writable volume and the same user
inside the container.
2023-05-04 11:38:55 -04:00
Matthias Clasen
d288931b45
More debug spew
...
Lets see what MUTTER_DEBUG=screen-cast says.
2023-05-04 11:38:55 -04:00
Matthias Clasen
03adeecfa3
Add generous waits
...
These tests work in the smae container locally.
Perhaps this is down to timing?
2023-05-04 11:38:55 -04:00
Matthias Clasen
5439f4596c
Merge branch 'headless-tests' into 'main'
...
Add headless tests using mutter
See merge request GNOME/gtk!5908
2023-05-04 04:20:11 +00:00
Matthias Clasen
f98d1a6474
Mark the headless monitor test as failing
...
This is failing because I can't figure out
how to make wireplumber and pipewire work
in ci enough to let me add a new monitor :(
As usual, the test works fine locally.
2023-05-03 23:53:14 -04:00
Matthias Clasen
57e6aae80a
Try to fix dnd tests
2023-05-03 23:27:09 -04:00
Matthias Clasen
f23eaafc85
Typo fix
2023-05-03 23:27:09 -04:00
Matthias Clasen
926b26e9fc
headless tests: Add debug spew
...
Trying to track down what is going on with our
missing monitors.
2023-05-03 23:27:09 -04:00
Matthias Clasen
88f27c423c
ci: Launch pipewire and wireplumber
...
The headless tests require pipewire and wireplumber
for screencast sessions to work. So launch them.
2023-05-03 23:27:09 -04:00
Matthias Clasen
30342896d0
Use python3
...
No /usr/bin/python in our CI image :(
2023-05-03 23:27:09 -04:00
Matthias Clasen
be8e203edc
Make the headless input tests work
...
These needed some updates and workarounds.
They are now part of the testsuite and can
be run like this:
meson test -Cbuild --suite headless
2023-05-03 23:27:09 -04:00
Matthias Clasen
623c93ccc8
Disable a11y for the headless tests
...
Otherwise, we go off activating things and end up
failing to launch systemd.
2023-05-03 23:27:09 -04:00
Matthias Clasen
34d8beaf4f
Add a dnd test to the headless tests
2023-05-03 23:27:09 -04:00
Matthias Clasen
983b6ce341
Use headless mutter for input tests
...
Add some input tests that are using headless
mutter, and python with our in-tree gir files.
So far, test that we can roundtrip key events,
and move the pointer around.
2023-05-03 23:27:09 -04:00
Matthias Clasen
771df47820
Use headless mutter for monitor tests
...
Add some monitor tests that are using headless
mutter, and python with our in-tree gir files.
So far, we test that we get expected signals
when monitors are added and removed.
2023-05-03 23:27:09 -04:00
Matthias Clasen
3c218687e3
Merge branch 'ci-update-meson' into 'main'
...
ci: Use newer meson
See merge request GNOME/gtk!5914
2023-05-04 02:57:23 +00:00
Matthias Clasen
37fb370a5d
ci: Remove the hack
2023-05-03 22:32:00 -04:00
Matthias Clasen
1cc9413383
ci: Use newer meson
2023-05-03 20:18:58 -04:00
Matthias Clasen
bfea39ab2f
ci: Add meson back to the fedora image
2023-05-03 20:18:58 -04:00
Matthias Clasen
84d6f023b5
ci: Add pipewire-gstreamer too
2023-05-03 20:18:58 -04:00
Matthias Clasen
7fe04a7122
ci: Add pipewire to the image
...
And its buddy, wireplumber.
But we don't need gnome-desktop-testing
anymore, now that installed tests are gone.
2023-05-03 20:18:58 -04:00
Matthias Clasen
19cea99007
Merge branch 'matthiasc/for-main' into 'main'
...
ci: Stop running failing tests
See merge request GNOME/gtk!5913
2023-05-03 19:54:24 +00:00
Matthias Clasen
1c4ad78d52
Merge branch 'stop-running-failing-tests' into 'main'
...
ci: Stop running failing tests
See merge request GNOME/gtk!5912
2023-05-03 19:33:35 +00:00
Matthias Clasen
955a7e643e
ci: Produce less terminal output
...
Pass --quiet to meson test.
Less is more, in this case.
2023-05-03 15:32:50 -04:00
Matthias Clasen
b85a137a68
Fix scan-build warning
2023-05-03 15:32:19 -04:00
Matthias Clasen
d17ca6b451
ci: Stop running the unstable test setups
...
This is just duplicating all our test runs,
for no discernible gain.
2023-05-03 15:11:53 -04:00
Matthias Clasen
da7040874e
ci: Stop running failing tests
...
This makes the test output much harder to read,
and is just a waste of time.
2023-05-03 14:42:10 -04:00
Danial Behzadi
6f9c4c894d
Update Persian translation
...
(cherry picked from commit 954011ef80
)
2023-05-03 09:01:04 +00:00
Benjamin Otte
cc7a35cd30
Merge branch 'wip/otte/for-main' into 'main'
...
build: Use generated SPIR-V files
Closes #5798
See merge request GNOME/gtk!5910
2023-05-02 18:09:13 +00:00
Benjamin Otte
f841621348
css: Don't transition to currentColor
...
Transition to the color that is in use instead.
Fixes crashes because currentColor is not an RGBA color and
therefor could not be queried later.
Fixes #5798
2023-05-02 19:50:31 +02:00
Benjamin Otte
f99ecd3739
vulkan: Compute offscreen texture coords properly
...
Most of the time we want to compute them based on the child node we
render to the offscreen, but not always.
For blend and cross-fade nodes, they need to be computed based on the
node's bounds.
Fixes widget-factory page fade animation weirdly resizing the fading
pages.
2023-05-02 19:44:06 +02:00
Matthias Clasen
5eb7e550d1
Merge branch 'matthiasc/for-main' into 'main'
...
Expand gtk_init docs
Closes #5781
See merge request GNOME/gtk!5909
2023-05-02 17:42:29 +00:00
Matthias Clasen
8d33f2a511
Add a comment to pango.wrap
...
So we remember the next time we try to
switch to stable dependencies.
2023-05-02 13:18:49 -04:00
Matthias Clasen
27b0321dec
Expand gtk_init docs
...
Make it clear that some aspects of GApplication
functionality happen before startup.
Fixes : #5781
2023-05-02 13:18:49 -04:00
Matthias Clasen
538605eccb
Merge branch 'matthiasc/for-main' into 'main'
...
Don't build fribidi docs
See merge request GNOME/gtk!5906
2023-05-02 13:29:20 +00:00
Matthias Clasen
81f5967587
Make run-test.sh easier to use locally
...
Set a default timeout multiplier so we don't
have to rememver obscure environment variables.
2023-05-02 06:38:30 -04:00
Matthias Clasen
771437acf9
Go back to fribidi master
...
Fribidi 1.0.12 does not work as a subproject :(
2023-05-02 06:22:44 -04:00
Matthias Clasen
a3da58133e
Don't build fribidi docs
...
There's no need for that. This matches what pango does.
2023-05-02 06:22:24 -04:00
Benjamin Otte
9b558b50b8
vulkan: Rebuild SPIR-V files
...
It's been a while since somebody last compiled them, glslc should be
somewhat newer by now.
2023-05-02 08:47:10 +02:00
Benjamin Otte
7ce2eeac47
build: Use generated SPIR-V files
...
We weren't looking in the build dir for generated files.
Actually make sure that we look in the build dir *first*, otherwise
glib-compile-resources will still use the wrong files.
2023-05-02 08:41:43 +02:00
Matthias Clasen
182dccb8f0
Use pango main as subproject
...
This is necessary to get the latest pango docs
built in ci.
2023-05-01 23:55:21 -04:00
Matthias Clasen
17d2ba94d6
stop using deprecated pango api
2023-05-01 23:49:42 -04:00
Matthias Clasen
5bac4f13a0
ci: Add mutter to the fedora image
...
This is in preparation for trying to use mutter --headless
in ci.
2023-05-01 21:11:01 -04:00
Benjamin Otte
97aff588d5
TEST TEST TEST
...
Add some random updates to the GL Area, so that funky testing can be
done with the GLArea and Gears gtk-demo.
2023-05-02 00:30:58 +02:00
Benjamin Otte
e4040adbe7
rendernode: Implement texture diffing for scale nodes
2023-05-02 00:30:58 +02:00
Benjamin Otte
6506a3bc9c
texturebuilder: Add ::udpate-region and ::update-texture
2023-05-02 00:30:58 +02:00
Matthias Clasen
64f9d82506
Merge branch 'gsk-flip-tests' into 'main'
...
more gsk tests
See merge request GNOME/gtk!5811
2023-05-01 21:06:32 +00:00
Matthias Clasen
b83f3d871f
Merge branch 'matthiasc/for-main' into 'main'
...
Cosmetics: Unset baseline too
See merge request GNOME/gtk!5904
2023-05-01 20:41:13 +00:00
Matthias Clasen
a235b59089
Skip some tests with small textures
...
When textures are too large, we will scale them down
to fit the max texture size, which will cause comparisons
to fail.
2023-05-01 16:29:45 -04:00
Benjamin Otte
1883035d34
texture: Add gdk_texture_diff()
...
... and use it in rendernodes.
Setting up textures for diffing is done via gdk_texture_set_diff() which
should only be used during texture construction.
Note that the pointers to next/previous are allowed to dangle if one of
the textures is finalized, but that's fine because we always check both
textures' links to each other before we consider the pointer valid.
2023-05-01 22:24:14 +02:00
Matthias Clasen
0ca6471df4
Cosmetics: Unset baseline too
...
We set width and height to 0 when unrealizing
a widget. No reason to let the baseline value
linger.
2023-05-01 16:15:11 -04:00
Matthias Clasen
98dde97f20
Merge branch 'better-switch-docs' into 'main'
...
switch: Expand the docs
See merge request GNOME/gtk!5903
2023-05-01 20:03:44 +00:00
Matthias Clasen
9bd9847b3f
switch: Expand the docs
...
Add more text and explanation around active vs state,
since people seem easily confused by it.
2023-05-01 15:15:53 -04:00
Matthias Clasen
b79d4a3a22
gsk: Fix rendering big textures with offsets
...
When slicing the texture, the GL renderer was
forgetting to apply the viewport origin. This
shows up when rendering things with negative
scales, leading to negative origins.
2023-05-01 14:46:30 -04:00
Matthias Clasen
33ab588d4e
Improve test coverage
...
Check that our two rounded rect intersection functions agree.
2023-05-01 13:58:42 -04:00
Matthias Clasen
7200a93a88
gsk: Give up on one test
...
The rounded-clip-in-clip-3d test fails in GL when
flipped. Given that it was already excluded from cairo,
and also fails cairo when flipped, give up on it for now.
2023-05-01 13:45:20 -04:00
Matthias Clasen
319762b908
gsk: Extract scales properly from 2D transforms
...
We have the code to do it properly.
2023-05-01 13:45:20 -04:00
Matthias Clasen
e453a989df
Improve rounded rect intersection
...
Move the rounded rect/rect intersection code to
gskroundedrect.c, make it more precise, and add
tests for it.
Update the callers in the GL renderer.
2023-05-01 13:45:20 -04:00
Matthias Clasen
f56328a6cc
gsk: Fix mask transform handling
...
We must reset the modelview transform when
offscreen, or else we end up applying
it twice.
2023-05-01 13:45:20 -04:00
Matthias Clasen
f29b24517e
Add a test for rotated blend nodes
2023-05-01 13:45:20 -04:00
Matthias Clasen
552df197c4
gsk: Fix blend transform handling
...
We must reset the modelview transform when
rendering offscreen, or else we end up applying
it twice.
2023-05-01 13:45:20 -04:00
Matthias Clasen
f6e47b7eb0
Add a test for rotated cross-fade nodes
...
This one checks that we don't apply the modelview
transform twice with cross-fades.
2023-05-01 13:45:13 -04:00
Matthias Clasen
4214067d52
gsk: Fix cross-fade transform handling
...
We must reset the modelview transform when
rendering offscreen, or else we end up applying
it twice.
2023-05-01 13:44:55 -04:00
Matthias Clasen
d9a2b74b4a
gsk: More fixes
...
Work towards handling negative scales and
denormalized rects everywhere.
2023-05-01 13:43:33 -04:00
Matthias Clasen
21df62f428
Add another test
2023-05-01 13:43:33 -04:00
Matthias Clasen
4e501d2d44
gsk: Transform rounded rects better
2023-05-01 13:43:33 -04:00
Matthias Clasen
5afd5cfec7
Add another gsk test
2023-05-01 13:43:33 -04:00
Matthias Clasen
ad65db901a
gsk: Normalize rects in GLSL
...
Our coverage computation only works for well-behaved
rects and rounded rects. But our modelview transform
might flip x or y around, causing things to fail.
Add functions to normalize rects and rounded rects,
and use it whenever we transform a rounded rect in GLSL.
2023-05-01 13:43:33 -04:00
Matthias Clasen
406b1e2e03
testsuite: Fix gsk test
...
The repeated tests were not careful enough to produce
the correct reference image to match what the repeat
node does.
With these changes, all cairo tests pass.
2023-05-01 13:43:33 -04:00
Matthias Clasen
f1729affa8
testsuite: Add more gsk tests
...
Add separate suites for running the gsk compare-render
tests with the --flip, --rotate or --repeat options.
A bunch of these fail currently, and need diagnosis.
2023-05-01 13:35:35 -04:00
Matthias Clasen
3b2ba8ed99
Add more gsk tests
...
Add options to the gsk compare-render test for
modifying the node (and do a matching change to
the reference image).
flip: negative scale flipping things horizontally
rotate: 90 degree rotation
repeat: 2x2 grid
2023-05-01 13:35:35 -04:00
Matthias Clasen
386c3ac34f
Add another transform test
...
Test that transforming bounds with negative scales
works as expected.
2023-05-01 13:35:22 -04:00
Jami Kettunen
cfef21501c
FileChooser: Sort directories before files by default
...
This imho is what most people[1][2] would expect to be the default in
modern times; considering this also cannot be "easily" configured
outside of the cli utilities gsettings or dconf it should just be the
default.
[1] https://superuser.com/questions/843615/gtk-3-14-file-chooser-folders-first
[2] https://askubuntu.com/questions/789505/can-i-choose-to-not-sort-directories-before-files-on-file-open-dialogs
2021-12-25 15:16:11 +02:00