Commit Graph

79679 Commits

Author SHA1 Message Date
Matthias Clasen
60ddf7c421 Merge branch 'wip/smcv/no-zink-when-screen-scraping' into 'main'
testsuite: Force Mesa to use software GL when asserting about stderr

Closes #6478

See merge request GNOME/gtk!6949
2024-03-15 17:05:12 +00:00
Tim Sabsch
1922174c9f Update German translation 2024-03-14 20:36:56 +00:00
Changwoo Ryu
3c39c5259e Update Korean translation 2024-03-14 10:57:06 +00:00
Matthias Clasen
f5a6d93939 Merge branch 'wip/otte/who-framed-roger-rabbit' into 'main'
Don't reuse frames while they're in use

See merge request GNOME/gtk!7030
2024-03-14 10:21:34 +00:00
Benjamin Otte
30dddf2412 gpu: Refactor waiting for frames
Instead of having renderer API to wait for any number of frames, just
have gsk_gpu_frame_wait() to wait for a single frame.

This unifies behavior on Vulkan and GL, because unlike Vulkan, GL does
not allow waiting for multiple fences.

To make up for it, we replace waiting for multiple frames with finding
the frame with the earliest timestamp and waiting for that one.

Also implement wait() for GL.
2024-03-14 06:06:33 +01:00
Benjamin Otte
b43950d0f7 gpu: Don't reuse frames while they're in use
This copies the Vulkan idea of using a fence at the end of command
submission and waiting until it gets signaled before reusing the frame.

This frees up the GL driver from doing the work of making buffers etc
reusable and instead allocates new ones when they're still in use and is
a pretty massive performance win.
2024-03-14 04:53:12 +01:00
Matthias Clasen
6e5a183c98 Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Skip gl shader when necessary

Closes #6538

See merge request GNOME/gtk!7029
2024-03-14 01:29:32 +00:00
Matthias Clasen
d224110b48 gtk-demo: Skip the transitions demo when necessary
This demo uses GL shader nodes which only work with the GL renderer,
therefore skip the demo unless the GL renderer is in use.

Fixes: #6538
2024-03-13 21:02:17 -04:00
Matthias Clasen
8f356c2e8c gtk-demo: Skip gl shader when necessary
GL shader nodes only work with the GL renderer, therefore skip
the Shader in the list unless the GL renderer is in use.

Fixes: #6538
2024-03-13 21:02:10 -04:00
Matthias Clasen
139ed2c900 Merge branch 'textview-cursor-anchor' into 'main'
textview: Fix cursor/anchor mixup when retrieving surrounding text

Closes #6460

See merge request GNOME/gtk!6929
2024-03-14 00:07:41 +00:00
Matthias Clasen
32e21d5402 Merge branch 'speedup-inner-loop' into 'main'
Simplify our inner loop

See merge request GNOME/gtk!7026
2024-03-13 12:41:43 +00:00
Marek Kasik
fb3d8b8523 printing: Avoid accessing freed printers
Print backend can be disposed together with all its printers
as a reaction to user stopping enumeration of printers.
Adding a weak pointer help us to detect that the backend
was disposed and hence the backend and its printers should not
be used anymore.

Fixes #6265
2024-03-13 11:17:42 +01:00
Matthias Clasen
380523b41b gsk: Eschew more divisions
Pull out a pango_scale_inv constant, and use it.
2024-03-13 01:26:14 -04:00
Matthias Clasen
2fda256bb0 gsk: Avoid some unnecessary calls
Most of the time, the image we get for the glyphs will be the
same (the atlas), so avoid adding it to the descriptor set over
and over, and check first if have to. This matches what the
pattern variant of this function already does.
2024-03-13 01:03:32 -04:00
Matthias Clasen
c71a66b6f6 gsk: Simplify our inner loop
Pull out the if-else and precompute things before the loop.
2024-03-13 01:03:31 -04:00
Matthias Clasen
cb92778478 gsk: Drop the glyph-align flag
It wasn't doing anymore what it was designed for, and we are not
sure that we need it.
2024-03-13 01:00:49 -04:00
Matthias Clasen
ab67936a64 Merge branch 'matthiasc/for-main' into 'main'
Drop an unused header

