Commit Graph

71403 Commits

Author SHA1 Message Date
Benjamin Otte
cb03fe8f31 gsk: Allow gsk_renderer_realize (renderer, NULL, NULL)
That way, we can use renderers without surfaces.
2021-10-20 21:49:32 +02:00
Benjamin Otte
ea14e94eaf drawcontext: Guard begin/end_frame() against non-surface contexts
This can happen now with gdk_display_create_gl_context().
2021-10-20 20:31:33 +02:00
Benjamin Otte
2601c39cb2 API: Add gdk_display_create_gl_context()
This is an alternative to gdk_surface_create_gl_context() when the
context is meant to only draw to textures.

This is useful in the testsuite or in GStreamer or with GLArea,
basically whenever we want to do GL stuff but don't need to actually
draw anything on screen.

A bunch of code will need to be updated to deal with context->surface
being NULL.
2021-10-20 20:31:33 +02:00
Benjamin Otte
53312cf696 surface: Remove (nullable)
The function only returns NULL on error, and such a function is not
considered nullable.
2021-10-20 20:02:26 +02:00
Matthias Clasen
3d536f1293 Merge branch 'appdata-build-date' into 'master'
Drop date attribute from our appdata files

See merge request GNOME/gtk!4079
2021-10-19 13:00:20 +00:00
Bernhard M. Wiedemann
d6f4a0d2cf Drop date attribute from our appdata files
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good

This was suggested by Matthias Clasen as an alternative to MR !3929
2021-10-19 07:37:59 -04:00
Matthias Clasen
14e6d9555d Merge branch 'setlocale-gapplication-help' into 'master'
GtkApplication: Call setlocale early

Closes #4234

See merge request GNOME/gtk!3928
2021-10-19 02:48:41 +00:00
Matthias Clasen
8b02e87529 Merge branch 'gdkdisplay-c-stdlib-h' into 'master'
gdkdisplay.c: Include stdlib.h

See merge request GNOME/gtk!4041
2021-10-19 02:46:48 +00:00
Matthias Clasen
f04e10238b Merge branch 'wip/hadess/quiet-broadway' into 'master'
broadway: Quiet initialisation failures

See merge request GNOME/gtk!4053
2021-10-19 02:45:42 +00:00
Matthias Clasen
e946ee4040 Merge branch 'file-list-get' into 'master'
Add getter to GdkFileList

See merge request GNOME/gtk!4047
2021-10-19 02:44:19 +00:00
Matthias Clasen
46ba4b9d8c Merge branch 'fix-win11-sdk' into 'master'
Fix building against the Windows 11 SDK (GTK master/4.x)

See merge request GNOME/gtk!4063
2021-10-19 02:42:15 +00:00
Matthias Clasen
464f76ce5d Merge branch 'line-height-percentage' into 'master'
css: Fix handling of percentage for line-height

Closes #3254 and #4354

See merge request GNOME/gtk!4075
2021-10-19 02:41:09 +00:00
Matthias Clasen
9965f26d97 Merge branch 'wip/exalm/levelbar' into 'master'
levelbar: Fill the whole space for discrete level bars

See merge request GNOME/gtk!4042
2021-10-19 02:40:26 +00:00
Benjamin Otte
bf5350e13c Merge branch 'label-sizing' into 'master'
Make label-sizing reftest pass

See merge request GNOME/gtk!4076
2021-10-19 00:19:52 +00:00
Benjamin Otte
3742fabae0 widget: Don't overadjust allocations
When adjusting allocations, don't query height for the current width,
but query it for the adjusted width.

And adjust width not to the width-for-any-height, but to
width-for-allocated-height.
2021-10-19 01:55:59 +02:00
Benjamin Otte
192e554f3e testsuite: don't XFAIL label-sizing anymore
It's fixed now.
2021-10-19 01:10:59 +02:00
Benjamin Otte
00214cbb4a testsuite: Add test specifically for recent fix
label-sizing.ui tests this, too - but that test tests lots of other
things, and if this ever happens again, we want to debug it in a small
test.
2021-10-19 01:10:59 +02:00
Benjamin Otte
ba44e7a228 label: Never measure more than max-width-chars
Even when we have tons of width available, still do the wrapping at
max-width-chars.

This is what happened in GTK3, too, but it happened automatically
because GTK3 did for_size = MIN (for_size, nat_size) and GTK4 does not.

So we do this manually in the label now.

Fixes the label-sizing.ui reftest.
2021-10-19 01:04:25 +02:00
Benjamin Otte
cad979b734 reftest: On failure, save the node files, too
Doesn't hurt to have them available, so it's easy to figure out if a
failure is due to the renderer or if we're generating wrong node files.
2021-10-19 01:01:36 +02:00
Alexander Mikhaylenko
1c5a4de176 levelbar: Fill the whole space for discrete level bars
Ideally this would be using box layout, but it overrides measure() so it's
not possible - so reimplement it instead. Fix an accidentally int division
along the way.
2021-10-19 02:13:49 +05:00
Emmanuele Bassi
ad46e65dff Merge branch 'wip/cdavis/flowbox-add-functions' into 'master'
gtkflowbox: Add prepend() and append()

Closes #4277

See merge request GNOME/gtk!4013
2021-10-18 21:09:10 +00:00
Matthias Clasen
5dec1b0cc0 Merge branch 'wip/baedert/for-master' into 'master'
Some fixes, hmm yes

