Daniel Boles [Sun, 30 Apr 2023 15:55:31 +0000 (16:55 +0100)]
migrating-3to4: Fix unescaped ptr * used as italic
Daniel Boles [Sun, 30 Apr 2023 15:36:10 +0000 (16:36 +0100)]
gtk-demo/listbox: Fix 0 space between nick & date,
by restoring the right-alignment that gtk-3-24 has here, but we had lost
– I guess because we dropped the default child expand and pack-end props
Daniel Boles [Sun, 30 Apr 2023 15:05:11 +0000 (16:05 +0100)]
Inscription|InfoBar: Fix small cosmetic issue@docs
Daniel Boles [Sun, 30 Apr 2023 11:37:55 +0000 (11:37 +0000)]
Merge branch 'dboles/expander-css-nodes-doc' into 'main'
Expander: Clarify/format “CSS nodes” documentation
See merge request GNOME/gtk!5896
Daniel Boles [Sat, 29 Apr 2023 21:38:21 +0000 (22:38 +0100)]
Expander: Clarify/format CSS nodes documentation
Use backticks to highlight the node names, mention the box, and clarify
that the arrow referred to in the last sentence is the `expander` node.
Matthias Clasen [Sat, 29 Apr 2023 18:55:45 +0000 (18:55 +0000)]
Merge branch 'deprecated-get-allocated-width' into 'main'
Deprecated get allocated width
See merge request GNOME/gtk!5894
Matthias Clasen [Sat, 29 Apr 2023 18:30:59 +0000 (18:30 +0000)]
Merge branch 'box-baseline-child' into 'main'
boxlayout: Add a baseline child property
See merge request GNOME/gtk!5891
Matthias Clasen [Sat, 29 Apr 2023 18:27:59 +0000 (14:27 -0400)]
Deprecate gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 18:27:39 +0000 (14:27 -0400)]
tests: Stop using gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 18:10:53 +0000 (14:10 -0400)]
gtk4-demo: Stop using gtk_widget_get_allocated_size
Matthias Clasen [Sat, 29 Apr 2023 18:00:30 +0000 (14:00 -0400)]
popover: Stop using gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 17:59:15 +0000 (13:59 -0400)]
placesview: Stop using gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 17:58:15 +0000 (13:58 -0400)]
placessidebar: Stop using gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 17:54:14 +0000 (13:54 -0400)]
columnview: Stop using gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 18:29:14 +0000 (18:29 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
widget: Cosmetics
See merge request GNOME/gtk!5892
Benjamin Otte [Sat, 29 Apr 2023 18:11:21 +0000 (18:11 +0000)]
Merge branch 'wip/carlosg/x11-artifacts' into 'main'
gdk/x11: Invalidate whole surface after size change
See merge request GNOME/gtk!5857
Matthias Clasen [Sat, 29 Apr 2023 17:46:47 +0000 (13:46 -0400)]
docs: Mention baselines
Add a paragraph about baselines to the coordinates overview.
Matthias Clasen [Sat, 29 Apr 2023 17:35:24 +0000 (13:35 -0400)]
widget: Cosmetics
Rename allocated_size_baseline to allocated_baseline,
to match better with the other allocated_ fields.
Matthias Clasen [Sat, 29 Apr 2023 16:00:15 +0000 (12:00 -0400)]
spinbutton: Use GtkBoxLayout:baseline-child
This makes it so that vertical spin buttons are
properly aligned to the baseline.
Matthias Clasen [Sat, 29 Apr 2023 15:55:27 +0000 (11:55 -0400)]
Revert "spinbutton: Use a grid layout"
This reverts commit
d648a7721e826717fb2c675d8202ab34e879d521.
Matthias Clasen [Thu, 27 Apr 2023 12:57:09 +0000 (14:57 +0200)]
boxlayout: Add a baseline child property
In horizontal layout, we line up the baselines of all children to find
how much space we need above and below the box baseline.
In vertical layout, we need to pick one child to inherit the baseline
from, which is what the new GtkBoxLayout:baseline-child property is
about. It is the equivalent of GtkGridLayout:baseline-row.
Daniel Boles [Sat, 29 Apr 2023 17:12:30 +0000 (18:12 +0100)]
EventController: Fix type "even propagation"→event
Matthias Clasen [Sat, 29 Apr 2023 15:45:39 +0000 (11:45 -0400)]
Remove more debug spew
Matthias Clasen [Sat, 29 Apr 2023 14:16:42 +0000 (14:16 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
entry: Ignore the baseline when centering
See merge request GNOME/gtk!5889
Matthias Clasen [Sat, 29 Apr 2023 13:47:59 +0000 (09:47 -0400)]
widget: Don't set baselines when unused
When we are not doing baseline alignment, don't pass
a baseline to the allocated widget. This helps because
a number of widgets (GtkLabel, GtkEntry, etc) always
position their text on the given baseline.
Matthias Clasen [Sat, 29 Apr 2023 13:20:07 +0000 (09:20 -0400)]
entry: Ignore the baseline when centering
GtkEntry was always placing its text on the baseline,
even when the valign said something else.
Matthias Clasen [Sat, 29 Apr 2023 12:27:23 +0000 (12:27 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
theme: Reinstate switch labels in hc
See merge request GNOME/gtk!5888
Matthias Clasen [Sat, 29 Apr 2023 12:00:07 +0000 (08:00 -0400)]
testbaseline2: Don't set height-requests
Widget with height requests have their baselines
ignored. Oops.
Matthias Clasen [Sat, 29 Apr 2023 11:58:42 +0000 (07:58 -0400)]
theme: Reinstate switch labels in hc
Since we show them in GNOME shell, show them here too.
The comment that says "only show these in the a11y
theme" was still there, but we were always hiding them.
Carlos Garnacho [Fri, 21 Apr 2023 08:58:19 +0000 (10:58 +0200)]
gdk/x11: Invalidate whole surface after size change
The Expose events following a ConfigureNotify may arrive at
a time that we did not resize the surface yet, making these
expose events a no-op. Even though gsk/gtk take care of the
window content itself, this might lead to unrendered portions
of the window shadow.
This may be seen with GSK_RENDERER=cairo and GDK_BACKEND=x11,
attempting to tile a window (e.g. gtk4-demo) left or right.
The window will show black rectangles or other artifacts in
the window shadow areas that correspond to the newly painted
portions (as the window needs to expand vertically).
In order to fix this with a similar behavior to Wayland,
consider ourselves the whole surface invalidated after resize,
in order to ensure everything is painted from scratch.
Fabio Tomat [Sat, 29 Apr 2023 08:57:53 +0000 (08:57 +0000)]
Update Friulian translation
Benjamin Otte [Sat, 29 Apr 2023 03:43:45 +0000 (03:43 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
wayland: Use wl_surface_damage_buffer() in Cairo
See merge request GNOME/gtk!5886
Benjamin Otte [Fri, 28 Apr 2023 02:28:23 +0000 (04:28 +0200)]
rendernode: Add diffing for affine transforms
This will be needed most importantly for inverted textures,
like in GLArea.
Benjamin Otte [Sat, 29 Apr 2023 03:07:03 +0000 (05:07 +0200)]
wayland: Use wl_surface_damage_buffer() in Cairo
... when it is available.
Also introduce the new function gdk_rectangle_transform_affine(), which
looks like overkill for this purpose, but I'm about to use it elsewhere.
Matthias Clasen [Sat, 29 Apr 2023 01:15:58 +0000 (01:15 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
shortcutswindow: Avoid criticals
See merge request GNOME/gtk!5885
Matthias Clasen [Sat, 29 Apr 2023 00:44:18 +0000 (20:44 -0400)]
shortcutswindow: Avoid criticals
No point in resetting accessible relations
when we are in finalize.
Matthias Clasen [Fri, 28 Apr 2023 23:00:31 +0000 (23:00 +0000)]
Merge branch 'clarify-swapped-default-object-signal' into 'main'
builder: Clarify default "swapped" value when "object" is set for signals
See merge request GNOME/gtk!4514
Matthias Clasen [Fri, 28 Apr 2023 22:57:10 +0000 (22:57 +0000)]
Merge branch 'gtkshortcutswindow_a11y' into 'main'
GtkShortcutsWindow: Allow a screen reader user to browse the available shortcuts
See merge request GNOME/gtk!5042
Matthias Clasen [Fri, 28 Apr 2023 22:55:42 +0000 (22:55 +0000)]
Merge branch 'harmonize-would_drop' into 'main'
Harmonize would_drop() replacement for g_log_writer_default_would_drop()
See merge request GNOME/gtk!4935
Matthias Clasen [Fri, 28 Apr 2023 22:49:42 +0000 (22:49 +0000)]
Merge branch 'deprecate-get-allocation' into 'main'
Deprecate get allocation
See merge request GNOME/gtk!5882
Matthias Clasen [Fri, 28 Apr 2023 21:29:08 +0000 (17:29 -0400)]
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.
Benjamin Otte [Fri, 28 Apr 2023 21:22:12 +0000 (21:22 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
Fix hangs on Wayland
Closes #5761
See merge request GNOME/gtk!5884
Benjamin Otte [Fri, 28 Apr 2023 20:40:39 +0000 (22:40 +0200)]
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
Benjamin Otte [Fri, 28 Apr 2023 20:21:42 +0000 (22:21 +0200)]
wayland: Disconnect the frame callback when hiding
Do not leave spurious frame callbacks around wen hiding surfaces.
Instead, store the callback and remove it.
Daniel Boles [Fri, 28 Apr 2023 20:11:12 +0000 (21:11 +0100)]
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.
Matthias Clasen [Fri, 28 Apr 2023 20:09:17 +0000 (20:09 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Cosmetics
See merge request GNOME/gtk!5883
Matthias Clasen [Fri, 28 Apr 2023 20:02:18 +0000 (16:02 -0400)]
Updates
Matthias Clasen [Fri, 28 Apr 2023 19:36:37 +0000 (15:36 -0400)]
Cosmetics
Matthias Clasen [Fri, 28 Apr 2023 19:19:22 +0000 (15:19 -0400)]
Deprecate gtk_widget_get_allocated_baseline
Matthias Clasen [Fri, 28 Apr 2023 19:25:09 +0000 (15:25 -0400)]
Stop using gtk_widget_get_allocated_baseline
Use gtk_widget_get_baseline instead.
Matthias Clasen [Fri, 28 Apr 2023 19:18:13 +0000 (15:18 -0400)]
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.
Matthias Clasen [Fri, 28 Apr 2023 19:03:30 +0000 (15:03 -0400)]
Deprecate gtk_widget_get_allocation
Matthias Clasen [Fri, 28 Apr 2023 18:57:03 +0000 (14:57 -0400)]
flowbox: Use deprecation guards around get_allocation
Matthias Clasen [Fri, 28 Apr 2023 19:03:07 +0000 (15:03 -0400)]
inspector: Show bounds instead of allocation
Matthias Clasen [Fri, 28 Apr 2023 18:27:07 +0000 (14:27 -0400)]
scrolledwindow: Stop using gtk_widget_get_allocation
Matthias Clasen [Fri, 28 Apr 2023 18:16:32 +0000 (14:16 -0400)]
textutil: Stop using gtk_widget_get_allocation
Matthias Clasen [Fri, 28 Apr 2023 18:10:07 +0000 (14:10 -0400)]
tetview: Stop using gtk_widget_get_allocation
Matthias Clasen [Fri, 28 Apr 2023 17:29:15 +0000 (13:29 -0400)]
text: Stop using gtk_widget_get_allocation
Boyuan Yang [Fri, 28 Apr 2023 18:51:56 +0000 (18:51 +0000)]
Update Chinese (China) translation
Benjamin Otte [Fri, 28 Apr 2023 15:58:10 +0000 (15:58 +0000)]
Merge branch 'wip/otte/texturebuilder' into 'main'
Add GdkGLTextureBuilder
See merge request GNOME/gtk!5862
Matthias Clasen [Fri, 28 Apr 2023 14:40:57 +0000 (14:40 +0000)]
Merge branch 'baseline-fixes' into 'main'
boxlayout: Fix baselines a bit
See merge request GNOME/gtk!5879
Matthias Clasen [Fri, 28 Apr 2023 13:21:15 +0000 (09:21 -0400)]
More docs for BASELINE
Add some more details to the docs for GTK_ALIGN_BASELINE.
Matthias Clasen [Thu, 27 Apr 2023 20:19:24 +0000 (22:19 +0200)]
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.
Matthias Clasen [Thu, 27 Apr 2023 20:19:01 +0000 (22:19 +0200)]
image: Simplify baseline handling
We guarantee that the out arguments of the measure
vfunc are non-NULL, no need to check.
Matthias Clasen [Thu, 27 Apr 2023 20:18:20 +0000 (22:18 +0200)]
switch: Fix up baseline handling
We need to report a baseline for baseline alignment
to work...
Matthias Clasen [Thu, 27 Apr 2023 18:24:49 +0000 (20:24 +0200)]
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.
Matthias Clasen [Thu, 27 Apr 2023 16:14:49 +0000 (18:14 +0200)]
boxlayout: Fix baselines a bit
When we are not doing height-for-width, we still
need to line up baselines.
Matthias Clasen [Thu, 27 Apr 2023 15:56:12 +0000 (17:56 +0200)]
Add another baseline test client
Matthias Clasen [Tue, 25 Apr 2023 09:48:50 +0000 (11:48 +0200)]
gldriver: Add a sync when creating textures
Matthias Clasen [Tue, 25 Apr 2023 09:44:21 +0000 (11:44 +0200)]
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.
Matthias Clasen [Sat, 28 Jan 2023 16:04:10 +0000 (11:04 -0500)]
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.
Matthias Clasen [Thu, 27 Apr 2023 06:46:25 +0000 (08:46 +0200)]
filechooser: Plug a memory leak
Matthias Clasen [Thu, 27 Apr 2023 06:33:03 +0000 (08:33 +0200)]
Add some more valgrind suppressions
Matthias Clasen [Thu, 27 Apr 2023 06:26:53 +0000 (08:26 +0200)]
columnview: Plug a memory leak
g_list_model_get_item strikes again.
Matthias Clasen [Thu, 27 Apr 2023 06:26:13 +0000 (08:26 +0200)]
filechooser: Plug a memory leak
We own references to the columns. Drop them.
Matthias Clasen [Thu, 27 Apr 2023 06:25:30 +0000 (08:25 +0200)]
filechoosernative: Plug a memory leak
Unref all the GVariants.
Matthias Clasen [Thu, 27 Apr 2023 05:22:38 +0000 (07:22 +0200)]
filedialog: Plug a memory leak
We own a reference to the native dialog,
and we need to drop it when we're done.
Matthias Clasen [Thu, 27 Apr 2023 04:51:30 +0000 (06:51 +0200)]
node-editor: Plug a memory leak
Matthias Clasen [Thu, 27 Apr 2023 11:41:16 +0000 (13:41 +0200)]
notebook: Drop an unused variable
Matthias Clasen [Thu, 27 Apr 2023 04:46:36 +0000 (06:46 +0200)]
Fix various bitfield warnings
clang rightly complains about using gboolean
as type for bitfields, since it is signed.
Avoid that.
Matthias Clasen [Sat, 28 Jan 2023 20:20:26 +0000 (15:20 -0500)]
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.
Matthias Clasen [Mon, 30 Jan 2023 13:35:43 +0000 (08:35 -0500)]
gltexture: Synchronize when downloading
If the GL texture has a sync object, wait
on it before downloading the data.
Matthias Clasen [Tue, 25 Apr 2023 09:03:51 +0000 (11:03 +0200)]
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.
Matthias Clasen [Wed, 26 Apr 2023 09:59:51 +0000 (11:59 +0200)]
glcontext: Add a way to check for GLsync
Benjamin Otte [Mon, 24 Apr 2023 20:44:01 +0000 (22:44 +0200)]
gltexture: Deprecate gdk_gl_texture_new()
Use GdkGLTextureBuilder instead.
Benjamin Otte [Mon, 24 Apr 2023 20:36:42 +0000 (22:36 +0200)]
glrenderer: Port to GdkGLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 20:22:07 +0000 (22:22 +0200)]
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.
Benjamin Otte [Mon, 24 Apr 2023 20:10:06 +0000 (22:10 +0200)]
testsuite: Use GLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 20:02:10 +0000 (22:02 +0200)]
glarea: Port to GdkGLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 19:56:49 +0000 (21:56 +0200)]
texturebuilder: Pass the destroy notify to the build() function
This is more compatible with bindings that want to create per-object
callbacks and not have their callbacks reused over different build()
calls.
Benjamin Otte [Mon, 24 Apr 2023 12:36:38 +0000 (14:36 +0200)]
texturebuilder: Add ::format and ::has-mipmap
We were trying to deduce that previously. Now we have explicit API
Benjamin Otte [Mon, 24 Apr 2023 04:04:26 +0000 (06:04 +0200)]
gdk: Add GdkGLTextureBuilder
Building GL textures is complicated, so create an object to make them.
So far, this object just contains the functionality of
gdk_gl_texture_new(), but that will change in the future.
Matthias Clasen [Thu, 27 Apr 2023 04:37:12 +0000 (04:37 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Fix the build with clang
See merge request GNOME/gtk!5876
Benjamin Otte [Thu, 27 Apr 2023 00:39:19 +0000 (00:39 +0000)]
Merge branch 'wip/otte/gl-version' into 'main'
Make sure highest possible version GLContext is created
See merge request GNOME/gtk!5870
Benjamin Otte [Wed, 26 Apr 2023 16:08:59 +0000 (18:08 +0200)]
wgl: Improve error messages when GL init fails
In particular, we want to get the GL version, when the Windows box/VM
has an unsuitable GL implementation.
This is somewhat helpful in analyzing failures to bring up GL on
machines where users claim GL does work.
Benjamin Otte [Wed, 26 Apr 2023 04:16:37 +0000 (06:16 +0200)]
wgl: Create context during WGL initialization
This way, we can realize it and either print success information about
it or return NULL if that fails.
This makes it more likely that we fail early, which means we can then
initialize EGL.
Benjamin Otte [Wed, 26 Apr 2023 03:54:45 +0000 (05:54 +0200)]
win32: Get rid of display->gl_version
We can just query the display's GL context.
And it's not used otherwise anymore.
Benjamin Otte [Wed, 26 Apr 2023 02:17:32 +0000 (04:17 +0200)]
win32: Refactor context creation
This refactor achieves the following:
* check GL version against proper matching context version
In particular, for legacy contexts, we now actually check
* make sure the actual version is set, even for legacy contexts
* make sure set_is_legacy() is set properly
Benjamin Otte [Tue, 25 Apr 2023 21:18:36 +0000 (23:18 +0200)]
gdk: Add workaround for Visual Studio
apparently casting something to itself makes it not constant.
Benjamin Otte [Tue, 25 Apr 2023 20:50:00 +0000 (22:50 +0200)]
mac: Properly set GLContext.is_legacy()