Commit Graph

76005 Commits

Author SHA1 Message Date
Matthias Clasen
8b91762c42 Merge branch 'deprecate-get-allocation' into 'main'
Deprecate get allocation

See merge request GNOME/gtk!5882
2023-04-28 22:49:42 +00:00
Matthias Clasen
01f39d8522 README: Updates
Drop the section that talked about main and how to update
local checkouts - its been 2 years, people should have gotten
around to it by now. Add some general git hints instead.
2023-04-28 17:31:12 -04:00
Benjamin Otte
e94416054c Merge branch 'wip/otte/for-main' into 'main'
Fix hangs on Wayland

Closes #5761

See merge request GNOME/gtk!5884
2023-04-28 21:22:12 +00:00
Benjamin Otte
b4c859c011 wayland: Set EGL swap interval to 0.
There's no need for EGL to do any timing, we do it in GTK already.

This fixes hangs in Mesa when we hide a surface after a SwapBuffers()
but before the frame callback arrives.
If we then reshow the surface and immediately render to it, Mesa would
still have a frame callback from before the hiding and forever poll()
waiting for the compositor to send the callback.

Fixes #5761
2023-04-28 22:40:39 +02:00
Benjamin Otte
45216e1c88 wayland: Disconnect the frame callback when hiding
Do not leave spurious frame callbacks around wen hiding surfaces.
Instead, store the callback and remove it.
2023-04-28 22:21:42 +02:00
Daniel Boles
7bea2685e1 migrating-3to4: Don't mention removed Box method &
donʼt mention its renamed successor either, as that has its own section
later. We could have another sentence paragraph like ‘In the case of
GtkBox, the pack methods have been renamed to X and lost the trailing
arguments Y’, but that wonʼt help people prepare still on GTK3, which is
the point in the affected section… so just remove the misleading relic.
2023-04-28 21:14:37 +01:00
Matthias Clasen
b7d1774c56 Merge branch 'matthiasc/for-main' into 'main'
Cosmetics

See merge request GNOME/gtk!5883
2023-04-28 20:09:17 +00:00
Matthias Clasen
3afd91ea06 Updates 2023-04-28 16:02:18 -04:00
Matthias Clasen
d7dd6ca552 Cosmetics 2023-04-28 15:36:37 -04:00
Matthias Clasen
9c40e8b873 Deprecate gtk_widget_get_allocated_baseline 2023-04-28 15:26:16 -04:00
Matthias Clasen
b201d66981 Stop using gtk_widget_get_allocated_baseline
Use gtk_widget_get_baseline instead.
2023-04-28 15:25:58 -04:00
Matthias Clasen
3ea289751d Add gtk_widget_get_baseline
This is just a renaming of gtk_widget_get_allocated_baseline
that fits better with gtk_widget_get_width/height.
2023-04-28 15:18:13 -04:00
Matthias Clasen
8205c7032a Deprecate gtk_widget_get_allocation 2023-04-28 15:05:39 -04:00
Matthias Clasen
ba379c928b flowbox: Use deprecation guards around get_allocation 2023-04-28 15:05:39 -04:00
Matthias Clasen
5306ef12f4 inspector: Show bounds instead of allocation 2023-04-28 15:05:39 -04:00
Matthias Clasen
be62147dee scrolledwindow: Stop using gtk_widget_get_allocation 2023-04-28 15:05:39 -04:00
Matthias Clasen
627ce3d447 textutil: Stop using gtk_widget_get_allocation 2023-04-28 15:05:39 -04:00
Matthias Clasen
79119e64f9 tetview: Stop using gtk_widget_get_allocation 2023-04-28 15:05:39 -04:00
Matthias Clasen
37b2b3cb83 text: Stop using gtk_widget_get_allocation 2023-04-28 15:05:39 -04:00
Boyuan Yang
731c1be9e0 Update Chinese (China) translation 2023-04-28 18:51:56 +00:00
Benjamin Otte
76777cdd18 Merge branch 'wip/otte/texturebuilder' into 'main'
Add GdkGLTextureBuilder

See merge request GNOME/gtk!5862
2023-04-28 15:58:10 +00:00
Matthias Clasen
bdec7782b4 Merge branch 'baseline-fixes' into 'main'
boxlayout: Fix baselines a bit

