Commit Graph

79693 Commits

Author SHA1 Message Date
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
Matthias Clasen
229b34d478 Add more offload tests
These test various clip scenarios.
2024-03-10 22:08:44 -04:00
Benjamin Otte
1985f2c9ad gpu: Make intersecting rounded rect with NONE clip always succeed
This is a tricky topic, because it can make the clip bounds grow, so
previously we were trying to be careful.

However, this can cause perfectly trivial intersections to fail that are
caused by redraw diff regions.
And in the worst case, that means we offscreen in places where we
absolutely do not want to offscreen - in subtrees with subsurface nodes.

Fixes #6499
2024-03-11 01:39:40 +01:00
Benjamin Otte
01d57a7566 gpu: Initial clip is always NONE
We scissor the initial clip (which is why it's an integer rect that is
assigned to the scissor). And if we scissor, the result is a NONE clip.
2024-03-11 01:39:40 +01:00
Benjamin Otte
7a4b2c10c7 gpu: contained clip is a rectangular clip, too
So we can treat it like rect clip and promote it to NONE after a
successful scissor.
2024-03-11 01:39:40 +01:00
Benjamin Otte
208b2d37b6 gpu: Clarify clip types
CLIP_TYPE_NONE is valid if the clip is implemented by the scissor rect.

We always have a scissor rect and there's no way to draw outside of it.

In theory that means we can reset the clip to NONE at any point we
wish if we know nodes are contained inside a certain pixel-aligned
rectangle we can clip.
In practice that's probably quite hard...
2024-03-11 01:39:40 +01:00
Benjamin Otte
ef98912779 nodeparser: Print subsurface nodes properly
The nodes actually end.

Tests included.
2024-03-11 01:39:40 +01:00
Matthias Clasen
b1e3b18ede Merge branch 'matthiasc/for-main' into 'main'
ci: Add more xfails

See merge request GNOME/gtk!7007
2024-03-10 23:57:42 +00:00
Matthias Clasen
0194cadbc0 ci: Add more xfails
The gradient tests are prone to rounding errors when clipped,
so fail them.
2024-03-10 16:53:12 -04:00
Matthias Clasen
b4dfc4adfc NEWS: Updates 2024-03-10 13:45:57 -04:00
Ask Hjorth Larsen
fd556ec377 Update Danish translation 2024-03-10 17:33:33 +00:00
Matthias Clasen
1dbc1d67f5 Merge branch 'wip/otte/correct-fps' into 'main'
Fix fps display

See merge request GNOME/gtk!7003
2024-03-10 17:31:46 +00:00
Balázs Úr
8790c83a76 Update Hungarian translation 2024-03-10 15:56:09 +00:00
Brage Fuglseth
6b202fb838 Update Norwegian Bokmål translation 2024-03-10 13:15:47 +00:00
Fran Dieguez
f69476435f Update Galician translation 2024-03-10 10:34:28 +00:00
Benjamin Otte
8df6e2cdaf frameclock: Make timings history dynamic
Keep at least 1 second of frame timings.

This is necessary for 2 reasons - a real one and a fun one.

First, with the difference in monitor refresh rates, we can have 48Hz
latops as well as 240Hz high refresh rate monitors. That's a factor of
4, and tracking frame rates in both situations reliably is kind of hard
- either we track over too many frames and the fps take a lot of time to
adjust, or we track too little time and the fps fluctuate wildly.

Second, when benchmarking with GDK_DEBUG=no-vsync with a somewhat fast
renderer (*cough*Vulkan*cough*) frame rates can go into insane dimensions
and only very few frames are actually getting presentation times
reported. So to report accurate frame rates in those cases, we need a
*very* large history that can be 1000s of times larger than the usual
history. And that's just a waste for normal usage.
2024-03-10 10:27:36 +01:00
Benjamin Otte
2861ab38ac frameclock: Report accurate fps instead of too low
Previously, our reported fps numbers could be too low when the start
timings weren't complete. In that case we would use the frame time, but
the frame time is the time when the frame was rendered, which is quite a
few milliseconds before it is presented.

So in that case we would not report the difference in presentation
times, but the difference from start of rendering. However, those times
are way more variable and can smear over the whole frame because they
depend on when we received the frame callbacks to high priority GSources
as well as our own render time predictions.

This happened in particular with GDK_DEBUG=no-vsync and could report
number that are off by a factor of 2.

