Commit Graph

69312 Commits

Author SHA1 Message Date
Matthias Clasen
a576bd190b inspector: Respect GDK_DEBUG=vulkan-disable
Respect the debug settings for disabling Vulkan or GL,
and do not try to initialize those contexts. This can
be necessary to work around crashes.

Fixes: #3748
2021-03-17 23:19:08 -04:00
Matthias Clasen
e6b1443fbb label: Fix tooltips on links
Fix pointed out by Timm Baeder.

Fixes: #3765
2021-03-17 19:46:02 -04:00
Matthias Clasen
60ccae000b media: Always use GL with gstreamer
As long as we can create a GL context, pass one to
gstreamer. This at least gets us GL textures with
the ngl renderer, the previous code was arbitrarily
refusing that.
2021-03-17 16:28:12 -04:00
Timm Bäder
7ecd004d50 Merge branch 'gsk-border-node-diff-fix-typo' into 'master'
Fix a typo in gsk_border_node_diff

See merge request GNOME/gtk!3310
2021-03-17 16:04:57 +00:00
Andrey Kozlovskiy
6b48fb767d Fix a typo in gsk_border_node_diff
Typo was introduced in !3278 and results in an incorrect handling of different uniformity.
2021-03-17 15:38:01 +00:00
Emmanuele Bassi
6d4f93bb7f Merge branch 'select-list-model-null' into 'master'
gtk: Allow selection models to take null list model during construction

See merge request GNOME/gtk!3309
2021-03-17 14:09:37 +00:00
Matthias Clasen
cfe8c0e187 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3763

See merge request GNOME/gtk!3308
2021-03-17 12:32:45 +00:00
Matthias Clasen
6d5657eee7 lpr: Fix various compiler warnings
gcc 11 is warning about some const mixups here.
Fix them.
2021-03-17 07:56:07 -04:00
Matthias Clasen
600cbdb7ba treestore: Initialize some local variables
gcc 11 is warning that these might be used uninitialized
otherwise.
2021-03-17 07:51:27 -04:00
Matthias Clasen
8b82993dde sizerequest: Avoid a corner case
gcc 11 warns that the code isn't safe when
n_requested_sizes is 0. Add a precondition check
to make it clear that that never happens.
2021-03-17 07:50:24 -04:00
Matthias Clasen
ea185cbdda cssshadowvalue: Handle error condition propertly
We were parsing off the end of our array before noticing
that we've gone too far. gcc 11 warns about this.
2021-03-17 07:49:06 -04:00
Matthias Clasen
ee837dfc12 checkbutton: Add a warning about cyclic groups
Setting up check or toggle button group relationships
in a cycle will lead to lockups. Add a warning about
this, and catch the simplest case with a precondition
check.

Fixes: #3763
2021-03-17 07:38:57 -04:00
Matthias Clasen
1d888bff43 Drop the gtk-doc subproject
No longer used.
2021-03-17 07:28:31 -04:00
Balázs Úr
45c8c6c77f Update Hungarian translation 2021-03-16 23:49:27 +00:00
Matthias Clasen
ceed7d1ba4 Merge branch 'matthiasc/for-master' into 'master'
dnd: Add some warnings to the docs

See merge request GNOME/gtk!3305
2021-03-16 19:12:05 +00:00
Matthias Clasen
74e2bb4cf1 dnd: Add some warnings to the docs
Add some warnings about pitfalls of the async dnd api.
2021-03-16 14:48:44 -04:00
Matthias Clasen
cc6bb13242 Merge branch 'kjellahl/cairo-subproject' into 'master'
Fix build when cairo is a subproject

