Commit Graph

75750 Commits

Author SHA1 Message Date
Benjamin Otte
d37b9619e2 gles: Don't use vertex array objects
They're not needed and GLES doesn't technically support them, even
though GTK had been using them via epoxy sneakily using the
GL_OES_vertex_array_object extension behind our back.
2023-04-15 17:55:20 +02:00
Matthias Clasen
4246c7bafd Merge branch 'better-snapshot-nodes-docs' into 'main'
gtk: Improve documentation on returned nodes for snapshot

Closes #5747

See merge request GNOME/gtk!5831
2023-04-15 10:51:39 +00:00
Matthias Clasen
d67101d46e Tweak the wording 2023-04-15 10:35:12 +00:00
Benjamin Otte
60f3cc398a Merge branch 'wip/otte/for-main' into 'main'
inspector: Don't randomly emit application signals

See merge request GNOME/gtk!5834
2023-04-15 03:40:00 +00:00
Benjamin Otte
e010cd242c listlistmodel: Add a cache
Cache the last looked up item and use it for looking up the next item if
it's closest. This massively speeds up iteration over the model, because
each call to get_item() will be adjacent to the previous one.

Improves performance of the inspector quite a bit.
2023-04-15 05:27:47 +02:00
Benjamin Otte
41454b63b4 testsuite: Add some more exhaustive testing to listlistmodel 2023-04-15 05:27:47 +02:00
Benjamin Otte
f458951745 inspector: Don't randomly emit application signals
When the variant-editor emits a callback, it might not actually have
edited the value in question. Try to detect that by only emitting
signals if the value changed.
2023-04-15 05:27:47 +02:00
Benjamin Otte
ef3793ec37 Merge branch 'gbsneto/vulkan-buffer-release' into 'main'
gsk/vulkan/render: Download image before reset

See merge request GNOME/gtk!5832
2023-04-14 23:28:55 +00:00
Georges Basile Stavracas Neto
94b1a78378 gsk/vulkan/render: Download image before reset
gsk_vulkan_render_download_target() currently resets the uploader
objects before downloading the image that it produces. This is
problematic because there might be unreleased buffers and images
in the command queue.

In particular, this can make validation layers complain about the
glyph atlas - of all things! - upload buffer being released while
still being used by the command queue.

Fix that by resetting the uploader after downloading the image.
2023-04-14 16:43:04 -03:00
Marco Trevisan (Treviño)
584fd36a5f gtk: Improve documentation on returned nodes for snapshot
Closes: #5747
2023-04-14 18:05:21 +02:00
Matthias Clasen
64a1969293 Merge branch 'fix_scalebutton_orientation' into 'main'
ScaleButton: fix CSS name in documentation, fix orientation doing nothing

See merge request GNOME/gtk!5819
2023-04-13 20:44:23 +00:00
Matthias Clasen
2baab9732c Merge branch 'check-openuri-portal-version' into 'main'
openuriportal: Detect if the interface isn't there

Closes #5733

See merge request GNOME/gtk!5826
2023-04-13 20:44:03 +00:00
Georges Basile Stavracas Neto
8134daf843 Merge branch 'gbsneto/vulkan-mailbox' into 'main'
gdk/vulkancontext: Use more appropriate present mode

See merge request GNOME/gtk!5828
2023-04-13 17:07:59 +00:00
Georges Basile Stavracas Neto
9c013d40c1 gdk/vulkancontext: Use more appropriate present mode
Check if the driver supports MAILBOX and prefer using it; in its
absense, checkif the driver supports IMMEDIATE and prefer using
it; finally, if neither of them are supported, use the guaranteed
to be supported FIFO mode.
2023-04-13 13:54:45 -03:00
Benjamin Otte
d798372a53 Merge branch 'wip/otte/for-main' into 'main'
x11: Remove commented outdated code

See merge request GNOME/gtk!5827
2023-04-13 15:34:48 +00:00
Benjamin Otte
cfaf1b3e71 x11: Remove commented outdated code
... and it's copy/paste into the win32 backend
2023-04-13 17:15:35 +02:00
Benjamin Otte
9763d83a9d gdk: Remove unused vfunc 2023-04-13 17:15:35 +02:00
Benjamin Otte
5f82a496cb Merge branch 'wip/otte/wl-gloria-gaynor' into 'main'
wayland: Make wl_surface survive until surface is desstroyed