See merge request GNOME/gtk!5879
2023-04-28 14:40:57 +00:00
Matthias Clasen
55f5edffd1 More docs for BASELINE
Add some more details to the docs for GTK_ALIGN_BASELINE.
2023-04-28 09:21:15 -04:00
Matthias Clasen
bb961d062a widget: Handle baseline better
When adjusting allocations, treat BASELINE more like CENTER
than like FILL. The results are better, in particular for
controls like entries or switches, which we never want to
scale up vertically, but still want to align to the baseline.
2023-04-28 09:13:49 -04:00
Matthias Clasen
38ffd099eb image: Simplify baseline handling
We guarantee that the out arguments of the measure
vfunc are non-NULL, no need to check.
2023-04-28 09:12:22 -04:00
Matthias Clasen
12af75df9b switch: Fix up baseline handling
We need to report a baseline for baseline alignment
to work...
2023-04-28 08:52:05 -04:00
Matthias Clasen
d648a7721e spinbutton: Use a grid layout
A grid layout lets us get the baseline right in
vertical orientation, by setting a baseline row.

It would be nice if the box layout supported this
as well, but currently it doesn't, and adding that
feature isn't trivial.
2023-04-28 08:50:12 -04:00
Matthias Clasen
e187587643 boxlayout: Fix baselines a bit
When we are not doing height-for-width, we still
need to line up baselines.
2023-04-28 08:50:12 -04:00
Matthias Clasen
3766f1da8b Add another baseline test client 2023-04-28 08:50:12 -04:00
Matthias Clasen
92a9f8cd7e gldriver: Add a sync when creating textures 2023-04-28 06:23:45 +02:00
Matthias Clasen
b9a7e5fa85 gstreamer: Defer the sync
Don't sync right when we receive the buffer,
pass it along with the texture to be executed
later in the renderer.
2023-04-28 06:23:45 +02:00
Matthias Clasen
bec0afa61b glarea: Synchronize
Create a fence object and pass it along when
creating the GL texture, so that the GL renderer
can wait for the texture to be ready.
2023-04-28 06:23:40 +02:00
Matthias Clasen
bedc3dba7e filechooser: Plug a memory leak 2023-04-27 13:42:03 +02:00
Matthias Clasen
7c4acac135 Add some more valgrind suppressions 2023-04-27 13:42:03 +02:00
Matthias Clasen
0bb6988c0e columnview: Plug a memory leak
g_list_model_get_item strikes again.
2023-04-27 13:42:03 +02:00
Matthias Clasen
df3622b295 filechooser: Plug a memory leak
We own references to the columns. Drop them.
2023-04-27 13:42:03 +02:00
Matthias Clasen
df9f3fc694 filechoosernative: Plug a memory leak
Unref all the GVariants.
2023-04-27 13:42:03 +02:00
Matthias Clasen
39b3b2444b filedialog: Plug a memory leak
We own a reference to the native dialog,
and we need to drop it when we're done.
2023-04-27 13:42:03 +02:00
Matthias Clasen
c237643b24 node-editor: Plug a memory leak 2023-04-27 13:42:03 +02:00
Matthias Clasen
cc682a96d9 notebook: Drop an unused variable 2023-04-27 13:42:03 +02:00
Matthias Clasen
051b463c9a Fix various bitfield warnings
clang rightly complains about using gboolean
as type for bitfields, since it is signed.
Avoid that.
2023-04-27 13:42:03 +02:00
Matthias Clasen
8292b846d5 gsk: Synchronize when using textures
Pass the GLsync object from texture into our
command queue, and when executing the queue,
wait on the sync object the first time we
use its associated texture.
2023-04-27 06:57:02 +02:00
Matthias Clasen
6efaa79e3c gltexture: Synchronize when downloading
If the GL texture has a sync object, wait
on it before downloading the data.
2023-04-27 06:57:02 +02:00
Matthias Clasen
92eb845482 gltexture: Optionally take a sync object
Add a new function to TextureBuilder that takes a GLsync that
requires internal code to wait on before using the texture.

Somewhat sneakily, we don't take the sync if syncs are not supported by
the current GL context.
As public API has no code to query the sync for the destroy notify, this
is fine and it means we don't have to do the check every time we want to
call gdk_texture_get_sync() internally.
2023-04-27 06:55:37 +02:00
Matthias Clasen
5071e6154c glcontext: Add a way to check for GLsync 2023-04-27 06:54:49 +02:00
Benjamin Otte
18a4b2475e gltexture: Deprecate gdk_gl_texture_new()
Use GdkGLTextureBuilder instead.
2023-04-27 06:40:47 +02:00
Benjamin Otte
76e5fd0ece glrenderer: Port to GdkGLTextureBuilder 2023-04-27 06:40:47 +02:00
Benjamin Otte
fa44d258d0 media-gstreamer: Port to GdkGLTextureBuilder
This is a rudimentary port that does not take advantage of all the cool
new formats that we could support now.
2023-04-27 06:40:47 +02:00
Benjamin Otte
778979cf0e testsuite: Use GLTextureBuilder 2023-04-27 06:40:47 +02:00
Benjamin Otte
053a4d2e9d glarea: Port to GdkGLTextureBuilder 2023-04-27 06:40:47 +02:00