See merge request GNOME/gtk!7025
2024-03-13 04:44:07 +00:00
Matthias Clasen
0ae2c1a8a7 Drop an unused header
This came in with a GskPath-related merge, but it isn't used
anywhere. So drop it for now.
2024-03-12 22:14:31 -04:00
Matthias Clasen
4e166f39fe Merge branch 'matthiasc/for-main' into 'main'
Some small fixes and improvements

See merge request GNOME/gtk!7022
2024-03-12 20:52:48 +00:00
Matthias Clasen
5f79958716 gsk: Simplify some code
Just initialize the rect directly. This matches better what the
pattern variant of this method does, and it also has the nice
side-effect of eliminating the handling of negative scales in
gsk_rect_scale, which we don't need here, since our scales are

always positive.
2024-03-12 16:13:42 -04:00
Matthias Clasen
aee0af34af filechooser: Assert that a string isn't NULL
It shouldn't ever be NULL, but lets make that explicit. since I've
been seeing crash reports that look like people are getting NULL
here.
2024-03-12 14:58:13 -04:00
Matthias Clasen
7e32eb2e98 entry: Add some tests for editable implementation
Test some of the editable api that is used in the filechooser
entry, since people are seeing crashes there.
2024-03-12 14:58:13 -04:00
Matthias Clasen
7ea7d5c390 Merge branch '6520_dont_drag_hidden_paned_handle' into 'main'
paned: don't claim drag-begin on invisible handle

Closes #6520

See merge request GNOME/gtk!7016
2024-03-12 15:46:53 +00:00
Matthias Clasen
e3e9dda429 Merge branch 'macos_ci' into 'main'
Maintenance update for macOS Intel CI

See merge request GNOME/gtk!7005
2024-03-12 15:45:59 +00:00
Matthias Clasen
a3ab25bf1d Merge branch 'wip/chergert/defer-cache-cleanup' into 'main'
gtk/textview: defer GtkTextLineDisplay finalization

See merge request GNOME/gtk!7019
2024-03-12 15:42:30 +00:00
Artur S0
095dec9238 Update Russian translation 2024-03-12 13:25:35 +00:00
Daniel Rusek
0e34365139 Update Czech translation 2024-03-12 12:40:43 +00:00
Matthias Clasen
88a62564f1 Merge branch 'matthiasc/for-main' into 'main'
Matthiasc/for main

See merge request GNOME/gtk!7020
2024-03-12 12:14:27 +00:00
Matthias Clasen
6ac94dc5c3 Post-release version bump 2024-03-12 08:12:52 -04:00
Matthias Clasen
5a9a0874bd 4.14.0 2024-03-12 07:52:13 -04:00
Matthias Clasen
91992111c3 Merge branch 'matthiasc/for-main' into 'main'
gsk: Rework font reloading again