See merge request GNOME/gtk!5825
2023-04-13 15:12:07 +00:00
Matthias Clasen
0c35015c44 Merge branch 'wip/exalm/print-dialog' into 'main'
printunixdialog: Remove a redundant style class

See merge request GNOME/gtk!5823
2023-04-13 05:39:08 +00:00
Matthias Clasen
3da0572078 openuriportal: Detect if the interface isn't there
Check the portal version number before trying to use
it. Most importantly, this will detect the case where
the interface isn't supported at all, since the proxy
will report a version of 0 in that case.

Fixes: #5733
2023-04-13 07:24:38 +02:00
Matthias Clasen
c649d8a4ec Merge branch 'bilelmoussaoui/g-i' into 'main'
g-i: Fix GtkGLArea type name

See merge request GNOME/gtk!5824
2023-04-13 04:37:45 +00:00
Benjamin Otte
75bea01a86 wayland: Keep EGL window around when hidden
See previous commit:

We want to keep resources around as long as the surface exists.
2023-04-13 05:19:18 +02:00
Benjamin Otte
5d3cec5441 wayland: Don't destroy the wl_surface on hide()
We want to keep the wl_surface around, because surfaces create their
resources on construct and keep them until destroyed. See the HWND ond
Windows and the XWindow on X11.

This is relevant for graphics resources, where we want to have access
to the VkSurface and eglSurface while the GdkSurface is hidden.
We also want these surfaces to be permanent and not change during the
lifetime of the GdkSurface.

What we can - and must - destroy however are the xdg surfaces, because
those handle visibility on screen.
And we also need to ensure no buffer is attached, so that during the
next creation of the xdg surface we don't get a protocol error.
2023-04-13 04:23:35 +02:00
Benjamin Otte
891242920e wayland: Split out a function
We have a create_wl_surface(), create a matching destroy_wl_surface().
2023-04-13 02:56:12 +02:00
Benjamin Otte
b375f17f09 wayland: Remove useless function
gdk_wayland_surface_maybe_resize() just calls
gdk_wayland_surface_update_size(), so make all callers call that one
instead.

The check that it does is done by the other function again.
2023-04-13 02:48:47 +02:00
Benjamin Otte
ec69990126 wayland: Remove an old workaround
This workaround - were it ever to trigger - is broken today. It destroys
the wl_surface and all associated structs but does not recreate the
xdg_popup or xdg_toplevel struct, so it would cause a hidden window.

The workaround looked a lot different when it was introduced in commit
83b54bab57, too - both in what it did and
in what the vfuncs did that it called.
2023-04-13 02:44:05 +02:00
Bilal Elmoussaoui
aec5a5739e g-i: Fix GtkGLArea type name 2023-04-12 18:12:40 +00:00
Alexander Mikhaylenko
ac9e0039b8 printunixdialog: Remove a redundant style class
.view does absolutely nothing in Default style since the whole box is
covered with a GtkNotebook which has its own background, and adds an
unwanted background onto the tab strip in Adwaita.
2023-04-12 21:09:25 +04:00
Matthias Clasen
4574b21fd6 Merge branch 'dialogs-force-window-destruction' into 'main'
gtk/dialogs: Destroy the window promptly on finish async function

Closes #5741

See merge request GNOME/gtk!5820
2023-04-12 13:54:13 +00:00
Marco Trevisan (Treviño)
31c5961c4f gtk/dialogs: Destroy the window promptly on finish async function
Some bindings (GJS!) could add temporary references to the GAsyncResult
argument that we return, and thus to the GTask, which may cause the
dialog not to close when the finish function is called (but at garbage
collection instead!).

To prevent this, just manually destroy the window (by removing the task
data), so that we are not bound to the GTask lifetime anymore.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5741
2023-04-12 15:39:39 +02:00
Matthias Clasen
8fc3f06155 Merge branch 'filechooserentry-fixes' into 'main'
filechooserentry: Make filtering work again

Closes #5743

See merge request GNOME/gtk!5822
2023-04-12 10:38:04 +00:00
Matthias Clasen
5327203201 Merge branch 'wip/carlosg/multi-click-text-view' into 'main'
textview: Reset press counter if double/triple clicking on a different line

See merge request GNOME/gtk!5821
2023-04-12 10:11:16 +00:00
Matthias Clasen
8442fce962 Merge branch 'touch-no-double-click-threshold' into 'main'
gestureclick: Don't use threshold for touch

Closes #5580

