Benjamin Otte
be5f225022
testsuite: Be less verbose in accessor-apis test
...
Only print the tried names when --verbose is passed to the test.
2023-04-20 17:47:54 +02:00
Emin Tufan Çetin
427ed50759
Update Turkish translation
2023-04-19 13:22:31 +00:00
Matthias Clasen
9892243df6
Merge branch 'mask-node-transforms' into 'main'
...
Fix a comment
See merge request GNOME/gtk!5848
2023-04-19 07:44:45 +00:00
Matthias Clasen
83091c4f15
gsk: Use explicit switches
...
This makes it harder to forget to add new
node types here.
2023-04-19 09:19:12 +02:00
Matthias Clasen
503a5de7d1
gsk: Mask nodes support 2d transforms
...
When adding mask nodes, I overlooked that
we have two separate functions for determining
what transforms a node supports without offlines.
Since we claim that mask nodes support general
transform, they must certainly support 2d transforms
as well.
2023-04-19 08:13:55 +02:00
Matthias Clasen
d7d75f0b26
Fix a comment
...
I tried to improve things in d67101d46e
,
but I made it worse. The original note was meant
to be removed. Pointed out be Sebastian Bacher.
2023-04-19 07:49:36 +02:00
Benjamin Otte
40ac37245d
Merge branch 'angle-gles' into 'main'
...
gdk: prefer GLES when on win32/ANGLE
See merge request GNOME/gtk!5829
2023-04-17 11:56:03 +00:00
Marc-André Lureau
250414d6b3
gdk/win32: drop some unused variables
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-04-17 04:50:17 +00:00
Marc-André Lureau
d69cdf6c05
gdk: drop libangle GLES minimum version
...
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>
2023-04-17 04:50:17 +00:00
Marc-André Lureau
9532657fa2
gdk: use GLES when on win32/ANGLE
...
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>
2023-04-17 04:50:17 +00:00
Marc-André Lureau
3cb2115212
gdk: drop unused vertex_array_object
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-04-17 04:50:17 +00:00
Benjamin Otte
dd7c85adc3
Merge branch 'wip/otte/for-main' into 'main'
...
glrenderer: Don't try to use float framebuffers on GLES2
See merge request GNOME/gtk!5845
2023-04-17 04:49:59 +00:00
Benjamin Otte
8965d6c7f8
gl: Only allow RGB(A)8 on GLES2
...
GLES2 has no idea what 16bit textures even are, let alone floating point.
2023-04-17 05:57:44 +02:00
Benjamin Otte
d7309a009c
glrenderer: Don't try to use float framebuffers on GLES2
...
GLES doesn't know what that is.
2023-04-17 05:57:44 +02:00
Nelson Benítez León
bd9b117517
theme: more contrast for text entry selection color on dark theme
...
Part of #5725
2023-04-16 16:33:54 -04:00
Nelson Benítez León
a309a56acf
theme: fix 'hover' and 'check' colors for buttons under .toolbar
...
Buttons under .toolbar were using for their 'hover', 'active'
and 'check' colors the default ones from %button_basic_flat
which are very dimmed, so we explicitly darken them.
Part of #5725
2023-04-16 16:16:10 -04:00
Matthias Clasen
b6fac448d7
Merge branch 'matthiasc/for-main' into 'main'
...
Try harder to fix focus tests
See merge request GNOME/gtk!5842
2023-04-16 20:00:46 +00:00
Matthias Clasen
765f55dfbe
testsuite: Skip focus tests when necessary
...
If our window does not get focus, we can't reliably
test things that depend on widgets being focused.
2023-04-16 20:58:26 +02:00
Matthias Clasen
bebaad3e1f
Merge branch 'ccook/doc-changes' into 'main'
...
Two corrections that show up in docs
See merge request GNOME/gtk!5838
2023-04-16 18:16:36 +00:00
Matthias Clasen
db6a116d49
Try harder to fix focus tests
...
The focus test now asserts that its window is active.
So we should not run them in parallel with other tests,
since those might steal the focus.
2023-04-16 20:08:03 +02:00
Benjamin Otte
a299656c60
Merge branch 'wip/otte/alt.wl_surface.die.die.die' into 'main'
...
wayland: Don't leak all surfaces
See merge request GNOME/gtk!5840
2023-04-16 18:02:33 +00:00
Benjamin Otte
27fd0b907d
testsuite: Fix broken test to not unref surfaces twice
...
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.
2023-04-16 19:28:21 +02:00
Benjamin Otte
62951c7277
wayland: Don't leak all surfaces
...
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
.
2023-04-16 19:28:21 +02:00
Benjamin Otte
8e00f6e5e5
wayland: Don't insta-crash when a surface gets disposed
...
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.
2023-04-16 19:28:21 +02:00
Matthias Clasen
ff141a1ed4
Merge branch 'ccook/gtklabel-doc-changes' into 'main'
...
GtkLabel doc corrections
See merge request GNOME/gtk!5839
2023-04-16 17:07:49 +00:00
Matthias Clasen
25a10f502e
Merge branch 'focus-testsuite-fixes' into 'main'
...
text: Fix fallout from focus changes
See merge request GNOME/gtk!5841
2023-04-16 07:36:11 +00:00
Matthias Clasen
585fb497c1
testsuite: Actually wait for focus
...
We were failing to properly iterate the main
context here. Oops.
2023-04-16 09:11:24 +02:00
Matthias Clasen
c57e5811f1
tests: Check is-focus instead of has-focus
...
We are not presenting windows here.
2023-04-16 08:50:35 +02:00
Matthias Clasen
940a2b6923
text: Fix fallout from focus changes
...
We don't get proper notification for when the toplevel
is-active property changes, so monitor has-focus, and
update cursor blinking.
2023-04-16 08:49:20 +02:00
Cam Cook
3277e2ee3e
| method | current | suggestion |
...
|---------------------------------------------------------------------------------------|-----------------------------------------------------------------|----------------------------------------------------------------------|
| [get_attributes](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3242 ) | "use`pango_layout_get_attribute (gtk_label_get_layout (self))`" | "use`pango_layout_get_attributes (gtk_label_get_layout (self))`" [1] |
| [set_yalign](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L5897 ) | "(attributes org.gtk.Method.get_property=yalign)" | "(attributes org.gtk.Method.set_property=yalign)" |
| [get_yalign](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L5923 ) | "(attributes org.gtk.Method.set_property=yalign)" | "(attributes org.gtk.Method.get_property=yalign)" |
| [set_ellipsize](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3892 ) | "to ellipsizei" | "to ellipsize" |
| [get_attributes](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3239 ) | "from the labels markup" | "from the label's markup" |
[1] https://docs.gtk.org/Pango/method.Layout.get_attributes.html
2023-04-15 21:48:27 -04:00
Cam Cook
3e8489fea5
| method | current | suggestion |
...
|-------------------------------------------------------------------------------------------------|------------------------------------------------------------|-----------------------------------------------------------|
| [Entry/set_invisible_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2101 ) | "(attributes org.gtk.Method.sets_property=invisible-char)" | "(attributes org.gtk.Method.set_property=invisible-char)" |
| [FlowBox::activate](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkflowbox.c#L541 ) | "This can be happen either by" | "This can happen either by" |
2023-04-15 12:41:13 -04:00
Cam Cook
1035640020
Revert "Two corrections and added method linking that show up in docs"
...
This reverts commit c7f30ecdfd
.
2023-04-15 12:40:22 -04:00
Matthias Clasen
6cee73d100
Merge branch 'wip/otte/gles-fixes' into 'main'
...
GLES 2 fixes
See merge request GNOME/gtk!5837
2023-04-15 16:27:16 +00:00
Matthias Clasen
e4c43901c1
Merge branch 'matthiasc/for-main' into 'main'
...
window: Don't mark widget prematurely as has-focus
See merge request GNOME/gtk!5836
2023-04-15 16:09:32 +00:00
Cam Cook
c7f30ecdfd
Two corrections and added method linking that show up in docs
...
| method | current | suggestion |
|-------------------------------------------------------------------------------------------------|------------------------------------------------------------|-----------------------------------------------------------|
| [Entry/set_invisible_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2101 ) | "(attributes org.gtk.Method.sets_property=invisible-char)" | "(attributes org.gtk.Method.set_property=invisible-char)" |
| [FlowBox::activate](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkflowbox.c#L541 ) | "This can be happen either by" | "This can happen either by" |
| method | current | suggestion |
|-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------------|
| [Box/get_baseline_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbox.c#L461 ) | "value set by gtk_box_set_baseline_position()." | "value set by [method@Gtk.Box.set_baseline_position]." |
| [Box/get_spacing](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbox.c#L412 ) | "value set by gtk_box_set_spacing()." | "value set by [method@Gtk.Box.set_spacing]." |
| [CenterBox/get_baseline_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkcenterbox.c#L528 ) | "value set by gtk_center_box_set_baseline_position()." | "value set by [method@Gtk.CenterBox.set_baseline_position]." |
| [Entry/get_activates_default](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2296 ) | "value set by gtk_entry_set_activates_default()." | "value set by [method@Gtk.Entry.set_activates_default]." |
| [Entry/get_alignment](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2380 ) | "value set by gtk_entry_set_alignment()." | "value set by [method@Gtk.Entry.set_alignment]." |
| [Entry/get_extra_menu](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L3727 ) | "set with gtk_entry_set_extra_menu()." | "set with [method@Gtk.Entry.set_extra_menu]." |
| [Entry/get_has_frame](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2340 ) | "value set by gtk_entry_set_has_frame()." | "value set by [method@Gtk.Entry.set_has_frame]." |
| [Entry/get_progress_pulse_step](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L3372 ) | "set with gtk_entry_set_progress_pulse_step()." | "set with [method@Gtk.Entry.set_progress_pulse_step]." |
| [Fixed/get_child_transform](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkfixed.c#L314 ) | "set using gtk_fixed_set_child_transform()." | "set using [method@Gtk.Fixed.set_child_transform]." |
2023-04-15 12:08:46 -04:00
Benjamin Otte
b64f7050ba
testsuite: Make GLES testsuite run use GLES 2
...
We want to support GLES 2, so make sure we test that support.
Also force-disable common extensions we don't explicitly check for and
don't want to accidentally use.
2023-04-15 17:55:20 +02:00
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
4a22e681b3
text: Only claim primary when focused
...
It does not make sense otherwise, and has unfortunate
side-effects on Wayland.
2023-04-15 15:02:52 +02:00
Matthias Clasen
189aced844
wayland: Improve logging for primary selection
2023-04-15 15:02:52 +02:00
Matthias Clasen
d90cb02570
window: Don't mark widget prematurely as has-focus
...
has-focus is defined is-focus && toplevel::is-active.
We were forgetting to look at is_active when handling
focus widget changes.
2023-04-15 14:58:57 +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
Emmanuele Bassi
4ea818fee6
Add GtkButton:can-shrink
...
For certain kinds of layouts, especially ones where one or both sizes of
a top level is constrained by physical limits, it's acceptable to have
buttons that rely on the minimum size of their contents, rather than the
natural size. It is left to the application authors, or the localization
teams, to ensure that things like translations and font sizes do not
result in a broken UI.
2023-04-14 15:00:07 +01:00