See merge request GNOME/gtk!3304
2021-03-16 11:43:06 +00:00
Kjell Ahlstedt
50beae7541 meson: Find libcairo-script-interpreter when cairo is a subproject
If cairo is a subproject, it's not necessarily installed when gtk
is built. In the build tree, libcairo-script-interpreter is not stored
in the same directory as other cairo libraries.
2021-03-16 11:47:28 +01:00
Kjell Ahlstedt
0f6b91109e gdkglcontext-x11: Don't assume that cairo-xlib.h is in cairo directory
If cairo is a subproject, it's not necessarily installed when gtk
is built. In the source tree, cairo's headers are not stored in
a directory called 'cairo'.
2021-03-16 11:47:16 +01:00
Matthias Clasen
f279c7b1c2 Merge branch 'fix-3581' into 'master'
gdkcursor-win32.c: Add cursor map for all-scroll (issue #3581)

Closes #3581

See merge request GNOME/gtk!3298
2021-03-15 22:32:23 +00:00
Matthias Clasen
08b27848e1 Merge branch 'fix-wayland-layout-changes' into 'master'
Fix wayland layout changes

See merge request GNOME/gtk!3303
2021-03-15 22:31:08 +00:00
Matthias Clasen
e3dcc3d369 wayland: Fix cross-layout accelerators
GTK traditionally lets you activate keyboard shortcuts
even if they are for a non-active layout. But it is meant
to only activate with a keysym from a non-active layout
when that symbol is not present in the current layout.
That last condition was lost when key event handling
was redone for GTK4. Bring it back.
2021-03-15 17:14:49 -04:00
Matthias Clasen
568fe2e97b wayland: Add debug spew for active keyboard layouts
Print out what we think the active keyboard layout is,
when it changes, with GDK_DEBUG=input.
2021-03-15 17:14:49 -04:00
Jason Francis
cd77485193
gtk: Allow selection models to take null list model during construction
This brings it in line with the documentation, and with the respective
set_model() functions.
2021-03-15 15:55:47 -04:00
Matthias Clasen
ec0e76dabd Merge branch 'issue-3757' into 'master'
docs: Update annotations for WidgetClass.query_action()

Closes #3757

See merge request GNOME/gtk!3301
2021-03-15 19:28:17 +00:00
Matthias Clasen
1eebf0ebd1 wayland: Emit keys-changed on layout changes
We were forgetting to do this in when layout changes are
communicated via handle_modifiers.
2021-03-15 12:34:23 -04:00
Emmanuele Bassi
0a7af75639 docs: Update annotations for WidgetClass.query_action()
The parameter_type and property_name out arguments can be set to NULL.

Fixes: #3757
2021-03-15 13:48:35 +00:00
Milo Casagrande
72012113fd Update Italian translation
(cherry picked from commit affeff5472)
2021-03-15 09:25:36 +00:00
Chun-wei Fan
54b3048584 gdkcursor-win32.c: Add cursor map for all-scroll
This makes sure that we don't have cursors disappearing on Windows upon
scrolling because we can't find a cursor that exists on the system during
a scroll, and unlike GTK-3.x, we do not default to the arrow pointer on GTK4.

Just mimic what we have on X11 and Wayland: the trusty standard arrow pointer.

Fixes issue #3581.
2021-03-15 17:16:33 +08:00
Matthias Clasen
3daad8fe87 release-script: Actually compress the docs tarball
Somehow an x got lot and the tarball got very big. Oops...
2021-03-14 23:33:10 -04:00
Benjamin Otte
a1c1ad317b Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master

See merge request GNOME/gtk!3297
2021-03-15 02:31:45 +00:00
Benjamin Otte
dbd19bf27a x11: Don't call _gdk_surface_update_size() all the time
We were calling _gdk_surface_update_size() every frame, even if the
window size didn't change. This would cause us to discard all cached
buffers and redraw the whole screen.

This was BAD.
2021-03-15 03:16:50 +01:00
Benjamin Otte
97fad45237 surface: Remove unused gdk_surface_get_unscaled_size()
Also remove unscaled_width/height members in the win32 backend.

Both of those are unused.
2021-03-15 02:56:28 +01:00
Matthias Clasen
cbda61d3fb 4.1.2 2021-03-14 21:48:48 -04:00
Matthias Clasen
afe195a862 Update release script
With gi-docgen based docs, we can try to go back to
including the docs in the main release tarball.
2021-03-14 21:48:46 -04:00
Matthias Clasen
e6adee2403 Merge branch 'menubar-accel' into 'master'
window: Add a way to disable F10 shortcut

Closes #3727

See merge request GNOME/gtk!3296
2021-03-15 01:27:45 +00:00
Benjamin Otte
1fd534ef1e ngl: Remove duplicate check
We check the extents, so there's no need to check overlap before.
2021-03-15 01:30:34 +01:00
Matthias Clasen
cfc91b62b0 window: Add a way to disable F10 shortcut
This is needed for terminal emulators.

Fixes: #3727
2021-03-14 19:47:06 -04:00
Matthias Clasen
24ec2cc6a6 Merge branch 'ngl-less-shaders' into 'master'
Assorted ngl improvements

See merge request GNOME/gtk!3295
2021-03-14 21:04:37 +00:00
Matthias Clasen
28de2eecc9 ngl: Special-case css backgrounds
Recognize a common pattern: A rounded clip with
a color node, followed by a border node, with the
same outline. This is what CSS backgrounds frequently
produce, and we can render it more efficiently with
a combined shader.
2021-03-14 16:49:31 -04:00
Matthias Clasen
ed3f0012b1 ngl: Don't bother with uniform border nodes
Now that colors aren't uniforms anymore, we don't
win much by using the inset_shadow shader. The fragment
shaders of inset_shadow and border are identical. And
the regular border setup does nine-slicing.
2021-03-14 16:49:31 -04:00
Matthias Clasen
51074ca5df ngl: Small shader improvements
Add a variant of gskSetOutputColor that saves a
few multiplications, and use it where possible.
2021-03-14 16:49:31 -04:00
Matthias Clasen
8aac574d63 ngl: Improve the coloring shader
Since we are now passing a float anyway, we can avoid
the branch in the fragment shader.
2021-03-14 16:49:31 -04:00
Matthias Clasen
c1f98d6837 ngl: Improve the gradient shaders
Use a define for MAX_COLOR_STOPS, and give the loop
a fixed limit.
2021-03-14 16:49:31 -04:00
Matthias Clasen
3f60c39de4 ngl: Rewrite gsk_ngl_render_job_visit_text_node
Make this more compact, and thus easier to read.
2021-03-14 16:49:31 -04:00
Matthias Clasen
4aa570ba88 ngl: Drop gsk_ngl_render_job_set_color
Colors are not state that we carry across draw ops,
so setting the color on the render job doesn't make
much sense. Instead, pass the color to the various
draw calls. Add a few new ones for that purpose.

Also, shorten the names of some by going from
'load_vertices_from_offscreen' to 'draw_offscreen'.
2021-03-14 16:49:31 -04:00
Matthias Clasen
233969e9e4 ngl: Refactor gsk_ngl_render_job_visit_border_node
With color sorting out of the picture, this can
be much simpler.
2021-03-14 16:49:31 -04:00
Matthias Clasen
19e3a6af5d ngl: Consistently use gsk_scaled_premultiply
Its not going to make much of a difference, but we
can just as well be consistent.
2021-03-14 16:49:31 -04:00
Matthias Clasen
29501f5398 ngl: Fix up uniform enums
This got messed up when color was changed from
a uniform to an attribute in 06d5c8e72d.
2021-03-14 16:49:31 -04:00
Jiri Grönroos
3408240ba6 Update Finnish translation
(cherry picked from commit f5a34b53af)
2021-03-14 17:03:07 +00:00