Now we skip any incomplete frames, because those frames never have
presentation times reported. This makes it theoretically more likely to
not being able to report fps at all, but I'd rather have no fps than fps
off by a factor of 2.
2024-03-10 10:27:36 +01:00
Benjamin Otte
23c2122c13 inspector: Handle more digits in fps overlay
The fps used to get garbled when hitting >=10,000fps. That's quite
unlikely to happen for long periods, but it can happen for short bursts
(like after alt-tabbing).

So just handle more digits to make the display survive those corner cases.
2024-03-10 10:27:36 +01:00
Benjamin Otte
5b83ffa4a0 inspector: Make background width match fps number
Previously, we drew the same width no matter how many digits the fps
number had, which left a lot of empty space.

But we can use some quite simple math to avoid that by just shrinking
the background by the width of the non-rendered glyphs.
2024-03-10 10:27:35 +01:00
Matthias Clasen
cf8e3157a7 Merge branch 'matthiasc/for-main' into 'main'
Add another path fill test

Closes #4553 and #5423

See merge request GNOME/gtk!7001
2024-03-09 18:21:19 +00:00
Matthias Clasen
7323172755 ci: Add xfails for gl rotation+opacity problems
These are the topic of #6525. Lets xfail them for now.
2024-03-09 13:02:56 -05:00
Matthias Clasen
cfee8f4b11 tests: Cosmetics 2024-03-09 12:43:33 -05:00
Matthias Clasen
7ae099c94c inspector: Tweak the size groups page
Make the page scroll, and modernize it slightly. Also, fix a
case of missing top margin.

Fixes: #4553
2024-03-09 12:43:33 -05:00
Matthias Clasen
42298d8ab1 inspector: Deal with long action names
Make the action list scroll horizontally, and make the name
column resizable.

Fixes: #5423
2024-03-09 12:43:33 -05:00
Matthias Clasen
68912698f1 inspector: Drop the Window Scale spin
We don't really expect backends to make this settable, and
fractional scaling makes this more complicated anyway. The
scale values can be seen on the General tab, for the monitor,
and on the surface for each toplevel.
2024-03-09 12:43:33 -05:00
Matthias Clasen
c8c56f8d42 inspector: Use GtkFontDialogButton
A small step towards respecting our own deprecations. While we
are at it, make the control only select the font family, since
that is the intention of the font setting. Font style and size
are under the control of the css, and we have a font scale slider
right below to influence font size globally.
2024-03-09 12:43:33 -05:00
Matthias Clasen
7f48b5a05c inspector: Show the linux dmabuf Wayland protocol
This was overlooked when dmabuf support was added.
2024-03-09 12:43:33 -05:00
Matthias Clasen
1e5e977b37 gsk: Minor reshuffling
Hide the temporary unhinted font object behind the private API.
There might be a way to implement this without instantiating a
font, at some point.
2024-03-09 12:43:33 -05:00
Matthias Clasen
62d44b6bc7 wayland: Add window sizes to debug spew
This may help for tracking down issues.
2024-03-09 12:43:33 -05:00
Matthias Clasen
862afeffe0 Add another path fill test
This uses the other fill rule.
2024-03-09 07:03:55 -05:00
Matthias Clasen
92f9195015 Merge branch 'matthiasc/for-main' into 'main'
Update the docs for gtk-xft-rgba

See merge request GNOME/gtk!7000
2024-03-09 04:50:09 +00:00
Matthias Clasen
fc6e08082b tests: Make compare-render less repetitive
Only run the unmodified comparison if --plain is passed
on the commandline.
2024-03-08 22:27:14 -05:00
Matthias Clasen
af7516b797 Update the docs for gtk-xft-rgba
Clarify that this setting has no effect.
2024-03-08 21:37:10 -05:00
Matthias Clasen
3f1821e372 Merge branch 'matthiasc/for-main' into 'main'
gsk: Make uber shader handle fonts the same

See merge request GNOME/gtk!6995
2024-03-09 02:19:25 +00:00
Matthias Clasen
b569470b87 Stop setting rgb antialiasing in font options
We don't support subpixel antialiasing, so setting font options
to that effect won't do any good.
2024-03-08 20:44:42 -05:00
Matthias Clasen
f1a3235039 Add tests for uber rendering
Add a --colorflip option to the compare-render test. This applies
a color matrix to the node, which has the intended side-effect of
convincing the Vulkan renderer to use its uber shader, so we get
test results comparing the uber output to its non-uber siblings.
2024-03-08 20:44:42 -05:00
Matthias Clasen
34e90005af Don't forget to unrealize the renderer
This causes a critical warning.
2024-03-08 20:44:42 -05:00