See merge request GNOME/gtk!5798
2023-04-12 10:10:31 +00:00
Matthias Clasen
d8b46c16cc Merge branch 'stylus-fixes' into 'main'
gtk-demo: Test stylus-only mode

See merge request GNOME/gtk!5804
2023-04-12 10:10:11 +00:00
Matthias Clasen
4df7273266 filechooserentry: Plug a memory leak 2023-04-12 12:09:02 +02:00
Matthias Clasen
2b8fd89fd5 filechooserentry: Make filtering work again
We need to look at the filchooser::filtered-out
attribute to know which files the filesystem model
has filtered away.

Fixes: #5743
2023-04-12 12:08:43 +02:00
Carlos Garnacho
5b9a7863cf textview: Reset press counter if double/triple clicking on a different line
If we click close enough between lines, and with the maximum distances applied
by GtkGestureClick we could jump between lines when handling double/triple
click for word/line selection.

Ensure that the whole operation stays in the same line and reset the
gesture/counter if we do move between lines, so we start from scratch in the
new line.
2023-04-12 11:27:41 +02:00
G.Willems
d625ff8106 scalebutton: fix orientation not applied to scale 2023-04-11 23:54:06 +02:00
G.Willems
5ecd8a1c10 scalebutton: fix CSS name in documentation 2023-04-11 22:06:54 +02:00
Matthias Clasen
e9f7a9b8e6 Merge branch 'matthiasc/for-main' into 'main'
filechooser: Fix the gridview

See merge request GNOME/gtk!5817
2023-04-11 06:10:56 +00:00
Matthias Clasen
93b1130c07 filechooser: Fix the gridview
2a70093a30 was a bit overeager in its porting
to GtkColumnViewCell. The gridview needs to keep its
list items.
2023-04-11 07:41:09 +02:00
Matthias Clasen
db48cd6467 Merge branch 'wip/corey/file-chooser-widget' into 'main'
More fixes to filechooserwidget

See merge request GNOME/gtk!5815
2023-04-11 05:32:38 +00:00
Matthias Clasen
ba43a126b9 Merge branch 'wip/corey/filesystemmodel' into 'main'
filesystemmodel: Notify correct position removed in remove_file()

See merge request GNOME/gtk!5814
2023-04-11 05:27:24 +00:00
Corey Berla
2a70093a30 filechooser: Set date and time after cell is a child of filechooserwidget
The date/time column relies on the filechooserwidget to format the date
properly.  During bind, the filechoosercell, get the filechooserwidget
ancestor, but now due to changes in the listview, the cell isn't a
child of the filechooserwidget at that point.  Since this is deeply
ingrained into the filechooserwidget, let's keep the same behavior,
but move it to filechoosercell in realize.  Alternatively, we could have
used a signal factory (with the file chooser widget as the user data),
but that would have been a major overhaul.
2023-04-10 18:02:35 -07:00
Corey Berla
dd407dab00 filechoosercell: Store type_format in filechoosercell
The format of the type column depends on the the type_format, which
is stored in the filechooserwidget.  We get that setting by looking
for the filechooserwidget ancestor, which no longer works after recent
changes to the list views (it was fragile to begin with).  At one point,
the setting appears to have been dynamic, but now it is only loading
from GSettings, so let's simply do the same within FileChooserCell.
2023-04-10 18:02:35 -07:00
Corey Berla
ccae75022b filechooserwidget: Finish port to GtkColumnViewCell
Some missing updates from f5dea9a3c2
2023-04-10 18:02:24 -07:00
Corey Berla
faac2f7894 filesystemmodel: Notify correct position removed in remove_file()
32247bc50e made several changes to account for the
fact that we no longer have a NULL editable at the beginning of the list
model.  The commit mistakenly left out one change in remove_file(),
which causes the wrong file to be removed.
2023-04-10 12:56:08 -07:00
Matthias Clasen
d00b78d283 Merge branch 'matthiasc/for-main' into 'main'
node-editor: Typo fixes

See merge request GNOME/gtk!5812
2023-04-10 14:28:38 +00:00
Matthias Clasen
3eee1c0724 node-editor: Typo fixes
Fix some typos in the node format documentation.
2023-04-10 16:04:17 +02:00
Matthias Clasen
5e6bc681a3 Merge branch 'scrolled-window-critical' into 'main'
scrolledwindow: Avoid a critical

See merge request GNOME/gtk!5809
2023-04-10 05:50:20 +00:00