See merge request GNOME/gtk!7018
2024-03-12 11:47:20 +00:00
Daniel Mustieles
120d874805 Update Spanish translation 2024-03-12 08:35:58 +00:00
Matthias Clasen
9454bad891 gsk: Rework font reloading again
Make a single gsk_reload_font helper that can tweak both
scale and font options, so we can ensure that our scaled
font has hint-metrics turned off (pango pays attention to
hint metrics when sizing and rendering hex boxes, and that
hurts us.
2024-03-12 00:45:14 -04:00
Christian Hergert
9cb410fd9b gtk/textview: defer GtkTextLineDisplay finalization
Defer the finalization of our GtkTextLineDisplay until we've completed
processing the current frame. Otherwise we risk doing additional work that
could cause us to miss our frame deadline.
2024-03-11 21:05:35 -07:00
Matthias Clasen
0f3fbed13c Merge branch 'wip/otte/for-main' into 'main'
Don't offscreen subsurface nodes

Closes #6499

See merge request GNOME/gtk!7009
2024-03-11 23:33:24 +00:00
Matthias Clasen
43ee9746bd Merge branch 'matthiasc/for-main' into 'main'
gsk: Avoid some roundf calls

See merge request GNOME/gtk!7017
2024-03-11 23:21:27 +00:00
Matthias Clasen
7283c5c22f gsk: Avoid some roundf calls
It seems that gcc has a hard time using intrinsics for round,
so help it out by using floor (x + .5).
2024-03-11 17:41:39 -04:00
Matthias Clasen
8b71fe4af6 Add an xfail for a rounded-clip test
This needs some changes in how we prevent offscreens from getting
too big. Filed as #6532.
2024-03-11 17:08:33 -04:00
René de Hesselle
b627fb5970 ci: Install ninja from wheel for Big Sur runner
This avoids building it on the Big Sur Intel runner (because of
Python 3.8) which would require us to provide cmake.
2024-03-11 21:30:37 +01:00
Matthias Clasen
be3ad1ef99 Merge branch 'wip/chergert/fix-6529' into 'main'
gtk/imcontext: fix ABI break via activate_osk_with_event

Closes #6529

See merge request GNOME/gtk!7015
2024-03-11 20:15:35 +00:00
g.willems
54264a9f78 paned: don't claim drag-begin on invisible handle
Paned handles are hidden when any of its children are hidden too,
but drag events were still accepted around the (virtual) handle position.

Instead, deny drag-begin when handle is hidden.

Fixes #6520
Closes #6520
2024-03-11 20:39:47 +01:00
Matthias Clasen
65380c66bd Merge branch 'matthiasc/for-main' into 'main'
label: Don't forget to clear select info

See merge request GNOME/gtk!7012
2024-03-11 19:35:51 +00:00
Matthias Clasen
8c96991ce0 Merge branch 'text-view-cursor-blink' into 'main'
textview: Match cursor blink behavior of GtkText

Closes #6515

See merge request GNOME/gtk!7014
2024-03-11 19:13:09 +00:00
Christian Hergert
07a44993ac gtk/imcontext: fix ABI break via activate_osk_with_event
Fixes #6529
2024-03-11 12:06:22 -07:00
Matthias Clasen
60d2d25463 Merge branch 'wip/public-activate-osk' into 'main'
gtkimcontext: Make gtk_im_context_activate_osk() public

See merge request GNOME/gtk!7013
2024-03-11 17:59:42 +00:00
Carlos Garnacho
907f99b176 gtkimcontextwayland: Drop the implicit gesture
Expect all users to call gtk_im_context_activate_osk() to get
on-screen keyboard features.
2024-03-11 18:04:16 +01:00
Carlos Garnacho
ce6aa73c64 gtkimcontext: Make gtk_im_context_activate_osk() public
Make this API public so that foreign "text" widgets (e.g. VteTerminal)
have a chance to integrate this logic into their own event controllers,
without having to craft the behavior of their own gestures around the
built-in IM gesture.

In order to make it most useful for other backends, a GdkEvent argument
and a boolean return value were added. This might be useful information
for other platforms than Wayland, e.g. all investigation seems to hint
that on Windows only the a11y keyboard is available programmatically
via app launching, so the IM method implementation would need to set
up its own policies for showing up the OSK (e.g. on touch events).
2024-03-11 18:04:14 +01:00
Matthias Clasen
257bef85d0 textview: Match cursor blink behavior of GtkText
This makes the conditions in cursor_blinks() more similar to
what GtkText does, and fixes adds the same notify handler for
has-focus, so we start blinking when requires. Crucially, we
also no longer try to blink when unmapped, which should fix
a epiphany crash.

Fixes: #6515
2024-03-11 11:34:40 -04:00
Matthias Clasen
a48df87a85 label: Don't forget to clear select info
This was showing up as crashes in the testsuite, where a later
test runs the mainloop, and that causes Wayland to claim the
primary selection on a widget that is already disposed.
2024-03-11 08:31:41 -04:00
Matthias Clasen
fe4cd7cf0f Merge branch 'matthiasc/for-main' into 'main'
Add more offload tests

See merge request GNOME/gtk!7010
2024-03-11 02:31:13 +00:00