Benjamin Otte [Fri, 22 Oct 2021 14:31:40 +0000 (16:31 +0200)]
build: Make sure ifuncs exist when using fp16
Fixes msys compiles on Windows (and everywhere else hopefully).
Fixes #4285
Matthias Clasen [Tue, 19 Oct 2021 13:00:20 +0000 (13:00 +0000)]
Merge branch 'appdata-build-date' into 'master'
Drop date attribute from our appdata files
See merge request GNOME/gtk!4079
Bernhard M. Wiedemann [Mon, 6 Sep 2021 08:05:31 +0000 (10:05 +0200)]
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
Matthias Clasen [Tue, 19 Oct 2021 02:48:41 +0000 (02:48 +0000)]
Merge branch 'setlocale-gapplication-help' into 'master'
GtkApplication: Call setlocale early
Closes #4234
See merge request GNOME/gtk!3928
Matthias Clasen [Tue, 19 Oct 2021 02:46:48 +0000 (02:46 +0000)]
Merge branch 'gdkdisplay-c-stdlib-h' into 'master'
gdkdisplay.c: Include stdlib.h
See merge request GNOME/gtk!4041
Matthias Clasen [Tue, 19 Oct 2021 02:45:42 +0000 (02:45 +0000)]
Merge branch 'wip/hadess/quiet-broadway' into 'master'
broadway: Quiet initialisation failures
See merge request GNOME/gtk!4053
Matthias Clasen [Tue, 19 Oct 2021 02:44:19 +0000 (02:44 +0000)]
Merge branch 'file-list-get' into 'master'
Add getter to GdkFileList
See merge request GNOME/gtk!4047
Matthias Clasen [Tue, 19 Oct 2021 02:42:15 +0000 (02:42 +0000)]
Merge branch 'fix-win11-sdk' into 'master'
Fix building against the Windows 11 SDK (GTK master/4.x)
See merge request GNOME/gtk!4063
Matthias Clasen [Tue, 19 Oct 2021 02:41:09 +0000 (02:41 +0000)]
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
Matthias Clasen [Tue, 19 Oct 2021 02:40:26 +0000 (02:40 +0000)]
Merge branch 'wip/exalm/levelbar' into 'master'
levelbar: Fill the whole space for discrete level bars
See merge request GNOME/gtk!4042
Benjamin Otte [Tue, 19 Oct 2021 00:19:52 +0000 (00:19 +0000)]
Merge branch 'label-sizing' into 'master'
Make label-sizing reftest pass
See merge request GNOME/gtk!4076
Benjamin Otte [Mon, 18 Oct 2021 23:08:06 +0000 (01:08 +0200)]
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.
Benjamin Otte [Mon, 18 Oct 2021 23:10:30 +0000 (01:10 +0200)]
testsuite: don't XFAIL label-sizing anymore
It's fixed now.
Benjamin Otte [Mon, 18 Oct 2021 23:07:22 +0000 (01:07 +0200)]
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.
Benjamin Otte [Mon, 18 Oct 2021 23:04:25 +0000 (01:04 +0200)]
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.
Benjamin Otte [Mon, 18 Oct 2021 23:01:36 +0000 (01:01 +0200)]
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.
Alexander Mikhaylenko [Thu, 7 Oct 2021 10:05:09 +0000 (15:05 +0500)]
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.
Emmanuele Bassi [Mon, 18 Oct 2021 21:09:10 +0000 (21:09 +0000)]
Merge branch 'wip/cdavis/flowbox-add-functions' into 'master'
gtkflowbox: Add prepend() and append()
Closes #4277
See merge request GNOME/gtk!4013
Matthias Clasen [Mon, 18 Oct 2021 20:58:46 +0000 (20:58 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'
Some fixes, hmm yes
See merge request GNOME/gtk!4068
Matthias Clasen [Mon, 18 Oct 2021 20:45:10 +0000 (16:45 -0400)]
css: Fix handling of percentage for line-height
We weren't doing the right thing here.
This is simpler, and works.
Fixes: #4354
Matthias Clasen [Mon, 18 Oct 2021 18:00:33 +0000 (18:00 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Small fixes
Closes #4248
See merge request GNOME/gtk!4072
Matthias Clasen [Mon, 18 Oct 2021 15:08:35 +0000 (15:08 +0000)]
Merge branch 'feature/calendar-first-day' into 'master'
calendar: Fix abbreviated day names
Closes #4338
See merge request GNOME/gtk!4061
Matthias Clasen [Mon, 18 Oct 2021 15:00:27 +0000 (11:00 -0400)]
ci: Allow macos to fail
The macos runner is out of commission atm
Jonas Ådahl [Mon, 18 Oct 2021 13:45:32 +0000 (13:45 +0000)]
Merge branch 'work/reset_opaque' into 'master'
wayland: Mark opaque_region as dirty on hide
See merge request GNOME/gtk!4020
Jonas Ådahl [Mon, 18 Oct 2021 13:44:52 +0000 (13:44 +0000)]
Merge branch 'work/tidy' into 'master'
wayland: miscellaneous minor tidy ups
See merge request GNOME/gtk!4066
Benjamin Otte [Mon, 18 Oct 2021 13:32:02 +0000 (13:32 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
glcontext: reinstate another missing "!"
See merge request GNOME/gtk!4070
Matthias Clasen [Mon, 18 Oct 2021 12:23:27 +0000 (08:23 -0400)]
Improve a msgid
Instead of gl-context, say "GL Context".
Fixes: #4248
Matthias Clasen [Sun, 17 Oct 2021 20:05:35 +0000 (22:05 +0200)]
docs: Cosmetics
Do a round of "the the" removal.
Matthias Clasen [Sun, 17 Oct 2021 19:54:59 +0000 (21:54 +0200)]
docs: Cosmetics
Benjamin Otte [Mon, 18 Oct 2021 11:38:35 +0000 (13:38 +0200)]
testsuite: Add workarounds for non-gl backends
read: Fix tests for broadway
Benjamin Otte [Sat, 25 Sep 2021 22:32:27 +0000 (00:32 +0200)]
broadway: Use gdk_texture_save_to_png_bytes()
Instead of using Cairo, save the texture directly.
Benjamin Otte [Sat, 25 Sep 2021 22:22:20 +0000 (00:22 +0200)]
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.
Benjamin Otte [Sun, 17 Oct 2021 20:15:53 +0000 (22:15 +0200)]
jpeg: Use gdk_memory_texture_from_texture()
Benjamin Otte [Sun, 17 Oct 2021 12:27:03 +0000 (14:27 +0200)]
tiff: Refactor
Now we support all the formats.
Benjamin Otte [Sun, 17 Oct 2021 04:54:38 +0000 (06:54 +0200)]
gltexture: Fix conditions for glGetTexImage() call
The conditions were inverted, plus we failed to limit this call to
non-GLES.
Benjamin Otte [Sun, 17 Oct 2021 16:46:01 +0000 (18:46 +0200)]
glcontext: reinstate another missing "!"
A leftover from
aa0c22b64813a406da9854fd079579d87181a97b.
Timm Bäder [Sun, 17 Oct 2021 10:15:34 +0000 (12:15 +0200)]
Ensure blur nodes have a positive blur radius
Timm Bäder [Sun, 17 Oct 2021 09:21:00 +0000 (11:21 +0200)]
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.
Timm Bäder [Sat, 16 Oct 2021 13:56:46 +0000 (15:56 +0200)]
theme: enable tabular numbers in GtkCalendar
It aligns numbers a lot so this makes sense.
Timm Bäder [Sat, 16 Oct 2021 13:44:58 +0000 (15:44 +0200)]
fontrendering: Protect against NULL hints
Timm Bäder [Sat, 16 Oct 2021 06:51:32 +0000 (08:51 +0200)]
cssparser: Make a signed expression unsigned
Benjamin Otte [Sat, 16 Oct 2021 17:04:26 +0000 (17:04 +0000)]
Merge branch 'fix-dnd-coordinates-on-windows' into 'master'
Fix DND coordinates on Windows
See merge request GNOME/gtk!3930
Benjamin Otte [Sat, 16 Oct 2021 14:11:00 +0000 (14:11 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
glcontext: Reinstate missing "!"
Closes #4349
See merge request GNOME/gtk!4067
Benjamin Otte [Sat, 16 Oct 2021 11:35:50 +0000 (13:35 +0200)]
gdk: Move GdkMemoryFormat enum to gdktypes.h
It's used in too many places now.
Benjamin Otte [Sat, 16 Oct 2021 13:47:05 +0000 (15:47 +0200)]
glcontext: Reinstate missing "!"
Replacing the return_if_fail()s in commit
f584d4f50025 lost the
inversions.
Fixes #4349
David Edmundson [Fri, 1 Oct 2021 12:31:39 +0000 (13:31 +0100)]
wayland: port code to g_clear_pointer
David Edmundson [Fri, 1 Oct 2021 12:24:50 +0000 (13:24 +0100)]
wayland: drop unused member variables
Benjamin Otte [Wed, 13 Oct 2021 12:51:37 +0000 (12:51 +0000)]
Merge branch 'wip/otte/memoryformat' into 'master'
Refactor various texture machinery
See merge request GNOME/gtk!4057
Benjamin Otte [Tue, 12 Oct 2021 22:30:09 +0000 (00:30 +0200)]
gl: Use gdk_memory_texture_new_from_texture()
Way less code to prepare the texture in a proper format.
Benjamin Otte [Tue, 12 Oct 2021 22:07:08 +0000 (00:07 +0200)]
gl: Refactor texture uploading
Don't pass texture + rect, but instead have
gdk_memory_texture_new_subtexture()
and use it to generate subtextures and pass them.
This has the advantage of downloading the a too large texture only once
instead of N times.
Benjamin Otte [Tue, 12 Oct 2021 22:36:38 +0000 (00:36 +0200)]
gltexture: Determine format in current thread
Close widget-factory and observe:
Thread 1:
* acquire main loop
* handle close button
* close window
* dispose video and media stream
* stop GstPlayer
WAIT on pipeline stopping
Thread 2:
* prepare next image in pipeline
* hand image to GtkGstSink
* create GdkTexture from image
* gdk_gl_texture_new() determines format
WAIT on acquiring main loop
Sounds like a deadlock?
Indeed, so don't do that.
Benjamin Otte [Tue, 12 Oct 2021 13:04:43 +0000 (15:04 +0200)]
gl: Move texture uploading to the renderer
It does not belong in GdkGLContext, it's a renderer thing.
It's also the only user of that API.
Introduce gdk_gl_context_check_version() private API to make version
checks simpler.
Benjamin Otte [Mon, 11 Oct 2021 01:29:11 +0000 (03:29 +0200)]
gl: Fix downloading textures *again*
It turns out glReadPixels() cannot convert pixels and you are only
allowed to pass a single value into the function arguments. You need to
know which ones or things will explode.
GL is great.
Benjamin Otte [Mon, 27 Sep 2021 03:55:48 +0000 (05:55 +0200)]
png: Refactor png saving
Do all the memory format shenanigans in GTK now and support all the PNG
formats.
Benjamin Otte [Sun, 26 Sep 2021 14:47:34 +0000 (16:47 +0200)]
Add memory formats used by libpng
Add unpremultiplied high-depth formats. They are used in the real world,
so let's support them.
Chun-wei Fan [Wed, 13 Oct 2021 04:17:44 +0000 (12:17 +0800)]
tools/generate-uac-manifest.py: Fix UAC manifest .rc
The resource compiler in the Windows 11 SDK does not allow one to include
winuser.h directly in resource scripts (.rc) with a rather cryptic error
message, so fix generating the .rc file to embed the UAC manifest by including
windows.h with WIN32_LEAN_AND_MEAN instead.
Chun-wei Fan [Wed, 13 Oct 2021 04:16:06 +0000 (12:16 +0800)]
gtk: Fix version resource on for Windows 11 SDK
The rc.exe that comes with the Windows 11 SDK does not allow one to include
winuser.h directly in the .rc scripts, so make sure that it is not included
by gtk-win32.rc.body.in, but instead include windows.h with WIN32_LEAN_AND_MEAN
defined.
Sveinn í Felli [Tue, 12 Oct 2021 22:48:01 +0000 (22:48 +0000)]
Update Icelandic translation
(cherry picked from commit
83b3c7d826bea8254357639da58ddd4568d85a30)
Christopher Davis [Thu, 30 Sep 2021 02:45:45 +0000 (19:45 -0700)]
gtkflowbox: Add prepend() and append()
These functions are common across container implementations,
but GtkFlowBox was missing them.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4277
Niels De Graef [Tue, 12 Oct 2021 17:37:13 +0000 (19:37 +0200)]
calendar: Add an explanatory comment
On the magic numbers used to get the abbreviated day names.
Rafael Fontenelle [Tue, 12 Oct 2021 17:33:41 +0000 (17:33 +0000)]
Update Brazilian Portuguese translation
(cherry picked from commit
4b9260608a3c20fd049f694e0c9bb587bd6e34bf)
Niels De Graef [Tue, 12 Oct 2021 17:29:26 +0000 (19:29 +0200)]
calendar: Fix abbreviated day names
... if the current locale has a different starting day than Sunday.
This needed 2 fixes:
* We need to take into account `calendar->week_start` when
creating/adding the appropriate `day_name_labels` field
* we were only calculating `calendar->week_start` _after_ attaching the
`day_name_labels`, so it was still set to 0 (the default value).
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4338
Emmanuele Bassi [Tue, 12 Oct 2021 11:09:13 +0000 (11:09 +0000)]
Merge branch 'bilelmoussaoui/gtk-snapshot' into 'master'
gtk: fix Snapshot.push_shadow annotation
See merge request GNOME/gtk!4060
Bilal Elmoussaoui [Tue, 12 Oct 2021 09:00:03 +0000 (09:00 +0000)]
gtk: fix Snapshot.push_shadow annotation
Benjamin Otte [Sun, 26 Sep 2021 04:44:56 +0000 (06:44 +0200)]
png: Do loader conversions in GDK
Not inside libpng.
We really want to do them in GL, but we don't have a premultiply step
yet.
Benjamin Otte [Thu, 7 Oct 2021 04:19:41 +0000 (06:19 +0200)]
texture: Refactor downloading
Pass a format do GdkTextureClass::download(). That way we can download
data in any format.
Also replace gdk_texture_download_texture() with
gdk_memory_texture_from_texture() which again takes a format.
The old functionality is still there for code that wants it: Just pass
gdk_texture_get_format (texture) as the format argument.
Emmanuele Bassi [Fri, 8 Oct 2021 10:41:56 +0000 (11:41 +0100)]
Add getter to GdkFileList
Language bindings don't really have any mean of accessing the list of
files for GdkFileList.
Bastien Nocera [Mon, 11 Oct 2021 11:55:35 +0000 (13:55 +0200)]
broadway: Quiet initialisation failures
Broadway is the only GTK+ backend that throws an error on stderr for a
"display server" connection failure.
This causes problems when gtk_init_check() is used and unexpected error
output is generated such as with hotdoc, which fails when generating a
GTK plugin's documentation instead of overlooking the issue.
"Unable to init server: Could not connect: Connection refused"
Benjamin Otte [Mon, 11 Oct 2021 18:36:20 +0000 (18:36 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
x11: Don't try to move destroyed windows
See merge request GNOME/gtk!4054
Benjamin Otte [Mon, 11 Oct 2021 17:22:46 +0000 (19:22 +0200)]
x11: Don't try to move destroyed windows
Fixes BadWindow crashes when the resize happen right when tooltips or
other such transient popups were in the process of being destroyed.
Bastien Nocera [Mon, 11 Oct 2021 11:55:35 +0000 (13:55 +0200)]
broadway: Quiet initialisation failures
Broadway is the only GTK+ backend that throws an error on stderr when
failing to initialise, which causes problems when gtk_init_check() is
used and unexpected error output is generated.
This causes hotdoc to fail when generating a GTK plugin's documentation
instead of failing quietly.
"Unable to init server: Could not connect: Connection refused"
David Edmundson [Fri, 1 Oct 2021 12:28:00 +0000 (13:28 +0100)]
wayland: Mark opaque_region as dirty on hide
Otherwise if we hide and show a window we recreate a new surface,
breaking the compositor's association, but potentially not resend this
data for the new surface.
This matches what we do for input_region.
Matthias Clasen [Mon, 11 Oct 2021 06:43:41 +0000 (06:43 +0000)]
Merge branch 'ngl-is-the-new-gl' into 'master'
Rename ngl to gl
Closes #4318
See merge request GNOME/gtk!4037
Matthias Clasen [Mon, 11 Oct 2021 06:36:23 +0000 (06:36 +0000)]
Merge branch 'docs-window-position' into 'master'
docs: Mention gtk_window_set_position() being gone
See merge request GNOME/gtk!4048
Emmanuele Bassi [Sun, 10 Oct 2021 23:01:39 +0000 (23:01 +0000)]
Merge branch 'docs-urlmap' into 'master'
docs: Add GdkPixbuf to the URL map
See merge request GNOME/gtk!4051
John Ralls [Sun, 10 Oct 2021 20:16:49 +0000 (13:16 -0700)]
[gtkimcontextquartz] Accommodate moving GdkSurface widget to private.
Fixes macOS build.
Benjamin Otte [Sat, 9 Oct 2021 11:59:42 +0000 (11:59 +0000)]
Merge branch 'wip/otte/gles' into 'master'
Improve GLES
See merge request GNOME/gtk!4050
Emmanuele Bassi [Sat, 9 Oct 2021 09:55:24 +0000 (10:55 +0100)]
docs: Add GdkPixbuf to the URL map
Allow cross-linking to the GdkPixbuf reference.
Benjamin Otte [Fri, 8 Oct 2021 16:38:51 +0000 (18:38 +0200)]
testsuite: Add run for GLES
This is supposed to test the most fallback GL stuff, so we might want to
set even more env vars here.
Also enable the run for the Fedora builder in CI.
Benjamin Otte [Sat, 9 Oct 2021 03:25:05 +0000 (05:25 +0200)]
gl: Make sure to set a proper alignment
No matter which branch we take, the alignment setting is always the
same.
Benjamin Otte [Sat, 9 Oct 2021 03:24:44 +0000 (05:24 +0200)]
gl: Check the stride is a multiple of the bpp
Benjamin Otte [Sat, 9 Oct 2021 02:36:20 +0000 (04:36 +0200)]
gl: Set stride properly in fallback
Benjamin Otte [Sat, 9 Oct 2021 02:35:27 +0000 (04:35 +0200)]
gl: Fix broken internal format
Benjamin Otte [Fri, 8 Oct 2021 18:15:07 +0000 (20:15 +0200)]
testsuite: Add a test targeting GL upload code
Previously, all the tests used the icon upload path using
glTexSubImage2D().
This test uses the custom texture path using glTexImage2D().
Benjamin Otte [Fri, 8 Oct 2021 16:47:49 +0000 (18:47 +0200)]
ngl: Use the right value
It's GL_RGBA, not GL_BGRA, or GLES will complain.
Asier Sarasua Garmendia [Fri, 8 Oct 2021 17:44:18 +0000 (17:44 +0000)]
Update Basque translation
(cherry picked from commit
2492729238b90c3b1f28a8776899ea2b11c379a3)
Benjamin Otte [Fri, 8 Oct 2021 15:57:08 +0000 (15:57 +0000)]
Merge branch 'wip/otte/glcontext' into 'master'
glcontext: Make GLES vs GL configuration clearer
Closes #4221
See merge request GNOME/gtk!4044
Emmanuele Bassi [Fri, 8 Oct 2021 11:27:24 +0000 (12:27 +0100)]
docs: Mention gtk_window_set_position() being gone
People search for it in the migration guide much more than other
GdkSurface and GtkWindow methods.
Benjamin Otte [Fri, 8 Oct 2021 09:11:03 +0000 (09:11 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Fix GLES fallout from recent NGL updates
See merge request GNOME/gtk!4046
Benjamin Otte [Thu, 7 Oct 2021 21:03:45 +0000 (23:03 +0200)]
glcontext: Add gdk_gl_context_get_api()
This is mostly for inspector.
Not sure if we also want to deprecate gdk_gl_context_get_use_es() in
favor of this function.
Benjamin Otte [Fri, 8 Oct 2021 01:29:45 +0000 (03:29 +0200)]
ngl: Fix glTexImage2D() usage on GLES
GLES is very adamant about the format and type matching the internal
format, even if the data is NULL.
Benjamin Otte [Thu, 7 Oct 2021 20:10:39 +0000 (22:10 +0200)]
gl: Check allowed APIs in realize()
Add gdk_gl_context_is_api_allowed() for backends and make them use it.
Finally, have them return the final API as the return value (or 0 on
error).
And then use that api instead of a use_es boolean flag.
Fixes #4221
Benjamin Otte [Thu, 7 Oct 2021 16:13:36 +0000 (18:13 +0200)]
glcontext: Deprecate gdk_gl_context_set_use_es()
Make it call gdk_gl_context_set_allowed_apis().
Also port callers to use this function.
Benjamin Otte [Thu, 7 Oct 2021 15:59:17 +0000 (17:59 +0200)]
glcontext: Add GdkGLContext::allowed-apis
This allows specifying the GL APIs in a more comprehensive way than
gdk_gl_context_set_use_es().
Benjamin Otte [Fri, 8 Oct 2021 00:31:25 +0000 (02:31 +0200)]
ngl: Compute correct renderformat
We want to round up, not down.
Benjamin Otte [Fri, 8 Oct 2021 00:28:49 +0000 (02:28 +0200)]
ngl: fbo 0 has no color attachment
Query the backbuffer instead.
Matthias Clasen [Thu, 7 Oct 2021 20:46:29 +0000 (16:46 -0400)]
gsk: provide an ngl renderer
Provide a minimal renderer implementation that fails
in realize. This avoids reusing the same type, which
might give bindings trouble.
Benjamin Otte [Thu, 7 Oct 2021 19:11:28 +0000 (19:11 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
css: Render the background-clip area, not the background-origin
Closes #4324
See merge request GNOME/gtk!4043
Benjamin Otte [Thu, 7 Oct 2021 17:50:02 +0000 (19:50 +0200)]
css: Render the background-clip area, not the background-origin
Testcase included
Fixes #4324
Matthias Clasen [Thu, 7 Oct 2021 16:37:55 +0000 (12:37 -0400)]
Skip gsk_ngl type funcs
The only type we have with this prefix is the
deprecated duplicate of gsk_gl_renderer_get_type(),
and including it causes some tests to break.
So skip it.