See merge request GNOME/gtk!4068
2021-10-18 20:58:46 +00:00
Matthias Clasen
c80e877c28 css: Fix handling of percentage for line-height
We weren't doing the right thing here.
This is simpler, and works.

Fixes: #4354
2021-10-18 16:53:46 -04:00
Matthias Clasen
5ff9f4a435 Merge branch 'matthiasc/for-master' into 'master'
Small fixes

Closes #4248

See merge request GNOME/gtk!4072
2021-10-18 18:00:33 +00:00
Matthias Clasen
bd1649e5f4 Merge branch 'feature/calendar-first-day' into 'master'
calendar: Fix abbreviated day names

Closes #4338

See merge request GNOME/gtk!4061
2021-10-18 15:08:35 +00:00
Matthias Clasen
b7cab5c5eb ci: Allow macos to fail
The macos runner is out of commission atm
2021-10-18 11:00:27 -04:00
Jonas Ådahl
6067a556d7 Merge branch 'work/reset_opaque' into 'master'
wayland: Mark opaque_region as dirty on hide

See merge request GNOME/gtk!4020
2021-10-18 13:45:32 +00:00
Jonas Ådahl
6a07a853b0 Merge branch 'work/tidy' into 'master'
wayland: miscellaneous minor tidy ups

See merge request GNOME/gtk!4066
2021-10-18 13:44:52 +00:00
Benjamin Otte
886f435fc8 Merge branch 'wip/otte/for-master' into 'master'
glcontext: reinstate another missing "!"

See merge request GNOME/gtk!4070
2021-10-18 13:32:02 +00:00
Matthias Clasen
96e837ae9f Improve a msgid
Instead of gl-context, say "GL Context".

Fixes: #4248
2021-10-18 08:35:54 -04:00
Matthias Clasen
bddf9f9ca3 docs: Cosmetics
Do a round of "the the" removal.
2021-10-18 08:35:54 -04:00
Matthias Clasen
5f3062aff0 docs: Cosmetics 2021-10-18 08:35:54 -04:00
Benjamin Otte
a859471960 testsuite: Add workarounds for non-gl backends
read: Fix tests for broadway
2021-10-18 14:17:11 +02:00
Benjamin Otte
5b47391162 broadway: Use gdk_texture_save_to_png_bytes()
Instead of using Cairo, save the texture directly.
2021-10-18 12:08:57 +02:00
Benjamin Otte
dcba783389 gdk: Rework gdk_pixbuf_get_from_texture()
Make it use gdk_memory_texture_from_texture().

Also make gdk_memory_format_alpha() privately available so that we can
detect if an image contains an alpha channel.
2021-10-18 12:08:57 +02:00
Benjamin Otte
7eceed8d4d jpeg: Use gdk_memory_texture_from_texture() 2021-10-18 12:08:57 +02:00
Benjamin Otte
800246402f tiff: Refactor
Now we support all the formats.
2021-10-18 12:08:57 +02:00
Benjamin Otte
c7e36bcf22 gltexture: Fix conditions for glGetTexImage() call
The conditions were inverted, plus we failed to limit this call to
non-GLES.
2021-10-17 22:28:44 +02:00
Benjamin Otte
79d2a14061 glcontext: reinstate another missing "!"
A leftover from aa0c22b648.
2021-10-17 22:28:44 +02:00
Timm Bäder
085f0171c1 Ensure blur nodes have a positive blur radius 2021-10-17 12:15:34 +02:00
Timm Bäder
e7ac8275ea main: Flip set_widget_active_state() logic
The function used to take a boolean, just to set the active state of the
widget to the exact opposite of that boolean. Fix that.
2021-10-17 11:21:00 +02:00
Timm Bäder
03d4ac1863 theme: enable tabular numbers in GtkCalendar
It aligns numbers a lot so this makes sense.
2021-10-17 11:12:14 +02:00
Timm Bäder
a61999170e fontrendering: Protect against NULL hints 2021-10-17 11:12:14 +02:00
Timm Bäder
beda50f631 cssparser: Make a signed expression unsigned 2021-10-17 11:12:14 +02:00
Benjamin Otte
cf7ee82755 Merge branch 'fix-dnd-coordinates-on-windows' into 'master'
Fix DND coordinates on Windows

See merge request GNOME/gtk!3930
2021-10-16 17:04:26 +00:00
Benjamin Otte
f6e5a33952 Merge branch 'wip/otte/for-master' into 'master'
glcontext: Reinstate missing "!"

Closes #4349

See merge request GNOME/gtk!4067
2021-10-16 14:11:00 +00:00
Benjamin Otte
7a50ebaa3f gdk: Move GdkMemoryFormat enum to gdktypes.h
It's used in too many places now.
2021-10-16 15:49:37 +02:00
Benjamin Otte
aa0c22b648 glcontext: Reinstate missing "!"
Replacing the return_if_fail()s in commit f584d4f500 lost the
inversions.

Fixes #4349
2021-10-16 15:49:02 +02:00
David Edmundson
aa258fa17f wayland: port code to g_clear_pointer 2021-10-15 12:03:57 +01:00
David Edmundson
66de8f33fb wayland: drop unused member variables 2021-10-15 11:53:18 +01:00