treelistmodel: Don't add items in reverse
Closes#5707
See merge request GNOME/gtk!5744
(cherry picked from commit c5a53f235a)
1718db14 treelistmodel: Don't add items in reverse
cd860beb Add a test for splicing treelistmodel
Accumulated backports for 4.10
This branch has my cherry-picks from main since we branched after 4.10.1.
Two inscription reftests are failing, but they were also failing before.
See merge request GNOME/gtk!5856
GLES 2.0 version is fine now with current gtk according to B. Otte.
Let's use the same minimum requirement for all implementations.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
When using GDK_DEBUG=gl-egl, we end up using GL, but that is not well supported:
Creating EGL context version 3.0 (debug:no, forward:no, legacy:yes, es:no)
Created EGL context[0000000000000004]
OpenGL version: 0.0 (legacy)
* GLSL version: (NULL)
* Max texture size: -1059701680
* Extensions checked:
- GL_KHR_debug: no
- GL_EXT_unpack_subimage: yes
- OES_vertex_half_float: no
** (gtk4-demo.exe:14324): WARNING **: 19:16:41.468: Compile failure in
vertex shader:
ERROR: 0:7: 'gl_Position' : undeclared identifier
---8<---
Use GLES when EGL implementation is ANGLE.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
The test doesn't hold 2 references, it holds only one.
The reason one unref can cause a leak is that some backends - like X11 -
only destroy the surface once the DestroyNotify event from the X server
has come in.
X11 does add an extra reference to surfaces that gets released when the
DestroyNotify event arrives.
Wayland doesn't ave such an event, so that reference never gets
released.
This fixes a copy/paste error introduced in commit 590f3dfa1f.
We want to remove the event queue from the list of event queues, not the
surface.
Otherwise the freed queue stays in the list and the next time an event
comes in, we access invalid memory.
Fixes thinko introduced in commit 7fafa5133b.
Luckily, we leak all surfaces, so this problem never occured.
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.
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
.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.
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
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.