Matthias Clasen
8609cd5686
Try to fix cairo node serialization
...
Place the saved png at the right offset.
This depends on
https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/118
to make the cairo recording surface produce a proper png.
2021-01-30 19:47:45 -05:00
Piotr Drąg
cc5edbbbb2
Update POTFILES.in
2021-01-30 14:21:32 +01:00
Matthias Clasen
94d9e34dd3
Merge branch 'fix-unfocus-on-unmap' into 'master'
...
Fix unsetting focus
Closes #3623
See merge request GNOME/gtk!3136
2021-01-30 03:25:19 +00:00
Matthias Clasen
3dbf5038fa
Fix unsetting focus
...
Make _gtk_window_unset_focus_and_default queue the changes
for after the next draw. This achieves two things: first,
it avoids invalidating css at the wrong time (e.g. when
setting child-visible during size-allocation), and second,
it defers the focus change until after the widget is
hidden, so that moving the focus has the desired effect
of picking a different, visible widget.
Fixes : #3623
2021-01-29 21:41:16 -05:00
Matthias Clasen
456a2f3bcf
Merge branch 'msvc.nounistd' into 'master'
...
testsuite/testutils.c: Fix build on Visual Studio
See merge request GNOME/gtk!3131
2021-01-29 20:16:13 +00:00
Matthias Clasen
8e1fa52d14
Merge branch 'gst-vaapi-fix' into 'master'
...
gtkgstsink: Sync texture before handing it to GDK
See merge request GNOME/gtk!3114
2021-01-29 19:06:03 +00:00
Matthias Clasen
cbf2feb633
Merge branch 'ci-gstreamer-deps' into 'master'
...
Ci gstreamer deps
See merge request GNOME/gtk!3133
2021-01-29 19:05:47 +00:00
Matthias Clasen
afe8ee501c
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!3134
2021-01-29 18:47:31 +00:00
Jan Alexander Steffens (heftig)
4644dab081
gtkgstsink: Sync texture before handing it to GDK
...
We need to synchronize when moving the texture between contexts, or we
get glitches with VA-API decoding.
2021-01-29 18:58:17 +01:00
Matthias Clasen
b37a69d76c
ci: Add mesa-libGLES-devel
...
Try again, since libglvnd-devel is not the right choice.
2021-01-29 12:55:46 -05:00
Emmanuele Bassi
51bc6ce2e4
build: Disable subproject Cairo tests
...
There's really no point in running them.
2021-01-29 16:31:10 +00:00
Emmanuele Bassi
988ebc2248
docs: Annotate XML fragments as such
...
This way we can get syntax highlighting.
2021-01-29 16:31:10 +00:00
Emmanuele Bassi
9f31e95420
docs: Escape bare tags
...
Otherwise tools processing the description of GtkWidget will be *very*
confused.
2021-01-29 16:31:10 +00:00
Emmanuele Bassi
3a076e26f7
docs: Use the appropriate syntax for code block language
2021-01-29 16:31:09 +00:00
Emmanuele Bassi
e3e85fc6f3
docs: Remove stray code block end marker
2021-01-29 16:31:09 +00:00
Jonas Ådahl
ad3a35b4c5
Merge branch 'gtk-surface-release-4' into 'master'
...
wayland: Signal gtk-shell surface destruction to the server
See merge request GNOME/gtk!3129
2021-01-29 16:21:05 +00:00
Matthias Clasen
454caa3eec
ci: Use v26 of the Fedora image
...
This includes libglvnd-devel and should fix using the
gstreamer gl support.
2021-01-29 11:14:54 -05:00
Matthias Clasen
0ffe67ffed
ci: Add libglvnd-devel to images
...
gstreamers gl support included headers from this
package without depending on it. Work around this
packaging error by explicitly adding the needed
dependencies.
2021-01-29 11:07:11 -05:00
Matthias Clasen
8eb46bbfb2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3615
See merge request GNOME/gtk!3132
2021-01-29 15:15:43 +00:00
Chun-wei Fan
d8e8b3c235
testsuite/testutils.c: Fix build on Visual Studio
...
Visual Studio does not come with unistd.h, but Windows do have write() and
close() in io.h, so include io.h instead of unistd.h on Windows.
For MinGW, unistd.h in turn includes io.h.
2021-01-29 17:59:10 +08:00
Timm Bäder
79f273348d
gl renderer: Fix viewport computation when rendering offscreen
...
Fixes #3615
2021-01-29 10:37:48 +01:00
Timm Bäder
fc99081658
showrendernode: Monitor input file
2021-01-29 09:45:25 +01:00
Timm Bäder
aba14e6a43
node editor: Show some default node data
...
Show case the icon and the render node format this way.
2021-01-29 09:45:25 +01:00
Timm Bäder
8ebcef97ff
shader builder: Improve error output
2021-01-29 09:45:25 +01:00
Timm Bäder
00956a3770
node editor: Make help textview monospace
...
Otherwise the nice markdown tables don't line up.
2021-01-29 08:07:39 +01:00
Matthias Clasen
1635d9fb78
Merge branch 'pango-glyph-positions' into 'master'
...
Tell pango not to round glyph positions
See merge request GNOME/gtk!2058
2021-01-29 01:41:56 +00:00
Matthias Clasen
20fb155e8c
gsk: Fix render node serialization
...
When looking for ascii glyphs, we must match
the pango shape flags that GTK is using.
2021-01-28 18:19:42 -05:00
Matthias Clasen
da59c77ae2
widget: Use subpixel positioning
...
Before turning off pangos rounding of glyph positions,
we must check if the cairo we are using is new enough
to have working subpixel positioning (the relevant
cairo commit is 52a7c79fd4ff96bb5fac175f0199819b0f8c18fc).
2021-01-28 18:17:22 -05:00
Matthias Clasen
0d0bdaa02e
gsk: Fix a thinko
...
With subpixel positioning, we need to offset the
cached glyphs by their phase.
2021-01-28 18:16:16 -05:00
Sebastian Keller
04cf5044da
wayland: Signal gtk-shell surface destruction to the server
...
This adds a "release" destructor for the gtk_surface1 interface which
signals to the server that a surface has been destroyed on the client
side, which the current "destroy" does not do.
Ideally the protocol would have specified a destroy request marked as
destructor to handle this automatically, however this is no longer
possible due to the destroy method being implicitly generated in the
absence of an explicit request in the protocol. Adding a destroy request
marked as destructor now would generate a new destroy method that
unconditionally would send the request to the server, which would break
clients running on servers not supporting that request.
2021-01-28 22:31:03 +01:00
Anders Jonsson
b005cd0bbd
Update Swedish translation
...
(cherry picked from commit 5a5bb9099e
)
2021-01-28 20:39:25 +00:00
Matthias Clasen
f5379d2047
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3127
2021-01-28 19:12:18 +00:00
Matthias Clasen
98c247ec29
label: Drop some unused includes
2021-01-28 12:27:07 -05:00
Matthias Clasen
38e2f9138d
Remove vestigial glade support
...
These files have not been kept up to date, and
glade doesn't work with GTK4 currently.
2021-01-28 12:27:07 -05:00
Matthias Clasen
3cc7d9b8c0
Move the gesture icons in the right place
...
Put these images into gtk/icons, where they belong.
2021-01-28 12:27:07 -05:00
Matthias Clasen
1ac9400712
Drop unused logo resource
...
The inspector no longer sets a window icon.
2021-01-28 12:27:07 -05:00
Matthias Clasen
10d5705b70
Reduce use of GtkStyleContext
...
Remove some unnecessary uses of GtkStyleContext where
we can directly go to the GtkCssStyle, and and drop
unnnecessary includes.
2021-01-28 12:27:07 -05:00
Matthias Clasen
2d0d579735
Unify border-spacing handling
...
Avoid using GtkStyleContext unnecessarily, just go
to the css node directly.
2021-01-28 12:27:07 -05:00
Matthias Clasen
ac0f524722
build: Redo the tools build
...
Move the tools directory to be toplevel, and instead of
recompiling sources twice, link them with the our new
static libgtk.a.
2021-01-28 12:27:07 -05:00
Matthias Clasen
2cd0e5f60b
Merge branch 'wip/fl/gl-renderer-fixes' into 'master'
...
gskglshaderbuilder: bind correct uv location
See merge request GNOME/gtk!3128
2021-01-28 17:15:43 +00:00
Fabio Lagalla
d83502d054
gskglshaderbuilder: bind correct uv location
2021-01-28 17:08:46 +01:00
Matthias Clasen
9e539a7f59
Merge branch 'matthiasc/for-master' into 'master'
...
builder-tool: Translate GtkImage:pixbuf
See merge request GNOME/gtk!3126
2021-01-28 02:04:48 +00:00
Matthias Clasen
c60247f51f
Merge branch 'wip/fl/gl-gradients' into 'master'
...
OpenGL gradient rendering improvements and additions
See merge request GNOME/gtk!3105
2021-01-28 01:43:57 +00:00
Matthias Clasen
06321511ad
builder-tool: Translate GtkImage:pixbuf
...
The pixbuf property doesn't exist anymore. It is
commonly set to a path in ui files, so translate it
to the file property.
2021-01-27 17:01:51 -05:00
Matthias Clasen
2e7923cad0
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Add gtk_widget_grab_default to migration guide
See merge request GNOME/gtk!3125
2021-01-27 21:53:02 +00:00
Matthias Clasen
3c66c27caa
docs: Add gtk_widget_grab_default to migration guide
...
Point out the replacement for this api.
2021-01-27 13:50:05 -05:00
Timm Bäder
7f4bd6917e
Merge branch 'sophie-h-master-patch-47269' into 'master'
...
widget: get_name() is not nullable
See merge request GNOME/gtk!3124
2021-01-27 18:34:10 +00:00
Sophie Herold
b89376da55
widget: get_name() is not nullable
...
Partial revert of !2905
2021-01-27 17:49:17 +00:00
Fabio Lagalla
a1dd6521e8
gskglrenderer: Remove switch fallthrough comments
2021-01-27 12:52:11 +01:00
Fabio Lagalla
0088f840fe
gskrendernode: Cache angle in conic gradients
2021-01-27 12:44:10 +01:00
Fabio Lagalla
1b698c896e
gskglrenderer: Use gboolean instead of bool
2021-01-27 12:44:10 +01:00
Fabio Lagalla
04000f28e7
gskglrenderer: First class support of repeating-radial-gradient
2021-01-27 12:44:10 +01:00
Fabio Lagalla
976a05f6eb
gskglrenderer: First class support of repeating-linear-gradient
2021-01-27 12:44:10 +01:00
Fabio Lagalla
b15902bf44
gskglrenderer: Optimize conic-gradient shader
2021-01-27 12:44:10 +01:00
Fabio Lagalla
5ac7529771
gskglrenderer: Optimize radial-gradient shader
2021-01-27 12:44:10 +01:00
Fabio Lagalla
bbf68c0d9d
gskglrenderer: Optimize linear-gradient shader
2021-01-27 12:44:10 +01:00
Matthias Clasen
eeb3dd3511
Merge branch 'fix-can-focus' into 'master'
...
widget: Fix can-focus
Closes #3610
See merge request GNOME/gtk!3123
2021-01-27 05:34:21 +00:00
Matthias Clasen
7b0ce11e46
Merge branch 'search-entry-capture' into 'master'
...
Search entry capture
Closes #3098
See merge request GNOME/gtk!3115
2021-01-27 05:14:30 +00:00
Matthias Clasen
8ef1d6a49c
widget: Fix can-focus
...
Setting can-focus to FALSE on a widget is supposed
to prevent focus from entering the entire subtree.
So when we grab focus directly to a widget, we need
to check the can-focus flag not just of the widget
itself, but all its ancestors.
Fixes : #3610
2021-01-26 23:45:06 -05:00
Matthias Clasen
7db60f958d
searchentry: Capture events in the bubble phase
...
This is an unfortunate naming clash, but it avoids
an event handling clash between the capture widget
and its children.
Fixes : #3098
2021-01-26 22:17:57 -05:00
Matthias Clasen
30043e072e
Merge branch 'css-crossfade-color' into 'master'
...
Css crossfade color
See merge request GNOME/gtk!3122
2021-01-27 03:11:17 +00:00
Matthias Clasen
5ee7606779
css: Support colors in cross fades
...
The CSS Image Spec (Level 4) allows colors in
cross-fade expressions to specify solid-color images.
Support this.
2021-01-26 21:14:09 -05:00
Matthias Clasen
25409c5a5a
css: Add a constructor for GtkCssImageFallback
...
Add a way to create a solid color image.
2021-01-26 21:10:11 -05:00
Matthias Clasen
51122dd287
docs: Cosmetics
...
Tweak the css docs slightly.
2021-01-26 20:33:16 -05:00
Matthias Clasen
ec9159f983
Merge branch 'gst-vaapi-fix-pre' into 'master'
...
Minor fixes to gtkgstsink
See merge request GNOME/gtk!3120
2021-01-27 01:11:54 +00:00
Matthias Clasen
f3d77d1c21
Merge branch 'css-text-decoration' into 'master'
...
css: Fix text-decoration-line support
Closes #3621
See merge request GNOME/gtk!3121
2021-01-27 00:42:40 +00:00
Matthias Clasen
1258fcaaf4
css: Fix text-decoration-line support
...
This property needs to be treated as flags, not as
enum, since it should be possible to specify more
than one value, e.g.
text-decoration-line: underline overline;
Tests included.
Fixes : #3621
2021-01-26 17:53:14 -05:00
Jan Alexander Steffens (heftig)
00fd60aaa8
gtkgstsink: Use video_frame_free also for the GL path
...
The video frame needs to stay mapped while the texture is in use.
Avoid using g_memdup because the structure is not supposed to be moved.
2021-01-26 20:30:47 +01:00
Jan Alexander Steffens (heftig)
c7a7d0582a
gtkgstsink: Report allocation size even if no pool requested
...
We can do that so we should.
2021-01-26 20:30:47 +01:00
Matthias Clasen
b6e7acfb90
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Update border-size docs
See merge request GNOME/gtk!3119
2021-01-26 16:25:24 +00:00
Matthias Clasen
40eae298d5
docs: Update border-size docs
...
GtkCenterLayout respected border-size as well.
2021-01-26 10:40:22 -05:00
Marek Černocký
09a9131a10
Updated Czech translation
2021-01-26 16:21:18 +01:00
Marek Černocký
c93c9f5c2a
Updated Czech translation
2021-01-26 16:12:36 +01:00
Matthias Clasen
7f08adc23e
Merge branch 'ebassi/for-master' into 'master'
...
Fixes for gdk_surface_translate_coordinates()
See merge request GNOME/gtk!3118
2021-01-26 13:57:50 +00:00
Emmanuele Bassi
f41012080f
Validate arguments
...
We're just assuming everything is not NULL or with a valid type.
2021-01-26 12:56:32 +00:00
Emmanuele Bassi
786e9d351c
Make the inout argument logic clearer
...
It's easy to misread a `+=`.
2021-01-26 12:54:53 +00:00
Emmanuele Bassi
3d2cf97fbf
Fix annotations
...
The arguments are really (inout), not (out).
2021-01-26 12:54:00 +00:00
Matthias Clasen
1fe6fb6739
Merge branch 'circular-menubutton' into 'master'
...
Allow circular menubuttons
Closes #3423 and #3523
See merge request GNOME/gtk!3117
2021-01-26 12:47:38 +00:00
Emmanuele Bassi
6710eb5eb3
Merge branch 'ricotz/for-master' into 'master'
...
gdk: Add missing g-i annotations for gdk_surface_translate_coordinates
See merge request GNOME/gtk!3112
2021-01-26 12:28:55 +00:00
Matthias Clasen
80b1d55683
Merge branch 'css-overline' into 'master'
...
css: Support overline
See merge request GNOME/gtk!3116
2021-01-26 05:44:14 +00:00
Matthias Clasen
1cebc4316b
Allow circular menubuttons
...
Fixes #3523
2021-01-26 00:20:23 -05:00
Matthias Clasen
20895d6f3f
Merge branch 'adaptive-emojichooser' into 'master'
...
Adaptive emojichooser
Closes #3307
See merge request GNOME/gtk!2989
2021-01-26 05:07:46 +00:00
Matthias Clasen
65a4118d50
css: Support overline
...
We can support text-decoration-line: overline,
since pango supports it now.
2021-01-26 00:04:04 -05:00
Matthias Clasen
4857829aaa
popover: Try to not exceed monitor bounds
...
When the natural size of the popover exceeds
the monitor width, clamp it to fit on screen.
This gives the Emoji chooser a chance to
work on phone screens.
Fixes : #3307
2021-01-25 23:33:04 -05:00
Matthias Clasen
2ea4574caf
emojichooser: Allow the section buttons to wrap
...
Use a flowbox instead of a horizontal box for
the section buttons at the bottom, so they can
wrap and allow for narrow layout.
We also need to stop giving the scrolledwindow
a content height, so it can shrink to make room
for more rows of section buttons.
2021-01-25 23:32:15 -05:00
Matthias Clasen
102b74f9eb
emojichooser: Make keynav work with != 7 columns
...
The number of 7 columns was hardcoded in a few places
related to keynav across sections. The flowbox does
not have an api for it, but we can find out anyway
how many columns there are.
2021-01-25 23:32:08 -05:00
Matthias Clasen
8a0d4dfa94
searchbar: Capture events in the bubble phase
...
This is an unfortunate naming clash, but it avoids
an event handling clash between the capture widget
and its children.
Fixes : #3098
2021-01-25 22:16:29 -05:00
Matthias Clasen
b4e645862a
searchbar: Fix documentation mishap
...
The css section was inserted between the example
and the sentence referring to it.
2021-01-25 22:15:56 -05:00
Matthias Clasen
ea48506a32
Merge branch 'simplify-get-module-path' into 'master'
...
modules: Simplify _gtk_get_module_path
See merge request GNOME/gtk!3113
2021-01-26 02:53:38 +00:00
Jan Alexander Steffens (heftig)
23f0a29260
modules: Simplify _gtk_get_module_path
...
Remove the bizarre loops.
2021-01-25 22:47:16 +01:00
Rico Tzschichholz
9249717cf4
gdk: Add missing g-i annotations for gdk_surface_translate_coordinates
2021-01-25 20:18:33 +01:00
Matthias Clasen
4196dfc374
Merge branch 'wip/jimmac/larger-scrollbars-gtk4' into 'master'
...
Adwaita: make scrollbars larger
Closes #1886
See merge request GNOME/gtk!3109
2021-01-25 13:35:47 +00:00
Jakub Steiner
23af707b41
Adwaita: make scrollbars larger
...
When using scrollbars as active controls, rather than their primary role as indicators,
increase their size as click targets.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1886
2021-01-25 14:15:22 +01:00
Matthias Clasen
421088c3a0
Merge branch 'transform-origin' into 'master'
...
Transform origin
See merge request GNOME/gtk!3108
2021-01-25 12:58:36 +00:00
Matthias Clasen
749f1a7c00
Add a reftest for transform-origin
2021-01-24 23:47:10 -05:00
Matthias Clasen
344f9fcf05
css: Implement transform-origin
...
Implement most of transform-origin. We only
handle the xy components currently, which lets
us reuse the position value implementation that
is used for background-position.
2021-01-24 22:49:08 -05:00
Matthias Clasen
4c971cd4da
docs: Fix reference for css transform
...
Refer to the canonical location for the css
transform spec.
2021-01-24 22:48:00 -05:00
A S Alam
43d553dcfb
Update Punjabi translation
...
(cherry picked from commit 64519d73bb
)
2021-01-24 22:52:47 +00:00
A S Alam
66264f9a3d
Update Punjabi translation
...
(cherry picked from commit 518331812e
)
2021-01-24 22:42:39 +00:00
Efstathios Iosifidis
269f369541
Update Greek translation
...
(cherry picked from commit 281c17c400
)
2021-01-24 10:17:36 +00:00
Matthias Clasen
1973019962
Merge branch 'static-lib-for-tests' into 'master'
...
Static lib for tests
See merge request GNOME/gtk!3107
2021-01-23 16:15:23 +00:00
Matthias Clasen
fe515c4c1c
testsuite: Link some tests statically
...
Link tests for private apis statically.
2021-01-23 10:34:57 -05:00
Matthias Clasen
14f0a0addb
Create a static library
...
Rearrange our build to create a libgtk.a for the the contents of gtk/,
and build libgtk-4.so from our per-subdirectory static libraries.
This will let us link tests statically for testing internal apis.
2021-01-23 10:31:23 -05:00
Matthias Clasen
64a2d0221c
Merge branch 'lsan-leaks-2' into 'master'
...
Lsan leaks 2
See merge request GNOME/gtk!3106
2021-01-22 20:08:54 +00:00
Matthias Clasen
0ef91c3ba8
Avoid a buffer overrun
...
We were putting the '\0' behind the end. Oops.
2021-01-22 13:56:04 -05:00
Matthias Clasen
2adcb7be71
Tweak lsan suppressions
...
We don't use atk-bridge anymore, and we don't want
to see gio leaks.
2021-01-22 13:32:41 -05:00
Matthias Clasen
a332f2402a
ci: Don't print lsan suppressions
...
Printing these out breaks TAP output, and we really
aren't interested in them.
2021-01-22 13:01:09 -05:00
Matthias Clasen
131a61c51b
testsuite: Fix a leak
...
asan pointed out that the array tests leak.
2021-01-22 11:50:04 -05:00
Matthias Clasen
39d5dd89c5
Avoid a heap-use-after-free
...
_gtk_gesture_cancel_sequence frees the struct pointed to by data,
so don't write to it afterwards. Found by asan.
2021-01-22 11:39:04 -05:00
Danial Behzadi
341efe9a40
Update Persian translation
2021-01-22 14:57:52 +00:00
Matthias Clasen
5ed6f89b4a
Merge branch 'lsan-leaks' into 'master'
...
Lsan leaks
See merge request GNOME/gtk!3104
2021-01-22 12:30:22 +00:00
Matthias Clasen
4d609149d2
Merge branch 'tests-without-diff' into 'master'
...
testsuite: Stop requiring diff
See merge request GNOME/gtk!3103
2021-01-22 05:16:08 +00:00
Matthias Clasen
0d790505aa
Force malloc of g_slices in asan build
...
Otherwise leaks could be missed.
2021-01-22 00:13:13 -05:00
Matthias Clasen
a486536925
Remove libc from leak suppression list
...
Every program starts in __libc_start_main, so this would suppress
everything. This doesn't happen in practice because asan by default
is unable to unwind the stack. Setting
ASAN_OPTIONS=fast_unwind_on_malloc=0,malloc_context_size=15 can unwind
the stack, and if malloc_context_size is large enough it will indeed
suppress everything.
2021-01-22 00:12:46 -05:00
Matthias Clasen
e808fb424a
testsuite: Stop requiring diff
...
Unify the many copies of diff_with_file in one source
file, and patch it to detect diff at runtime and fall
back to a simple strcmp if we don't have it. Make all
tests use this new testutils.c, and stop requiring
diff for building the tests.
This should let us allow to build on Windows with the
default value for -Dbuild-tests.
2021-01-21 23:57:24 -05:00
Matthias Clasen
6c54abeca7
wayland: Explicitly announce ssd for kwin
...
Without this, kwin correctly assumes that we are
using client-side decorations. This is a port
of 32ae97f1
from GTK 3.24.
Fixes : #3609
2021-01-21 22:45:47 -05:00
Daniel Șerbănescu
d24b8a094c
Update Romanian translation
2021-01-21 19:27:47 +00:00
Emmanuele Bassi
c46391420f
Merge branch 'ebassi/lazier-a11y' into 'master'
...
Lazier accessibility
See merge request GNOME/gtk!3102
2021-01-21 18:57:34 +00:00
Yuri Chornoivan
68df7527f7
Update Ukrainian translation
2021-01-21 18:23:25 +00:00
Matthias Clasen
5a3c3d8210
Merge branch 'inspector-controllers' into 'master'
...
Inspector controllers
See merge request GNOME/gtk!3101
2021-01-21 18:15:57 +00:00
Emmanuele Bassi
95ceb49770
a11y: Make GtkATContext realization lazier
...
We only realize the ATContext on the top level, which will create an
GtkAtSpiRoot object and the corresponding GtkAtSpiCache object. Whenever
an AT connects to the accessibility bus, and asks for the various
objects, all the ATContext will be realized on demand.
2021-01-21 16:40:57 +00:00
Emmanuele Bassi
0bde58ffd7
a11y: Avoid signal emission during cache population
...
If we're responding to a request to get all the cached items, there's no
need to emit signals when adding an ATContext to the cache.
2021-01-21 16:40:57 +00:00
Matthias Clasen
ccd9827b63
inspector: Redo the actions page
...
Don't create widgets in bind, instead just set
the new action on the action-editor, and let it
recreate the parts that need to be recreated.
2021-01-21 10:25:13 -05:00
Matthias Clasen
db189cfb9f
inspector: Reshuffle action editor
...
Prepare the action editor for being able to change its
actions after creation.
2021-01-21 10:24:31 -05:00
Matthias Clasen
7527f181d5
inspector: Simplify action editor
...
We are not using the size group anymore, so drop it.
2021-01-21 10:20:21 -05:00
Matthias Clasen
c05b418512
inspector: Split out variant editor
2021-01-21 10:19:18 -05:00
Matthias Clasen
e97d996fe4
inspector: Redo the shortcuts page
...
Use a column view here.
2021-01-21 10:19:18 -05:00
Matthias Clasen
0537b167ca
inspector: Redo the controllers page
...
Use a column view, and only show the widgets own
controllers.
2021-01-21 10:19:18 -05:00
Matthias Clasen
40446201ff
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #3607
See merge request GNOME/gtk!3100
2021-01-21 04:22:13 +00:00
Matthias Clasen
fff6b35821
inspector: Redo the controllers page
...
Use a column view, and only show the widgets own
controllers.
2021-01-20 18:51:01 -05:00
Emmanuele Bassi
75f2d7583f
Abort if the shared memory pool cannot be created
...
If we cannot allocate memory, we cannot create any windowing system
surface. There's no coming back from that.
Fixes : #3607
2021-01-20 19:10:54 +00:00
Matthias Clasen
1fd8d3b487
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Update getting started section
Closes #3601
See merge request GNOME/gtk!3099
2021-01-20 15:54:37 +00:00
Emmanuele Bassi
a1216599ff
Add rename-to annotation for GtkListStore.insert_valuesv()
...
The vector-based variant should shadow the variadic arguments function
in bindings.
2021-01-20 14:10:17 +00:00
Emmanuele Bassi
8fff0e0fdf
docs: Reformat GtkListStore.insert_values()
2021-01-20 14:10:17 +00:00
Emmanuele Bassi
439727a84a
Add more directions to the issue templates
...
Let's hope people read them.
2021-01-20 14:10:17 +00:00
Matthias Clasen
3a18a6dddf
docs: Update getting started section
...
We were still talking about draw signals here,
which don't exist anymore.
Fixes : #3601
2021-01-20 08:01:54 -05:00
Matthias Clasen
d7050c63ae
Merge branch 'treeview-sort-arrows' into 'master'
...
Redo arrow icons in various widgets
Closes #3577
See merge request GNOME/gtk!3097
2021-01-19 21:24:04 +00:00
Balázs Meskó
b7c88ec87d
Update Hungarian translation
2021-01-19 20:47:20 +00:00
Matthias Clasen
5985b62f60
columnview: Redo indicator arrows
...
Use the same approach as GtkTreeViewColumn for sort
indicators. Luckily, the same css works for both.
2021-01-19 14:24:19 -05:00
Matthias Clasen
e7c29b989c
menbutton: Redo indicator arrows
...
Instead of hardcoding icon names in the widget, use
arrow.none, arrow.up, arrow.down, arrow.left, arrow.right
styles and set the icon to use with -gtk-icon-source. This
lets themes change the icons that are used here, without
forcing all uses of pan-up/down/start/end-symbolic to be
treated the same.
Document this in the menubutton CSS docs.
2021-01-19 14:02:23 -05:00
Matthias Clasen
2100e427d9
treeviewcolumn: Redo sort arrows
...
Instead of hardcoding icon names in the widget, use
sort-indicator.ascending and sort-indicator.descending styles
and set the icon to use with -gtk-icon-source. This lets themes
change the icon that is used here, without forcing all uses of
pan-up/down-symbolic to be treated the same.
Document this in the treeview CSS docs.
Fixes : #3577
2021-01-19 14:02:16 -05:00
Matthias Clasen
2550d6dc63
Merge branch 'wip/kalev/dist-HighContrast-dark' into 'master'
...
dist: Fix css theme disting after HighContrast-dark changes
See merge request GNOME/gtk!3095
2021-01-19 12:08:21 +00:00
Matthias Clasen
ca72fae884
Merge branch 'issue-2436-gtk4' into 'master'
...
macOS: fix #2436 raise transient window on focus
Closes #2436
See merge request GNOME/gtk!3094
2021-01-19 11:56:54 +00:00
Matthias Clasen
4fc1af14a7
Merge branch 'wip/kalev/NEWS.pre-4.0' into 'master'
...
Split NEWS for pre-4.0 changes
See merge request GNOME/gtk!3096
2021-01-19 11:43:58 +00:00
Kalev Lember
1a30ec6da6
dist: Fix css theme disting after HighContrast-dark changes
...
Commit f60d245e32
renamed it from
HighContrast-inverse.css to HighContrast-dark.css.
2021-01-19 10:50:30 +01:00
Kalev Lember
e77d519482
Split NEWS for pre-4.0 changes
...
Similar to commit 87e9f0895b
that did the
same for older releases, this commit splits out pre-4.0 changes to
separate NEWS.pre-4.0 file.
2021-01-19 10:40:09 +01:00
Thomas Holder
59806eee38
macOS: fix #2436 raise transient window on focus
...
Ported from gtk-3-24 e278f38905
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2436
2021-01-19 09:31:00 +01:00
Matthias Clasen
e6f0103940
Merge branch 'version-bump' into 'master'
...
Version bump
See merge request GNOME/gtk!3093
2021-01-19 04:48:26 +00:00
Matthias Clasen
cbaad3dbd9
Add version macros for 4.2
...
These will be needed for adding new API.
2021-01-18 23:10:18 -05:00
Matthias Clasen
ee43a6a603
Bump version to 4.1
...
master is now open for 4.2 API additions.
Includes an update for the one test we have that
has the version number in its expected output.
2021-01-18 23:09:44 -05:00
Matthias Clasen
1ac1147ecb
Merge branch 'check_button_activate' into 'master'
...
Add activate signal to GtkCheckButton
Closes #3525 and #3550
See merge request GNOME/gtk!3012
2021-01-19 04:06:01 +00:00
Matthias Clasen
1edbc1f1f9
Merge branch 'wip/jtojnar/fix-pc-vulcan' into 'master'
...
build: Use Meson’s module for building .pc files
Closes #3517
See merge request GNOME/gtk!3005
2021-01-19 04:04:34 +00:00
Matthias Clasen
146b4c93ba
4.0.2
2021-01-18 22:23:57 -05:00
Matthias Clasen
94f90f457a
Merge branch 'fix-cell-renderer-toggle' into 'master'
...
cellrenderertoggle: Fix css node handling
Closes #3599
See merge request GNOME/gtk!3092
2021-01-19 02:09:10 +00:00
Matthias Clasen
6b7d56ac49
cellrenderertoggle: Fix css node handling
...
Commit cbbbf44dd4
tried to replace
gtk_style_context_save_named with an explicit
css node to save to, but it failed, and the failure
was showing up as crashes in the inspector.
Fix by Benjamin Otte.
Fixes : #3599
2021-01-18 20:52:59 -05:00
Emmanuele Bassi
1635d7be8c
Merge branch 'cherry-pick-gtk_file_chooser_set_current_name-fix-type' into 'master'
...
gtk_file_chooser_set_current_name: fix type of name argument
See merge request GNOME/gtk!3091
2021-01-18 23:19:00 +00:00
Thomas Holder
992cd088cf
gtk_file_chooser_set_current_name: fix type of name argument
...
The description says UTF-8 string, but the annotation said filename.
Cherry-picked from gtk-3-24 1573ff6803
2021-01-18 22:14:03 +01:00
Matthias Clasen
f6010b2a59
Merge branch 'doap-update' into 'master'
...
Update the gtk.doap file
See merge request GNOME/gtk!3088
2021-01-18 14:40:02 +00:00
Matthias Clasen
9222a5fd6d
Update the gtk.doap file
...
Add relevant people as maintainers.
2021-01-18 09:14:50 -05:00
Florentina Mușat
6f7fb6ba5a
Update Romanian translation
2021-01-18 13:06:18 +00:00
Chun-wei Fan
a57a144f8e
Merge branch 'win32-remove-layered-windows' into 'master'
...
GDK/Win32: Remove layered windows usage
See merge request GNOME/gtk!2782
2021-01-18 10:42:37 +00:00
Chun-wei Fan
7b47e3225b
GDK/Win32: Remove layered windows usage
...
In GTK4, we are now defaulting to the OpenGL renderer with the Cairo renderer
only used as a fallback, so there is no point keeping the code paths that use
layered windows as layered windows do not work well with OpenGL nor Vulkan.
2021-01-18 12:48:16 +08:00
Matthias Clasen
6aa893e091
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3437
See merge request GNOME/gtk!3087
2021-01-17 17:51:15 +00:00
Matthias Clasen
5aa03bcb0d
aboutdialog: Fix initial focus
...
When GtkAboutDialog was changed to derive from
GtkWindow, it lost the initial focus handling that
GtkDialog has. Reinstate some of it.
Fixes : #3437
2021-01-17 11:53:53 -05:00
Matthias Clasen
d7060025e0
inspector: Avoid a critical
...
Avoid a critical when closing the inspector with the
recorder page open.
2021-01-17 10:55:53 -05:00
Matthias Clasen
00883016af
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #3593
See merge request GNOME/gtk!3086
2021-01-17 14:20:13 +00:00
Fabio Tomat
f0d8b614d0
Update Friulian translation
2021-01-17 13:11:25 +00:00
Piotr Drąg
ddbd574643
Update Polish translation
2021-01-17 12:38:17 +01:00
Timm Bäder
5ea3777599
widget: Fix gtk_widget_class_add_binding() argument name
2021-01-17 08:12:14 +01:00
Timm Bäder
a3949763f2
Add nullable annotations to GtkShortcutFunc
...
Fixes #3593
2021-01-17 08:11:42 +01:00
Matthias Clasen
1b961a9ae2
Merge branch 'surface-scale' into 'master'
...
Surface scale
Closes #3578
See merge request GNOME/gtk!3085
2021-01-17 05:23:22 +00:00
Timm Bäder
d9f6b268d3
gl renderer: Use rect_contains_rect() copy
...
And this way the contains_rect() inside
rounded_inner_rect_contains_rect() goes from 3.3% to 0.79% in the
fishbowl when rendering the levelbars.
2021-01-17 04:39:26 +01:00
Timm Bäder
934b91f65f
label: Remove unneeded NULL guards
...
The pointers passed to GtkWidgetClass::measure cannot be NULL
2021-01-17 04:39:26 +01:00
Timm Bäder
c3050231d1
label: Refactor get_layout_location
...
Make this function shorter, the parameters non-nullable and the simple
cases more explicit.
2021-01-17 04:39:26 +01:00
Timm Bäder
4d7a01562e
gl renderer: Don't reset offset when drawing offscreen
2021-01-17 04:39:26 +01:00
Timm Bäder
650eed7f72
gl renderer: Properly y-flip non-offscreen children of rounded clips
2021-01-17 04:39:26 +01:00
Timm Bäder
ec8614e8e4
label: Fix a potential memory leak
...
This only happens in error cases so not very interesting. Anyway, try to
make scan-build happy.
2021-01-17 04:39:26 +01:00
Timm Bäder
cb41b96a9e
builderparser: Save finalizers in a GPtrArray
...
We get up to 370 of these when starting the widget-factory.
2021-01-17 04:39:26 +01:00
Timm Bäder
872b46a527
widget: Shorten get_halign() a bit
2021-01-17 04:39:26 +01:00
Timm Bäder
b1c8613dbe
accessible: Fix memory leak if context is unset
...
Unref the acessible values
2021-01-17 04:39:26 +01:00
Timm Bäder
de6cd4f0d2
builder: Use a GPtrArray when parsing signals
2021-01-17 04:39:26 +01:00
Timm Bäder
aec2fb939f
builderparser: Keep properties in a GPtrArray
2021-01-17 04:39:26 +01:00
Timm Bäder
69293db804
builderparser: Only allocate subparser stack when needed
...
Out of the 3.3k possibly_finish_subparser calls when opening the
widget-factory, only 300 need one.
2021-01-17 04:39:26 +01:00
Matthias Clasen
61a7ebf980
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Add details
See merge request GNOME/gtk!3084
2021-01-16 20:36:44 +00:00
Matthias Clasen
f14762b026
x11: Notify on surface scale changes
...
Emit property notification when the surface scale
changes.
2021-01-16 15:22:46 -05:00
Matthias Clasen
187d261400
wayland: Notify on surface changes
...
When the width, height or scale of a surface changes,
emit property change notification.
2021-01-16 15:22:46 -05:00
Matthias Clasen
e905f7ff7c
native: Listen for scale changes
...
Connect to change notification for the surface
scale-factor property, and update the widgets
when it changes.
Fixes : #3578
2021-01-16 15:22:46 -05:00
Matthias Clasen
aefc630d29
surface: Add a scale-factor property
...
This will allow us to notify when the scale changes.
2021-01-16 15:22:46 -05:00
Matthias Clasen
a5e929ce36
docs: Add details
...
Explain the difference between GtkPicture and GtkImage,
and when you might want to use which.
2021-01-16 14:45:20 -05:00
Yuri Chornoivan
1641d365f5
Update Ukrainian translation
2021-01-16 18:44:30 +00:00
Matthias Clasen
07d9cd8efe
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Add a legend for the layout overlay
See merge request GNOME/gtk!3083
2021-01-16 18:37:58 +00:00
Matthias Clasen
29868b2a05
docs: Remove a reference to configure events
...
Those don't exist anymore.
2021-01-16 12:52:06 -05:00
Matthias Clasen
691b6b88ea
inspector: Add a legend for the layout overlay
...
Colors are more useful if you know what they represent.
2021-01-16 12:38:24 -05:00
Matthias Clasen
2ee1a00177
Merge branch 'matthiasc/for-master' into 'master'
...
overlaylayout: Set the child type in the class
See merge request GNOME/gtk!3082
2021-01-16 03:55:22 +00:00
Matthias Clasen
144cf2d040
overlaylayout: Set the child type in the class
...
We don't need to override create_layout_child here,
and setting the child type has the advantage that
the layout properties are showing up in the inspector.
2021-01-15 22:35:11 -05:00
Matthias Clasen
e1a308d151
Merge branch 'rtl-margins' into 'master'
...
Flip margin-start and -end in RTL
Closes #3583
See merge request GNOME/gtk!3081
2021-01-16 00:19:41 +00:00
Matthias Clasen
bbfaacb598
Add a reftest for box flipping
...
Test that a horizontal box changes the order of its
children in RTL, and that widget margins flip start
and end.
This tests the fix in d89ff71819
.
2021-01-15 18:43:31 -05:00
Matthias Clasen
d89ff71819
Flip margin-start and -end in RTL
...
We lost this at some point, but the widget margins
are still meant to be relative to the text direction.
Fixes : #3583
2021-01-15 14:58:21 -05:00
Matthias Clasen
141c725489
Merge branch 'macos-ci-cairo' into 'master'
...
Revert "Fix the cairo build on OS X"
See merge request GNOME/gtk!3080
2021-01-15 15:56:37 +00:00
Matthias Clasen
bbc3aa4ff9
Revert "Fix the cairo build on OS X"
...
This reverts commit 710ef00dfe
.
The cairo change has been merged.
2021-01-15 09:07:02 -05:00
Marek Černocký
f7856f29fd
Updated Czech translation
2021-01-15 14:10:17 +01:00
Matthias Clasen
7b69c58deb
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3078
2021-01-15 05:48:00 +00:00
Matthias Clasen
f60d245e32
Make HighContrastInverse a dark variant
...
Make HighContrastInverse available as the dark variant of HighContrast,
in addition to being a standalone theme. This regularizes our theme
variants, and doesn't hurt.
2021-01-14 22:55:52 -05:00
Matthias Clasen
f04e5bd590
Make Adwaita-dark available as a theme
...
This makes Adwaita-dark available as a standalone
theme.
2021-01-14 22:42:50 -05:00
Matthias Clasen
90c428b4a7
Merge branch 'wip/carlosg/mark-valid-portal-settings' into 'master'
...
gdk/wayland: Mark matched settings from the portal as valid
See merge request GNOME/gtk!3076
2021-01-14 18:33:45 +00:00
Carlos Garnacho
97b5fad131
gdk/wayland: Mark matched settings from the portal as valid
...
Commit e6209de962
added some checks on TranslationEntry.valid in
order to figure out whether using the new font settings or the
old g-s-d ones. However that's only set in the non-sandboxed case.
This makes sandboxed applications fallback to the old (and also
non-existing with modern g-s-d) settings, possibly resulting in
ugly defaults being picked.
Fix this by also marking TranslationEntry elements as valid when
using the settings portal, precisely those entries that we are able
to read and match with our own table.
2021-01-14 15:57:29 +01:00
Matthias Clasen
285a91715d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3075
2021-01-14 13:38:18 +00:00
Matthias Clasen
880468f5a3
docs: Fix a heading gotcha
...
One of the many migration guide sections was too
prominent.
2021-01-14 08:13:34 -05:00
Matthias Clasen
6ddbb2a402
doc: Clarify some migration hints
...
Don't mention GdkSurface::layout as replacement for
GtkWindow::configure-event. Instead, explain how to
save window state.
2021-01-14 07:52:36 -05:00
Daniel Mustieles
7eab565225
Updated Spanish translation
2021-01-14 10:35:43 +01:00
Daniel Mustieles
b34101d45d
Updated Spanish translation
2021-01-14 10:35:35 +01:00
Christian Hergert
6c21a7be0b
Merge branch 'nacho/macos-stylus' into 'master'
...
Support stylus devices on macos
See merge request GNOME/gtk!3058
2021-01-13 16:13:14 +00:00
Anders Jonsson
a6f2bcb220
Update Swedish translation
2021-01-12 21:55:52 +00:00
Anders Jonsson
ef0db01d5c
Update Swedish translation
2021-01-12 21:51:53 +00:00
Emmanuele Bassi
ef33ec639c
Merge branch 'ebassi/aspect-frame-doc' into 'master'
...
Ebassi/aspect frame doc
See merge request GNOME/gtk!3073
2021-01-12 16:50:31 +00:00
Matthias Clasen
27ca4434e2
Remove a misleading comment
2021-01-12 10:50:41 -05:00
Matthias Clasen
9861c7d25c
Merge branch 'dist-css' into 'master'
...
dist: Add a dist script to generate css
See merge request GNOME/gtk!3074
2021-01-12 14:04:51 +00:00
Matthias Clasen
13ef82fc4d
dist: Add a dist script to generate css
...
When I added the sassc option, I failed to ensure that
the theme css is included in the tarballs. This is required
to make tarball builds with -Dsassc=disabled work.
2021-01-12 08:42:18 -05:00
Emmanuele Bassi
b33ca43e14
Merge branch 'ebassi/atspi-path-sanitize' into 'master'
...
a11y: Fix leak
See merge request GNOME/gtk!3072
2021-01-12 12:37:31 +00:00
Emmanuele Bassi
39e07a8d56
Document limits of gtk_aspect_frame_get_ratio()
...
The GtkAspectFrame:ratio getter will return the value set, not the
actual ratio computed in case GtkAspectFrame:obey-child is TRUE.
2021-01-12 12:28:18 +00:00
Emmanuele Bassi
5286743cbe
Document GtkAspectFrame properties
2021-01-12 12:28:00 +00:00
Emmanuele Bassi
58bb998ef0
docs: GtkAspectFrame is not a GtkFrame any more
2021-01-12 12:23:14 +00:00
Emmanuele Bassi
a56b2900dd
a11y: Fix leak
...
Introduced by me in commit 03b60a2d5e
.
2021-01-12 12:01:29 +00:00
Emmanuele Bassi
ff34124394
Merge branch 'ebassi/atspi-path-sanitize' into 'master'
...
a11y: Sanitize the AT-SPI object path further
See merge request GNOME/gtk!3071
2021-01-12 11:36:52 +00:00
Emmanuele Bassi
03b60a2d5e
a11y: Sanitize the AT-SPI object path further
...
When falling back to g_get_prgname(), we need to take into account that
the program name may be the full argv[0] path, which will end up messing
the DBus object path.
2021-01-12 11:15:28 +00:00
Benjamin Otte
d939d04885
Merge branch 'about-dialog-icon-size' into 'master'
...
About dialog icon size
See merge request GNOME/gtk!3070
2021-01-11 23:13:21 +00:00
Matthias Clasen
73fb28a058
iconhelper: Recreate the texture when needed
...
When the icon size changes, we want to reload themed
icons.
This was showing up as the GtkImage in about dialogs
getting a big size with the same small icon upon
changing -gtk-icon-size in the inspector.
2021-01-11 17:50:05 -05:00
Matthias Clasen
65eaf8e8c4
Adwaita: Make about dialog icons big
...
Use 128 as the icon size for the image widget
in about dialogs.
2021-01-11 17:50:05 -05:00
Matthias Clasen
beeedb5141
aboutdialog: Set icon-size for the logo
...
Make it explicit that we want large icons here.
2021-01-11 17:50:05 -05:00
Matthias Clasen
1d40750a60
aboutdialog: Set a style class
...
Add the .aboutdialog style class to toplevel
widget of about dialogs, similar to what we
do for e.g. GtkAssistant.
2021-01-11 17:46:55 -05:00
Matthias Clasen
96baf9769a
about dialog: Remove manual icon sizing
...
We have icon theme code to do that for us.
2021-01-11 17:46:55 -05:00
Matthias Clasen
5044031b53
Merge branch 'wip/kalev/gcc-11' into 'master'
...
Avoid diagnostics for gcc-11 false positive out of bounds accesses
See merge request GNOME/gtk!3064
2021-01-11 22:04:52 +00:00
Emmanuele Bassi
9f7119ee58
Merge branch 'wip/fl/glrenderer-fixes' into 'master'
...
gl renderer: print fragment shader info
See merge request GNOME/gtk!3069
2021-01-11 16:44:00 +00:00
Kalev Lember
c514c41d0e
Avoid diagnostics for gcc-11 false positive out of bounds accesses
...
This is a patch by Jeff Law <law@redhat.com > done in downstream Fedora
to fix the build with gcc 11.
2021-01-11 17:19:36 +01:00
Jakub Steiner
45848c5298
Merge branch 'wip/jimmac/adjust-for-contemporary-trends' into 'master'
...
Wip/jimmac/adjust for contemporary trends
Closes #3568 and #3560
See merge request GNOME/gtk!3060
2021-01-11 16:09:08 +00:00
Fabio Lagalla
8c61038b9f
gl renderer: print fragment shader info
...
It was logged twice the vertex shader info, instead
2021-01-11 17:06:03 +01:00
Jakub Steiner
b5cb2f7e41
Adwaita: update image assets
...
- reflect button styling
- ignore backdrop for non buttons
2021-01-11 16:24:22 +01:00
Matthias Clasen
8af0d4b51f
Merge branch 'otte/for-master2' into 'master'
...
Remove guarantees we do not intend to hold
See merge request GNOME/gtk!3066
2021-01-11 15:07:40 +00:00
Jakub Steiner
378ad75d48
Adwaita: scales border
...
- remove -alt specialcasing for a straight forward border like
everything else and avoid broken :dark and HC
2021-01-11 16:00:32 +01:00
Matthias Clasen
01d19e2aa4
Merge branch 'fix-tablet-4' into 'master'
...
Wayland: ignore touch/tablet events on destroyed surfaces [GTK4]
See merge request GNOME/gtk!3065
2021-01-11 14:44:27 +00:00
Jakub Steiner
64e16ecaf1
Merge branch 'wip/jimmac/undercorated-active' into 'master'
...
Adwaita: less dramatic :active for undecorated buttons
Closes #3575
See merge request GNOME/gtk!3068
2021-01-11 14:37:58 +00:00
Jakub Steiner
6a047e53a8
Adwaita: less dramatic :active for undecorated buttons
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3575
2021-01-11 15:00:38 +01:00
Jakub Steiner
31a7bc70c9
Adwaita: fix button border logic
...
- tint borders dark on non default / blue / red buttons
- just use plain $borders_color otherwise
- fixes HC/HCi
- ditch -alt buttons
2021-01-11 14:08:57 +01:00
Jakub Steiner
874cae1dab
Adwaita: flatter, lighter buttons
...
- lighten up for contrast, less of an oldschool gradient
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3568
2021-01-11 13:50:32 +01:00
Jakub Steiner
7a3dd41dba
Adwaita: round progress and levelbars
2021-01-11 13:50:32 +01:00
Jakub Steiner
149962670a
Adwaita: :checked:active and checked:hover states
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3560
2021-01-11 13:50:32 +01:00
Jakub Steiner
849e3c8b4b
Adwaita: flat scales, progressbars and level bars
2021-01-11 13:50:32 +01:00
Jakub Steiner
c9807f5afe
Adwaita: remove edge highlights
...
- flat is the name of the game
- kids scream make it flat
- simplify mixins
2021-01-11 13:50:32 +01:00
Carlos Garnacho
9a9899597c
Merge branch 'avoid-pointer-reset-gtk4' into 'master'
...
wayland: avoid set_cursor() when unchanged or invisible
Closes #3350
See merge request GNOME/gtk!3062
2021-01-11 12:07:01 +00:00
Matthias Clasen
fecb7af66e
Merge branch 'surface.compute.win32' into 'master'
...
Fix surface and geometry computation for Windows (Win32)
Closes #3480
See merge request GNOME/gtk!3067
2021-01-11 11:56:42 +00:00
Ignacio Casal Quinteiro
f5efb15cba
Support stylus devices on macos
2021-01-11 11:41:00 +01:00
Chun-wei Fan
d7d4fed0f3
gdk/win32: Fix window display and resizing
...
Have an implementation of ->request_layout() and ->compute_size() for the Win32
surface backend so that we can properly display and move and resize the
windows, as we request from the Win32 APIs.
Hxndling Aerosnap properly is mostly done except for snap_up(), which needs to
to be looked at later.
2021-01-11 17:55:25 +08:00
Chun-wei Fan
c2c2635763
gdk/win32: Rename 'margins' to 'shadow'
...
This improves consistency for the code.
2021-01-11 17:53:56 +08:00
Chun-wei Fan
fb33e83c96
gdkwin32-surface.c: Fix return type
...
gdk_win32_toplevel_present() should now be returning nothing, not a gboolean.
2021-01-11 17:53:47 +08:00
Chun-wei Fan
291ad17a22
gdksurface-win32.c: Decouple mapped state from surface creation
...
In line with what is done with the Wayland backend, enable the mapped state
independently as needed from the toplevel surface presentation, and also enable
the mapped state if necessary when presenting the popup surface.
2021-01-11 17:53:38 +08:00
Benjamin Otte
0f052d46b2
Remove guarantees we do not intend to hold
...
The fact that we are using gdk-pixbuf for loading files currrently does not mean we will use it going forward.
Also, "anything gdk-pixbuf can load" does not mean anything, because what gdk-pixbuf can load is a compile-time option.
As new_from_resource() will assert() if it cannot load a resource, we must be very sure that people do not use anything but PNG and JPEG for resources and the docs were not clear on that.
2021-01-10 21:37:03 +00:00
Asier Sarasua Garmendia
506423cf23
Update Basque translation
2021-01-10 18:00:26 +00:00
Asier Sarasua Garmendia
946a496a2e
Update Basque translation
2021-01-10 17:59:56 +00:00
Piotr Drąg
d20526570b
Update Polish translation
2021-01-10 18:27:55 +01:00
wisp3rwind
8312b9d9ca
Wayland: ignore touch/tablet events on destroyed surfaces
...
When destroying a wl_surface (e.g. when a window or menu is closed), the
surface may continue to exist in the compositor slightly longer than on
the client side. In that case, the surface can still receive input
events, which need to be ignored gracefully.
In particular, this prevents segfaulting on wl_surface_get_user_data()
in that situation.
Reported in
https://gitlab.gnome.org/GNOME/gtk/-/issues/3296
The same issue for pointers/keyboards was reported in
https://bugzilla.gnome.org/show_bug.cgi?id=693338
and fixed with in
bfd7137ffb
3625f17857
a8fc099a72
2021-01-10 12:31:37 +01:00
wisp3rwind
992f092968
wayland: avoid set_cursor() when unchanged or invisible
...
In pointer_surface_update_scale(), only rescale the cursor surface when
the scale has actually changed and the cursor is on at least one output.
fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3350
Right now, this issue is not completely understood, so it might also
involve some questionable handling of cursor surface by sway/wlroots.
However, irrespective of that issue, this patch avoids unnecessary calls to the
compositor, and there should be no drawback: Whenever the pointer enters
a new output, pointer_surface_update_scale() will be called again, such
that correct scaling of the cursor is still ensured.
There is a slight difference: When the cursor leaves the last output,
previously the image was reset to scale factor 1. Now, it keeps whatever
was last. That might be more sensible than the previous behaviour,
assuming that it's likely that when the cursor enter an output again, it
has the same scaling. Alternatively, if one cares about resource usage
at this level, it might make more sense to destroy the surface than
rescaling to 1.
2021-01-09 11:42:59 +01:00
Matthias Clasen
60835227a1
4.0.1
2021-01-09 01:30:13 -05:00
Matthias Clasen
2b6b35d91f
build: Add a sassc feature
...
Add an option to disable css rebuilds. This allows
to build GTK from release tarballs (Which are including
the css) without a sassc dependency.
2021-01-09 01:30:13 -05:00
Matthias Clasen
897164c66c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3565
See merge request GNOME/gtk!3061
2021-01-09 03:56:59 +00:00
Matthias Clasen
441d944c08
droptarget: Some docs cleanups
...
Fixes #3565 , among other things.
2021-01-08 22:24:42 -05:00
Chun-wei Fan
2b8ad6c4b5
gtkffmediafile.c: Use g_snprintf()
...
Visual Studio 2013 is just shy of being sufficiently C99-compliant to
build GTK master, as it did not support snprintf() in its CRT
implementation.
Use g_snprintf() to cover for this.
2021-01-08 22:24:42 -05:00
Chun-wei Fan
99b2da4c47
gtk/gtksecurememoryprivate.h: Include glib.h
...
Some compilers somehow do not have `inline` defined, so include glib.h
to ensure that keyword is defined.`
2021-01-08 22:24:42 -05:00
Matthias Clasen
8243b5493b
a11y: Avoid __ prefixes for variable names
...
Seems that msvc does not like that.
2021-01-08 22:24:42 -05:00
Matthias Clasen
d5ef906cff
Merge branch 'nacho/seatdefault' into 'master'
...
Clean ups in seat default
See merge request GNOME/gtk!3057
2021-01-09 01:04:22 +00:00
Ignacio Casal Quinteiro
a720d8bc79
seatdefault: use g_clear_pointer to unref the tools
2021-01-08 13:11:56 +01:00
Ignacio Casal Quinteiro
57691eacc5
seatdefault: rename dispose method
2021-01-08 13:10:56 +01:00
Matthias Clasen
526e24f5b1
Merge branch 'wip/nacho/associated-device' into 'master'
...
gdkdevice: use g_set_object to set the associated device
See merge request GNOME/gtk!3049
2021-01-07 21:08:46 +00:00
Matthias Clasen
2a79152762
Merge branch 'mcatanzaro/company-unparent-warning' into 'master'
...
Add critical if widget has a parent during dispose
See merge request GNOME/gtk!3053
2021-01-07 18:37:28 +00:00
Matthias Clasen
f03acaf7ab
Merge branch 'mcatanzaro/unparent' into 'master'
...
Remove incorrect unparenting guidance from migration guide
See merge request GNOME/gtk!3050
2021-01-07 18:35:37 +00:00
Matthias Clasen
4e7ce9edcf
Merge branch 'mcatanzaro/gtkbuilder-docs' into 'master'
...
Improve GtkBuilder documentation
See merge request GNOME/gtk!3055
2021-01-07 18:00:19 +00:00
Matthias Clasen
ff72619333
Merge branch 'mcatanzaro/event-controller-porting-guide' into 'master'
...
Expand event controller API changes section of GTK 4 porting guide
See merge request GNOME/gtk!3054
2021-01-07 17:55:38 +00:00
Michael Catanzaro
59692599ea
Remove incorrect unparenting guidance from migration guide
...
This rule is almost always wrong, and we're having some trouble agreeing
on replacement text. Let's remove the whole paragraph for now, to avoid
confusion.
2021-01-07 11:39:53 -06:00
Benjamin Otte
4761641098
Add critical if widget has a parent during dispose
...
This is a refcounting bug. Be very verbose about it instead of trying to
call a function that releases a reference to the widget without
references.
2021-01-07 11:39:32 -06:00
Michael Catanzaro
afaa275dc8
gtkbuilder: fix recommendations that no longer make sense in GTK 4
...
In GTK 3, it was pretty much always better to use
gtk_builder_new_from_whatever() rather than
gtk_builder_add_from_whatever(). But in GTK 4, this is no longer
generally true. Let's add some context on when you want to use one or
the other.
2021-01-07 11:34:42 -06:00
Michael Catanzaro
c736deb83b
Add section on GtkBuilder API changes to GTK 4 migration guide
...
Thanks to Benjamin for helping with the language.
2021-01-07 11:34:42 -06:00
Emmanuele Bassi
e930a20522
Merge branch 'ebassi/ci-only' into 'master'
...
ci: Specify `only` for other jobs
See merge request GNOME/gtk!3052
2021-01-07 17:17:44 +00:00
Michael Catanzaro
137f32f9ef
Expand event controller API changes section of GTK 4 porting guide
...
There is more to say about changes to GtkEventController.
2021-01-07 10:53:09 -06:00
Emmanuele Bassi
195b98f19a
ci: Only run macOS job on upstream branches
...
Don't run CI on macOS for forks.
2021-01-07 16:14:04 +00:00
Emmanuele Bassi
87e0a28482
ci: Specify only
for other jobs
...
Otherwise MRs will only run macOS jobs.
2021-01-07 16:13:59 +00:00
Ignacio Casal Quinteiro
3ca3d7efef
gdkdevice: use g_set_object to set the associated device
2021-01-07 16:13:39 +01:00
Matthias Clasen
d8d8322912
Merge branch 'wip/jimmac/flat-buttons' into 'master'
...
Adwaita: fine tune flat button styling
Closes #3481
See merge request GNOME/gtk!3046
2021-01-07 13:42:42 +00:00
Matthias Clasen
1ea1a70fd2
Merge branch 'wip/jimmac/hc-switch-border' into 'master'
...
HC: switch border color
Closes #3460
See merge request GNOME/gtk!3048
2021-01-07 13:41:40 +00:00
Matthias Clasen
1d5bc2838b
Merge branch 'wip/nacho/tool-api' into 'master'
...
seat: improve api to take into account the tool type
See merge request GNOME/gtk!3047
2021-01-07 13:25:11 +00:00
Ignacio Casal Quinteiro
45ec3fc389
seat: improve api to take into account the tool type
...
Otherwise if we have several tools with the same serial
and hardware id we might match the wrong tool.
2021-01-07 12:50:48 +01:00
Jakub Steiner
3a5eee7dbe
HC: switch border color
...
- lighten inverted HC borders while darkening the regular/light variant
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3460
2021-01-07 12:44:53 +01:00
Jakub Steiner
0cda6f42b8
Adwaita: fine tune flat button styling
...
- enough contrast for hover and active, while noticably different in
normal nad headerbar context (and both light and dark variants).
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3481
2021-01-07 12:12:55 +01:00
Matthias Clasen
0d99ef7cee
Merge branch 'X11-surface' into 'master'
...
x11: fix crash on idle compute size without layout
See merge request GNOME/gtk!3031
2021-01-06 22:13:02 +00:00
Matthias Clasen
7583810c90
Merge branch 'wip/exalm/headerbar' into 'master'
...
headerbar: Prepend start window controls instead of appending
See merge request GNOME/gtk!3044
2021-01-06 22:10:25 +00:00
Jordi Mas
1341bc0b19
Update Catalan translation
2021-01-06 22:42:44 +01:00
Alexander Mikhaylenko
fd073deea9
headerbar: Prepend start window controls instead of appending
...
Make sure they are always in the correct position.
2021-01-06 22:04:55 +05:00
Matthias Clasen
5652ab0a61
Merge branch 'macos-ci' into 'master'
...
Macos ci
See merge request GNOME/gtk!3032
2021-01-06 14:52:11 +00:00
Matthias Clasen
2ff23b08be
Merge branch 'wip/jimmac/headerbar-specialcasing' into 'master'
...
Adwaita: specialcase switches and scales for headerbars
Closes #3504
See merge request GNOME/gtk!3043
2021-01-06 14:40:36 +00:00
Matthias Clasen
0336af06f1
ci: Limit macos runs
...
We are building the full stack here, which is pretty expensive,
so only do it for merge requests and master.
2021-01-06 09:36:54 -05:00
Matthias Clasen
2af9f1ad62
Merge branch 'wip/jimmac/hc-dim-label' into 'master'
...
HC: special case .dim-label
Closes #3507
See merge request GNOME/gtk!3042
2021-01-06 13:04:24 +00:00
Jakub Steiner
e657da6658
Adwaita: specialcase switches and scales for headerbars
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3504
2021-01-06 13:02:21 +01:00
Jakub Steiner
fd00aa98ea
HC: special case .dim-label
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3507
2021-01-06 12:46:35 +01:00
Timm Bäder
de8a8d7bde
Merge branch 'dlech-master-patch-65287' into 'master'
...
doc: fix annotation for GtkCssLocation
See merge request GNOME/gtk!3041
2021-01-06 08:55:57 +00:00
David Lechner
eb6fbf907f
doc: fix annotation for GtkCssLocation
...
GtkCssLocation is a type so it should be prefixed with # rather than @.
2021-01-06 04:32:09 +00:00
Christian Hergert
4035f86b6d
macos: use deprecated NSOnState for older systems
2021-01-05 16:37:30 -08:00
Christian Hergert
855b44f2ed
macos: keep array of pasteboard types
...
To support Sierra, we need to have access to pasteboard types as a
NSString. Constants are provided in later versions of macOS, but we
can emulate that with an array which is initialized on first access.
2021-01-05 16:21:05 -08:00
Christian Hergert
f2e0097cac
gtk: fix brace initialization for bloom filter
...
This was breaking CI for macOS and it is a simple enough change to ensure
that just works for the internal buckets.
2021-01-05 16:21:05 -08:00
Christian Hergert
7c9bc7a204
macos: supply NSPasteboardType when necessary
...
On older macOS systems, we might need to provide our own typedef
for the NSPasteboardType. It is just a NSString pointer anyway.
2021-01-05 13:54:07 -08:00
Christian Hergert
f4f104c9f9
macos: fix typedef on older macOS
...
On older systems, we don't have a typedef for gravity. They are a NSString
pointer and we can provide that manually just fine.
2021-01-05 13:53:22 -08:00
Christian Hergert
28a6f0df05
macos: handle point conversion on older macOS
...
On older systems, the availability of some methods seem to be incorrect
based on Apple documentation. This works around the issue by using
the rect conversion on older systems.
2021-01-05 13:52:11 -08:00
Matthias Clasen
0eab4deab0
Merge branch 'media-caps' into 'master'
...
media: Be more specific in our caps
See merge request GNOME/gtk!3037
2021-01-05 21:34:27 +00:00
Matthias Clasen
6e8e467cc9
Merge branch 'simplify-toolbar' into 'master'
...
3to4: Remove GtkToolbar::toolbar_style
See merge request GNOME/gtk!3040
2021-01-05 19:35:46 +00:00
Matthias Clasen
ca9801f5fb
3to4: Remove GtkToolbar::toolbar_style
...
The property was removed (with the rest of the widget),
so keeping it around in the ui file makes no sense.
Testcase included.
2021-01-05 13:58:58 -05:00
Matthias Clasen
6b6fc1e5d8
Merge branch 'ebassi/migrating-clipboard' into 'master'
...
Ebassi/migrating clipboard
See merge request GNOME/gtk!3039
2021-01-05 18:41:27 +00:00
Emmanuele Bassi
e3641d0568
Merge branch 'dlech-master-patch-06007' into 'master'
...
docs: fix parameter reference in gtk_bitset_contains()
See merge request GNOME/gtk!3035
2021-01-05 18:10:59 +00:00
David Lechner
a5b88a53c2
docs: fix parameter reference in gtk_bitset_contains()
...
This fixes an error in the doc comments where the first parameter was
referred to as @bitset instead of @self.
2021-01-05 11:39:43 -06:00
Emmanuele Bassi
e4d0114e0d
docs: Add migration section for GtkClipboard
...
A simple copy/paste text example, plus directing people towards the
appropriate GType to replace the old convenience API.
2021-01-05 16:51:14 +00:00
Matthias Clasen
f974c5343e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3038
2021-01-05 16:49:53 +00:00
Daniel Șerbănescu
bc39da0619
Updated the Romanian Translation
2021-01-05 17:38:02 +01:00
Emmanuele Bassi
1995b7f34b
docs: Preformat some symbols
2021-01-05 16:19:21 +00:00
Matthias Clasen
36eb7c40d0
gtk-demo: Small a11y fix
...
Label the entry in the assistant demo.
2021-01-05 11:16:10 -05:00
Matthias Clasen
56af472cfc
a11y: Only spew help once
...
Make GTK_A11Y=help only spew once, and avoid a warning
when we do.
2021-01-05 11:15:33 -05:00
Matthias Clasen
d1fcfa58b9
popup: Mention the popover arrow in the docs
...
Suggested by Jonas.
2021-01-05 10:59:59 -05:00
Matthias Clasen
cf23324749
Merge branch 'no-gl-context' into 'master'
...
Disable GL support in gstreamer media backend on Windows
See merge request GNOME/gtk!3034
2021-01-05 15:22:09 +00:00
Matthias Clasen
b79c26b39e
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!3029
2021-01-05 15:20:25 +00:00
Matthias Clasen
532b8c71a8
media: Be more specific in our caps
...
We can only handle 2D textures, so tell gstreamer
about that.
2021-01-05 09:28:04 -05:00
Matthias Clasen
7c5b8911d8
Merge branch 'matthiasc/for-master' into 'master'
...
some docs tweaks
See merge request GNOME/gtk!3036
2021-01-05 14:26:38 +00:00
Matthias Clasen
e141d61593
docs: Cosmetics
2021-01-05 08:37:23 -05:00
Matthias Clasen
9595d440cf
docs: Flesh out Popup layout docs
...
We have nice illustrations for this, lets use them.
2021-01-05 08:37:23 -05:00
Yuri Chornoivan
1063924bd0
Update Ukrainian translation
2021-01-05 08:08:44 +00:00
Timm Bäder
42fedfc870
csstokenizer: Keep a GString for name parsing around
...
We only every parse one of those at a time, so keep a GString around for
it. This way we don't have to create a new GString every time we parse
an identifier. Doesn't spare us the strdup though.
2021-01-05 08:53:13 +01:00
Timm Bäder
24836c0351
csstokenizer: Add separate init functions for token types
...
Using a variadic function is just awkward there. Use different init
functions and use them as appropriate; we already know which one to call
everywhere.
2021-01-05 08:53:13 +01:00
Timm Bäder
21b6c8b5d8
builder: Remove unused typedef
2021-01-05 08:53:13 +01:00
Timm Bäder
41fb6f6a8e
builder: Remove unused function prototype
2021-01-05 08:53:13 +01:00
Timm Bäder
071ea6b559
builderparser: Use GPtrArray for stack
2021-01-05 08:53:11 +01:00
Chun-wei Fan
397a71ca8b
gstreamer media backend: Disable OpenGL on Windows
...
...for at least WGL, since we are not allowed to use wglMakeCurrent(),
which is eventually called by gdk_gl_context_make_current() to share WGL
contexts across different threads, which will cause a crash.
This means, we cannot enable WGL in the gstreamer media backend on
Windows.
2021-01-05 14:34:06 +08:00
Matthias Clasen
40c10f83e2
Merge branch 'matthiasc/gl-media-stream' into 'master'
...
Use GL in the gstreamer media backend
See merge request GNOME/gtk!3027
2021-01-05 00:54:37 +00:00
Matthias Clasen
fb31581bb4
gtk-demo: Use GtkVideo in the fishbowl
...
The demo is called 'Video', so we should actually
use a GtkVideo widget. Doing things this way has
the advantage that we get GL support, which wasn't
working with GtkPicture.
2021-01-04 18:26:29 -05:00
Matthias Clasen
536a67ec96
media: Only force GL if we're using a GL renderer
...
When we are not using a GL renderer, getting GL textures
is no advantage to us, so don't make gstreamer send its
frames as GL memory in this case.
2021-01-04 15:01:19 -05:00
Matthias Clasen
53fe751371
media: Convince gstreamer to deliver GL memory
...
Use a glsinkbin to make gstreamer deliver GL memory.
2021-01-04 15:00:36 -05:00
Benjamin Otte
7901ab857b
media: Add support for OpenGL to GtkGstMediaFile
2021-01-04 15:00:36 -05:00
Matthias Clasen
8f585f7a53
video: Realize the media stream before setting a file
...
This makes it so that we obtain a GL context before
creating the GstSink, so we at least advertise our
ability to handle GL buffer.
Gstreamer still won't send us any.
2021-01-04 15:00:36 -05:00
Matthias Clasen
874b19b27e
Merge branch 'wip/jimmac/popover-separators' into 'master'
...
Adwaita: increase cotrast of popover separators
Closes #3535
See merge request GNOME/gtk!3033
2021-01-04 18:14:00 +00:00
Jakub Steiner
fe7b11b4e9
Adwaita: increase contrast of popover separators
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3535
2021-01-04 17:55:44 +01:00
Yetizone
601dfeeff9
checkbutton: Add activate signal to work with gtk_widget_activate()
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3525
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3550
2021-01-04 17:25:53 +02:00
Matthias Clasen
cf623ce774
Merge branch 'window-geometry-info' into 'master'
...
gtk/window: remove GtkWindowGeometryInfo from public header file
See merge request GNOME/gtk!3028
2021-01-04 13:55:08 +00:00
Aurimas Černius
36b49950e8
Updated Lithuanian translation
2021-01-04 14:10:23 +02:00
Matthias Clasen
77feb51b9c
Pass coretext=enabled to harfbuzz
...
When we use harfbuzz as a subproject on OS X,
we (or rather, pango) need coretext support.
2021-01-03 21:34:04 -05:00
Matthias Clasen
710ef00dfe
Fix the cairo build on OS X
...
Change the subproject to point to a branch that includes
an OS X build fix. Once
https://gitlab.freedesktop.org/cairo/cairo/-/issues/441
is fixed, we should switch back to master.
2021-01-03 21:34:04 -05:00
Matthias Clasen
0c8124828f
ci: Disable pixman tests on MacOS
...
The pixman tests fail to build, and I don't have
the stamina to fix all sub-sub-projects, so just
disable the tests.
2021-01-03 21:34:04 -05:00
Matthias Clasen
0605c3c167
ci: Fix the harfbuzz build on MacOS
...
We need to force c++11 at the toplevel here, since
meson can't deal with per-project compiler choice.
2021-01-03 21:34:04 -05:00
Matthias Clasen
93d795e7c0
printing: Remove cairo header checks
...
cc.has_header doesn't work with subprojects, and all this
check does is to make the build fail, so we can just...
let the build fail instead.
2021-01-03 21:34:04 -05:00
Matthias Clasen
d55f938f7c
printing: cairo-pdf is needed
...
The print backends need cairos pdf support, which is
contingent on zlib, so enable that when using cairo
as a subproject, as we do in ci for MacOS.
2021-01-03 21:34:04 -05:00
Matthias Clasen
45bb4dc80c
ci: Add a macos build
...
Most of this is cribbed from glib.
We don't use COMMON_MESON_FLAGS here, since disabling
-Werror one subproject at a time is too painful for
all the promoted sub-sub-projects. This needs a better
solution in meson.
Since this is a full rebuild of the entire stack, limit
this to master and merge requests.
2021-01-03 21:34:04 -05:00
Rafostar
53af35d256
x11: fix crash on idle compute size without layout
...
On x11 toplevel layout is not created before toplevel
is presented, but GTK tries to update it on idle
which leads to a crash due to accessing property
of undefined object. Treat soon to be created layout
as a layout with default values upon creation (resizable).
2021-01-03 18:02:31 +01:00
Philipp Kiemle
51a6b29e01
Update German translation
2021-01-03 13:41:25 +00:00
Philipp Kiemle
e3835476ba
Update German translation
2021-01-03 13:40:13 +00:00
Timm Bäder
256b094b13
messagedialog: Modernize source file
...
Move vfunc implementations above class_init, remove unneeded prototypes,
properly indent everything and remove trailing whitespace
2021-01-03 11:01:29 +01:00
Timm Bäder
699adb0b10
widget: Refactor gtk_widget_class_set_template()
...
Don't call gbytes_get_data/get_size so often and exit early if the given
bytes is already precompiled.
2021-01-03 11:01:29 +01:00
Timm Bäder
c91b5eaa41
widget: Inline setup_template_child() into only caller
...
This is a pretty short and self-contained function.
2021-01-03 11:01:29 +01:00
Timm Bäder
7e1f20bf4c
icontheme: Make a parameter const
2021-01-03 11:01:29 +01:00
Timm Bäder
f9fe640905
settings: Overallocate property_values
...
Instead of walking the pspecs twice and checking for the owner_type,
just allocate n_pspecs entries. They are the same value right now
anyway, but even if they aren't it doesn't hurt to have a few extra ones
allocated.
2021-01-03 11:01:29 +01:00
Timm Bäder
34ea99006f
settings: Load keyfiles ourselves
...
This does not change anything in the case where the .init file does not
exist. We still hit the disk once. Otherwise, we now only hit it once
instead of twice and avoid a potential race-condition.
2021-01-03 11:01:29 +01:00
Timm Bäder
06cce81a97
widget: Use gtk_widget_get_native() in get_surface_allocation()
2021-01-03 11:01:29 +01:00
Timm Bäder
4a1a7940d5
gtksettings: Remove unused defines
2021-01-03 11:01:29 +01:00
Timm Bäder
1108d00014
render: Inline function into only caller
2021-01-03 11:01:29 +01:00
Timm Bäder
034672e84e
frame: Remove unnecessary function
...
Just call the vfunc directly in the only place we used to call the old
wrapper
2021-01-03 11:01:29 +01:00
Timm Bäder
00c885c93c
gesture: Replace tabs
2021-01-03 11:01:29 +01:00
Timm Bäder
114f0bd8d6
box: Replace tabs with spaces
2021-01-03 11:01:29 +01:00
Timm Bäder
24c67efdfd
scrolledwindow: Use g_clear_handle_id
2021-01-03 11:01:29 +01:00
Timm Bäder
6a3748146d
viewport: Small cleanup
...
No need to check for visibility before calling gtk_widget_measure().
2021-01-03 11:01:29 +01:00
Timm Bäder
92ec754737
widget: Move quark_builder_set_id declaration to other GQuarks
2021-01-03 11:01:29 +01:00
Timm Bäder
d11fbbc478
widget: Re-arrange some more functions
2021-01-03 11:01:29 +01:00
Timm Bäder
f11f0da11c
wiget: Fix whitespace issues
...
Switch from tabs to spaces everywhere consistently and remove all
trailing whitespace.
2021-01-03 11:01:29 +01:00
Timm Bäder
ebdf2989f8
widget: Move a few vfunc implementations above class_init
...
And save us the prototypes at the top of the file this way.
2021-01-03 11:01:29 +01:00
Timm Bäder
bc35c5d494
nevertrigger: Remove unused instance members
2021-01-03 11:01:29 +01:00
Timm Bäder
70a3e5e8ce
shortcutmanager: Use g_list_store_find()
...
We require glib 2.66 these days, so we can unconditionally use
g_list_store_find().
2021-01-03 11:01:29 +01:00
Timm Bäder
74ff61a937
gesturelongpress: Remove a useless cast
...
We already get a GtkGestureLongPress here.
2021-01-03 11:01:29 +01:00
Timm Bäder
280d7e57bd
gesturelongpress: Keep the pspec around
...
So we can use it to notify(), like we do everywhere else.
2021-01-03 11:01:29 +01:00
Timm Bäder
03f5a368ec
label: Remove unused private functions
2021-01-03 11:01:29 +01:00
Timm Bäder
0b15aba82a
label: Remove mnemonics_visible_apply_recursively from private header
...
This is only used in gtklabel.c
2021-01-03 11:01:28 +01:00
Timm Bäder
d8fa9de93a
label: Modernize source file
...
Try to sort toplevel functions to minimize unnecessary function
prototypes at the beginning of the file, get rid of all tabs and
trailing whitespace.
2021-01-03 11:01:28 +01:00
Timm Bäder
afabbc4957
gtk4-demo: Remove unused size group
2021-01-03 11:01:28 +01:00
Timm Bäder
d978ba31d6
glcontext-wayland: Whitespace
2021-01-03 11:01:28 +01:00
Timm Bäder
71efa96ef2
gesturestylus: Only add histroy element if translation succeeded
...
Instead of always doing it and then undoing it if the translation does
not succeed.
2021-01-03 11:01:28 +01:00
Timm Bäder
e336fe2bf8
gesturestylus: Retrieve event and controller widget only once
...
Make it clear that these are not gonna chance while iterating the loop.
2021-01-03 11:01:28 +01:00
Timm Bäder
d7f15c15e9
glcontext-wayland: Avoid heap-alloacting small arrays...
...
every frame.
2021-01-03 11:01:28 +01:00
Timm Bäder
fff570538c
glcontext-wayland: Only allocate configs we use
...
We only use the first one, so don't allocate space for more than that.
2021-01-03 11:01:28 +01:00
Matthias Clasen
38166a67c7
NEWS: Updates
2021-01-02 20:17:19 -05:00
Matthias Clasen
01b94db73d
Merge branch 'matthiasc/for-master' into 'master'
...
video: Tweak the docs
See merge request GNOME/gtk!3026
2021-01-02 19:04:26 +00:00
Matthias Clasen
c804645382
video: Tweak the docs
...
Point out the limitations and use cases of GtkVideo
and mention that GtkPicture can display video just fine.
2021-01-02 12:21:03 -05:00
Matthias Clasen
384081ce0a
Merge branch 'matthiasc/for-master' into 'master'
...
video: Pause on unset too
See merge request GNOME/gtk!3025
2021-01-02 15:49:46 +00:00
Florentina Mușat
afccb86f7e
Update Romanian translation
2021-01-02 11:21:43 +00:00
Matthias Clasen
0ba5631100
video: Pause on unset too
...
When new media stream is set on the GtkVideo
widget and we're autoplaying, pause the old one.
Otherwise, the music keeps playing unexpectedly.
2021-01-02 01:33:48 -05:00
Matthias Clasen
c72589f0ee
Merge branch 'wip/chergert/fix-macos-compute-size' into 'master'
...
macos: fix compute_size and request_layout
Closes #3532
See merge request GNOME/gtk!3023
2021-01-01 23:33:01 +00:00
Matthias Clasen
f2e5775380
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3506 and #3530
See merge request GNOME/gtk!3024
2021-01-01 22:48:11 +00:00
Benjamin Otte
a7164208d3
Merge branch 'video-stop' into 'master'
...
video: Stop playing when appropriate
See merge request GNOME/gtk!3022
2021-01-01 21:54:22 +00:00
Matthias Clasen
20f3d1608d
video: Be consistent about play/pause
...
Always check that the stream is prepared, and the
widget is mapped, before calling gtk_media_stream_play().
2021-01-01 16:25:54 -05:00
Christian Hergert
9320148d71
macos: implement compute_size and request_layout
...
These functions were not implemented when the sizing changes
landed before GTK 4 was released. This fixes an issue with non-
resizeable windows not reacting to layout changes.
Fixes #3532
2021-01-01 13:17:47 -08:00
Christian Hergert
ad617a0e06
macos: avoid setHasShadow unless shadow changes
2021-01-01 13:17:47 -08:00
Christian Hergert
62af8365f6
macos: fix toplevel present function prototype
...
No need to return anything here.
2021-01-01 13:17:47 -08:00
Matthias Clasen
29afe5a688
video: Stop playing when appropriate
...
When the widget gets unrealized or hidden, pause
the mediastream. Otherwise, audio might keep playing
unexpectedly.
2021-01-01 15:17:59 -05:00
Matthias Clasen
2d3885a44a
center layout: Fix handling of expanding center child
...
We were not taking spacing into account when adjusting
the size of an expanding center child, causing it to slip
under the end child at times.
Fixes : #3506
2021-01-01 11:02:57 -05:00
Matthias Clasen
75a297632e
Merge branch 'wip/chergert/fix-macos-window-check' into 'master'
...
macos: ensure GdkMacosWindow in surface discovery
Closes #3533
See merge request GNOME/gtk!3021
2021-01-01 15:39:08 +00:00
Matthias Clasen
572649740e
docs: Flesh out the gtk4-builder-tool man page
...
Add some details about the --3to4 conversion, and
set expectations.
2021-01-01 10:14:01 -05:00
Yuri Chornoivan
b5938faa06
Update Ukrainian translation
2021-01-01 14:50:35 +00:00
Matthias Clasen
a4baac7193
docs: Complete a sentence
...
Fixes : #3530
2021-01-01 09:40:40 -05:00
Matthias Clasen
bdde41e290
Merge branch 'encode-symbolic-debug' into 'master'
...
gtk4-encode-symbolic: Add debug output
See merge request GNOME/gtk!3017
2021-01-01 14:23:08 +00:00
Christian Hergert
d888402bf9
macos: ensure GdkMacosWindow in surface discovery
...
We want to ignore windows that are not related to those controlled
by the GDK backend.
Fixes #3533
2020-12-31 10:55:50 -08:00
Christian Hergert
378bd9fab2
Merge branch 'macos-mojave' into 'master'
...
macos: do not crash in mojave
See merge request GNOME/gtk!3020
2020-12-31 18:13:46 +00:00
Ignacio Casal Quinteiro
4ad5e77907
macos: do not crash in mojave
...
The localizedName property is not available in Mojave
so just ifdef in that case the code out.
2020-12-31 11:35:04 +01:00
David Lechner
4fb70c5e4d
gtk/window: remove GtkWindowGeometryInfo from public header file
...
GtkWindowGeometryInfo is only used by static methods in gtkwindow.c
so it doesn't need to be in the public header file.
2020-12-30 01:32:27 -06:00
Matthias Clasen
d5963ad109
Merge branch 'revert-224c2674' into 'master'
...
Revert "Merge branch 'gtk_egl_wayland' into 'master'"
See merge request GNOME/gtk!3018
2020-12-30 03:34:51 +00:00
Matthias Clasen
b5fe434fea
Revert "Merge branch 'gtk_egl_wayland' into 'master'"
...
This reverts merge request !3011
2020-12-30 03:32:18 +00:00
Matthias Clasen
224c2674ab
Merge branch 'gtk_egl_wayland' into 'master'
...
Expose gdk_wayland_surface_get_wl_egl_window()
See merge request GNOME/gtk!3011
2020-12-30 03:32:05 +00:00
Matthias Clasen
878b34fae3
gtk4-encode-symbolic: Add debug output
...
Add a --debug option that makes this tool produce
some debug output that can be helpful in tracking
down why symbolic svgs are broken.
2020-12-29 21:30:52 -05:00
Matthias Clasen
5fe433418d
Merge branch 'mcatanzaro/#3509' into 'master'
...
message dialog: use title style only if there is secondary text
Closes #3509
See merge request GNOME/gtk!3015
2020-12-29 17:47:01 +00:00
Matthias Clasen
02ba9bc1da
Merge branch 'fix-menu-alignment' into 'master'
...
Fix menu item alignment with submenus
See merge request GNOME/gtk!3016
2020-12-29 17:41:49 +00:00
Michael Catanzaro
2336120010
message dialog: use title style only if there is secondary text
...
If there is no secondary text, then the primary text is just a message,
not a title, and should not use title style.
This partially reverts 1e3ec7c1f9
. The
message dialog nown looks like it used to in GTK 3. However, it's still
styled only using a style class rather than using pango markup, as in
GTK 3.
Fixes #3509
2020-12-29 11:15:14 -06:00
Matthias Clasen
0d54d73a51
Fix menu item alignment with submenus
...
We were not aligning model button labels with nesting
submenus with indicators in their containing menu.
This was visible in the application demo of gtk4-demo.
2020-12-29 12:10:35 -05:00
Timm Bäder
6c09832b9b
Merge branch 'xndcn/fix-shader' into 'master'
...
gl: Fix implicit leaking of shader object
See merge request GNOME/gtk!3013
2020-12-29 16:58:55 +00:00
Matthias Clasen
1758f88492
Merge branch 'ebassi/issue-3522' into 'master'
...
Fix the Vulkan header check for VK_RESULT_RANGE_SIZE
Closes #3522
See merge request GNOME/gtk!3009
2020-12-29 16:36:09 +00:00
xndcn
34ffdc6e3f
gl: Fix implicit leaking of shader object
...
According to OpenGL spec, a shader object will only be flagged
for deletion unless it has been detached; when a program object
is deleted, those shader objects attached to it will be detached
but not deleted unless they have already been flagged for deletion.
So we shall detach a shader object before it is deleted, and delete
it before the program object is deleted best.
2020-12-29 23:50:45 +08:00
Timm Bäder
108933b655
Merge branch 'wip/chergert/volatile-fixes' into 'master'
...
types: fix various use of volatile in type registration
See merge request GNOME/gtk!2865
2020-12-29 07:49:12 +00:00
Vivek Kasireddy
3344bcaf92
gdk/wayland/surface: Expose gdk_wayland_surface_get_wl_egl_window()
...
Some GTK based applications such as Qemu UI create and manage
EGLSurfaces associated with the relevant GdkSurfaces. In order to create
an EGLSurface, there needs to be a way to pass the native window
object to eglCreateWindowSurface(). While running in an X environment,
the native window object can be obtained by calling
gdk_x11_surface_get_xid(). Likewise, the native window object can be
obtained by calling gdk_wayland_surface_get_wl_egl_window() while
running in a Wayland environment. Therefore, this API needs to be
exposed to apps.
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com >
2020-12-28 18:20:04 -08:00
Emmanuele Bassi
f22ec063a1
Fix the Vulkan header check for VK_RESULT_RANGE_SIZE
...
The VK_RESULT_RANGE_SIZE enumeration value was removed in 1.2.140, not
1.2.142.
Fixes : #3522
2020-12-28 18:41:18 +00:00
Benjamin Otte
0fcf01ddd5
Merge branch 'gtkmediafile-pixel-aspect-ratio' into 'master'
...
gtkmediafile: Consider pixel-aspect-ratio for rendering video with the correct aspect ratio
Closes #3516
See merge request GNOME/gtk!3007
2020-12-28 14:54:30 +00:00
Asier Sarasua Garmendia
1119a74ff0
Update Basque translation
2020-12-27 17:56:02 +00:00
Sebastian Dröge
18ea60e235
gtkmediafile: Consider pixel-aspect-ratio for rendering video with the correct aspect ratio
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3516
2020-12-27 19:33:55 +02:00
Matthias Clasen
d752828977
Merge branch 'wip/jtojnar/trivial-fix-pc-vulcan' into 'master'
...
build: Fix vulkan reference in pc file
Closes #3517
See merge request GNOME/gtk!3006
2020-12-27 17:06:52 +00:00
Fran Dieguez
1034271d9a
Update Galician translation
2020-12-27 16:56:56 +00:00
Fran Dieguez
f013d3b5d6
Update Galician translation
2020-12-27 16:51:38 +00:00
Benjamin Otte
5f41d26abc
Merge branch 'gtkgstsink-unmap-only-when-done' into 'master'
...
gtkmediafile: Only unmap the GstVideoFrame in the GBytes destroy notify
See merge request GNOME/gtk!3003
2020-12-27 06:17:36 +00:00
Jan Tojnar
7d5826ccf7
build: Fix vulkan reference in pc file
...
A mistake in string concatenation caused the vulcan dependency to be omitted.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3517
2020-12-27 06:42:29 +01:00
Jan Tojnar
2c9f2325e2
build: Use Meson’s module for building .pc files
...
Using the module will prevent trivial bugs caused by incorrect string concatenation.
This is just a literal translation. In the future we might rely on Meson auto-detecting fields from library declaration.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3517
2020-12-27 06:27:59 +01:00
Matthias Clasen
daded2bc86
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3004
2020-12-27 05:21:26 +00:00
Matthias Clasen
bc7619abaf
Merge branch 'gtkclip' into 'master'
...
gtk: remove GtkClipboard leftovers
See merge request GNOME/gtk!2991
2020-12-27 04:32:26 +00:00
Matthias Clasen
459d6e1349
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtk/gesturestylus: Convert motion history from surface coordinates
Closes #3491
See merge request GNOME/gtk!2999
2020-12-27 04:30:38 +00:00
Sebastian Dröge
6e108d310a
gtkmediafile: Only unmap the GstVideoFrame in the GBytes destroy notify
...
The memory pointed to by GstVideoFrame::plane_data becomes invalid after
unmapping causing the GBytes to point at some random memory if the
unmapping is not deferred until its destroy notify.
When the GStreamer buffer is backed by normal system memory this is not
a problem but if it is backed by e.g. an OpenGL texture, dmabuf or some
other hardware-specific memory this will otherwise cause interesting
problems.
2020-12-26 14:26:23 +02:00
Benjamin Otte
9c84fa127a
Merge branch 'unused-static-inline' into 'master'
...
Remove unused static inline function
See merge request GNOME/gtk!3002
2020-12-25 18:05:11 +00:00
Emmanuel Gil Peyrot
84c6708366
Remove unused static inline function
...
This was causing a warning on AArch64 since __LITTLE_ENDIAN__ and
__BIG_ENDIAN__ weren’t set, but the functions were actually completely
unused.
2020-12-25 16:16:43 +01:00
Benjamin Otte
f7e3016949
Merge branch 'gles-gears' into 'master'
...
Fix gtk4-demo’s gears demo on OpenGL ES
See merge request GNOME/gtk!3000
2020-12-25 01:36:34 +00:00
Emmanuel Gil Peyrot
dd1110ca5c
Fix some of gtk4-demo’s transitions example on OpenGL ES
...
Same issue as the previous commit, int+float is error, and pow() only
works on floats.
2020-12-25 01:36:21 +01:00
Emmanuel Gil Peyrot
28c4adac24
Fix gtk4-demo’s gears demo on OpenGL ES
...
Here is a command to reproduce this testcase:
GDK_DEBUG=gl-gles gtk4-demo --run gears
Without this patch, Mesa throws this compile error:
0:130(13): error: no matching function for call to `mod(error, float)'; candidates are:
This is caused by `u_rotation - 90` being of type error since
`u_rotation` is a float and it’s illegal to subtract it with an integer.
2020-12-25 01:21:08 +01:00
Carlos Garnacho
cf20cfd31e
gtk/gesturestylus: Convert motion history from surface coordinates
...
Motion history coordinates are based on GdkSurface coordinates. Transform
the coordinates from the GtkNative they are received on, accounting for the
possible transforms (e.g. due to window borders and shadows).
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3491
2020-12-24 19:59:51 +01:00
Matthias Clasen
7e579bb59a
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2997
2020-12-24 07:13:22 +00:00
Benjamin Otte
96e1b85c2c
gdkarray: Add a "stolen" boolean to splice()
...
If set to TRUE, does not call the free func for the removed items.
This can be used to move items between arrays without having to do the
refcounting dance.
2020-12-24 06:38:45 +01:00
Benjamin Otte
71e616d17e
listview: Use the correct scroll policy
...
Use the horizontal policy for horizontal decisions, not the vertical
one.
This broke in 0011ce949c
.
2020-12-24 06:38:45 +01:00
Benjamin Otte
f85d939e5e
docs: Put render nodes in their own sections
2020-12-24 06:38:45 +01:00
Benjamin Otte
8d014d6cb0
roundedbox: Remove unused API
2020-12-24 06:38:45 +01:00
Benjamin Otte
f7f8990f7a
picture: Fix copy/paste error in docs
2020-12-24 06:38:45 +01:00
Benjamin Otte
d6f288427a
video: When autoplaying, start playing once the video is prepared
...
This fixe video sources with longer loading times not automatically
playing.
2020-12-24 06:38:45 +01:00
Benjamin Otte
2a8f371643
gtk-demo: Don't put the search bar in the scroll area
...
1. That's a bad idea UI wise as you can't see the search after you
scrolled.
2. That's a bad idea code-wise because Listviews need to be put into
a ScrolledWindow or they won't scroll.
2020-12-24 06:38:45 +01:00
Benjamin Otte
dee863dbb2
rendernode: Bail if matrix is invalid
...
Invalid matrices are okay in GSK (and GL), but not in Cairo.
Testcase included.
2020-12-24 06:38:45 +01:00
A S Alam
7d6877ec80
Update Punjabi translation
2020-12-23 19:48:28 +00:00
Danial Behzadi
f426d23690
Update Persian translation
2020-12-23 15:53:07 +00:00
Matthias Clasen
6bd0dc3e78
colorbutton: Correct the css docs
...
Mention the wrapper colorbutton node.
2020-12-23 09:03:07 -05:00
Matthias Clasen
4f0c920a8e
fontbutton: Correct the css docs
...
Mention the wrapper fontbutton node.
2020-12-23 08:59:58 -05:00
Matthias Clasen
b0b793dd94
menubutton: Correct the css docs
...
We are using menubutton instead of button.popup now.
2020-12-23 08:56:18 -05:00
Matthias Clasen
efbb649eee
modelbutton: Center titles
...
The centering of titles was broken in b5b81dea7f
.
Make it mostly work again by adding an empty end indicator.
Related: #3405
2020-12-23 00:51:51 -05:00
Matthias Clasen
e128a77eed
Merge branch 'matthiasc/for-master' into 'master'
...
window: Release application in destroy
See merge request GNOME/gtk!2994
2020-12-23 03:01:55 +00:00
Matthias Clasen
5cd2ee927a
window: Release application in destroy
...
We used to do this; it was lost in some life-cycle
reshuffling.
2020-12-22 20:34:13 -05:00
Marc-André Lureau
90dfb5e138
gtk: remove GtkClipboard leftovers
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2020-12-22 16:39:54 +04:00
Matthias Clasen
e854b90293
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2990
2020-12-22 04:53:31 +00:00
Matthias Clasen
6d042d9e61
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2988
2020-12-22 02:29:03 +00:00
Matthias Clasen
4310f24a4e
Fix warnings with Vulkan < 162
...
Tiring to watch the Vulkan people stumble through
ABI and API compat, but what can you do.
2020-12-21 20:00:16 -05:00
Matthias Clasen
aebf8e3c29
Merge branch 'mcatanzaro/fix-gtk-builder-tool' into 'master'
...
Fix buffer overruns in 'gtk-builder-tool simplify'
See merge request GNOME/gtk!2987
2020-12-21 22:49:42 +00:00
Matthias Clasen
fcd449f0d4
modelbutton: Remove an unused field
...
We're not using the centered field anymore.
2020-12-21 17:45:01 -05:00
Michael Catanzaro
ab1b117d91
Fix buffer overruns in 'gtk-builder-tool simplify'
...
Oops, here we allocate only one byte for each pointer we want to store.
We need to multiply by the size of a pointer.
2020-12-21 15:39:34 -06:00
Emmanuele Bassi
1253296387
Merge branch 'fix-printbackends' into 'master'
...
Fix the value for the print-backends setting
Closes #3486
See merge request GNOME/gtk!2986
2020-12-21 20:04:26 +00:00
Matthias Clasen
466484176f
Merge branch 'ebassi/docs-for-master' into 'master'
...
Ebassi/docs for master
See merge request GNOME/gtk!2983
2020-12-21 19:22:38 +00:00
Matthias Clasen
20289ad8e1
Fix the value for the print-backends setting
...
This was broken in the meson conversion, causing
us to default to "" instead of the built print
backends.
Fixes : #3486
2020-12-21 14:10:03 -05:00
Matthias Clasen
0abb8c6862
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2984
2020-12-21 19:00:10 +00:00
Matthias Clasen
147386189f
inspector: Show glyphs as in node files
...
Reuse the glyph serialization code from gsk to
show glyphs in the same way here.
2020-12-21 13:11:46 -05:00
Matthias Clasen
9cec9e4ce2
gsk: Export the glyph serialization privately
...
We want to use the same serialization in the inspector,
so export this function.
2020-12-21 13:11:08 -05:00
Matthias Clasen
26119af7a6
gsk: Improve glyph serialization
...
The special case for ASCII glyphs is unfortunately not
working very well, because of an oversight in pango:
When I added subpixel positioning, I made pango_shape()
default to not rounding, and make PangoLayout call
pango_shape_with_flags() and pass the rounding information
down. The upshot is that we need to use the _with_flags
variant here and tell it to round position, so it matches
what the text node contains.
2020-12-21 13:08:34 -05:00
Timm Bäder
478d1f71e3
Merge branch 'fix-node-glyphs' into 'master'
...
gsk: Fix serialization of glyphs
Closes #3496
See merge request GNOME/gtk!2982
2020-12-21 17:16:38 +00:00
Emmanuele Bassi
b1d952b8a2
docs: Add examples for GtkDropTarget
...
Like we did for GtkDragSource.
2020-12-21 17:11:42 +00:00
Emmanuele Bassi
b9bcdbbfdc
docs: Add examples of GtkDragSource use
...
The description is a bit terse; we should help out application
developers some more.
2020-12-21 17:03:59 +00:00
Emmanuele Bassi
6c31ed53f4
docs: Fix typo and whitespace
2020-12-21 17:03:42 +00:00
Matthias Clasen
aa95ae774f
gsk: Fix serialization of glyphs
...
We were forgetting to put a space between two numbers
in some cases, confusing the parser.
Test included.
Fixes : #3496
2020-12-21 10:49:56 -05:00
Emmanuele Bassi
65adfd9243
Merge branch 'box_docs' into 'master'
...
box: improve documentation
Closes #3499
See merge request GNOME/gtk!2981
2020-12-21 15:40:07 +00:00
Yetizone
c4a8c0893b
box: improve documentation
...
Rephrase a function parameter description and remove "." from all function parameters descriptions
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3499
2020-12-21 17:26:23 +02:00
Timm Bäder
e90f5e8a20
gskpango: Don't copy fg color
...
No need to do that here, we copy it in to the individual render nodes
anyway.
2020-12-21 15:23:25 +01:00
Timm Bäder
526c76181e
gl renderer: Check for pointer equality in rounded_rect_equal
2020-12-21 15:22:08 +01:00
Timm Bäder
cf352374ae
gskpango: Correct a comment
...
Not all other draw calls will use cairo.
2020-12-21 13:23:28 +01:00
Timm Bäder
98b99201b0
gskpango: Remove bounds rect
...
We only need this to render shapes and trapezoids, i.e. only when
falling back to cairo. Remove code to measure the layout and convert the
ink_rect to a graphene_rect_t from gtk_snapshot_append_layout() and do
it when drawing shapes and trapezoids instead.
2020-12-21 12:56:38 +01:00
Timm Bäder
bce4d669ee
gskpango: Fix a potential cairo_t leak
...
The previous early return did not cairo_destroy() it.
2020-12-21 12:49:06 +01:00
Timm Bäder
e7a326e230
label: Refactor get_layout_location()
...
Rename a few local variables to be clearer about whether they belong to
the widget or to the layout.
Remove a workaround for an old bug that is no longer valid. We don't
underallocate the layout anymore. Aways center vertically, with respect
to the yalign.
2020-12-21 12:44:01 +01:00
Timm Bäder
9eaeaa8452
label: Refactor snapshot()
...
Use two early-out style if statements to reduce indentation in this
entire function.
2020-12-21 12:32:32 +01:00
Timm Bäder
2031c5bf90
textlayout: Remove dead offset_y code
2020-12-21 10:26:03 +01:00
Timm Bäder
9fefa7b44c
rendernode: Different uniformity in border nodes
...
Means they are different and a diff is impossible.
2020-12-21 10:26:03 +01:00
Timm Bäder
a2a70c3b65
rendernode: Sort diff() requirements by complexity
2020-12-21 10:26:03 +01:00
Timm Bäder
0b4ed8d791
renderborder: Avoid 0 width outline color nodes
2020-12-21 10:26:03 +01:00
Timm Bäder
c34f98931e
layoutoverlay: Avoid adding transparent color nodes
...
We have a region for the border here, but the color is defined as
transparent black because we don't want to render anything for it.
This way, the generated .node file for the listbox demo in gtk4-demo
with enabled layout borders is 3.5MB instead of 3.8MB.
2020-12-21 10:26:03 +01:00
Timm Bäder
2feac2772f
layoutoverlay: Avoid adding 0 sized color nodes
...
This way, the output node file of the listbox demo in gtk4-demo with
enabled layout borders is only 3.8MB instead of 12MB.
2020-12-21 10:26:03 +01:00
Timm Bäder
fdda4e4e99
GskTransform: Add nullable annotations to _equals()
...
Both can be NULL here.
2020-12-21 10:26:03 +01:00
Timm Bäder
e1cf0cff26
gl renderer: Proper state tracking for color matrix ops
2020-12-21 10:26:03 +01:00
Timm Bäder
634fa772c9
gl renderer: Add missing debug output for repeat ops
2020-12-21 10:26:03 +01:00
Timm Bäder
4b3bbe0ecd
gl renderer: Create shader-global uniform ops on draw()
...
This way we can render the first frame of tests/testoutsetshadowdrawing
in 153 ops instead of 183.
And the first frame of gtk4-demo in 260 instead of 300.
2020-12-21 10:26:03 +01:00
Timm Bäder
cde43541d0
gl renderer: Unify new clip/viewport rects in blur_texture()
2020-12-21 10:26:03 +01:00
Timm Bäder
186287ecfb
GskTransform: Fix identity transform class name
2020-12-21 10:26:02 +01:00
Timm Bäder
bd5d1615ac
GskTransform: Avoid a ref+unref pair
...
If gsk_transform_is_identity() returned FALSE for the next transform,
the previous code did a ref + unref pair, even though it was unneeded.
2020-12-21 10:26:02 +01:00
Timm Bäder
21299cc7e4
icontheme: Make some constant values const
2020-12-21 10:26:02 +01:00
Timm Bäder
e747ea7dfd
pixbufutils: Only convert icon size to string once
2020-12-21 10:26:02 +01:00
Timm Bäder
810cd7881e
icontheme: Make icon_paintable_ensure_texture() return an unowned value
...
It's private, has only one caller and that one doesn't need the extra
ref.
2020-12-21 10:26:02 +01:00
Timm Bäder
a8213d7f45
gl renderer: Avoid setting modelview to identical values
...
The previous comment here was incorrect. We can save the op itself, we
just can't save us the entry in the modelview stack.
2020-12-21 10:26:02 +01:00
Timm Bäder
e6f6d1e478
main: Add & use gdk_event_dup_axes()
...
The way this code is written trips up scan-build. Add
gdk_event_dup_axes() and use it in gtkmain.c.
2020-12-21 10:26:02 +01:00
Rafael Fontenelle
933d241bba
Update Brazilian Portuguese translation
2020-12-21 07:02:13 +00:00
Matthias Clasen
7249c3a09b
Merge branch 'ebassi/issue-3495' into 'master'
...
Use full path when calling gtk4-update-icon-cache
Closes #3495
See merge request GNOME/gtk!2979
2020-12-20 22:40:48 +00:00
Emmanuele Bassi
d13f8ac3a9
Call the newly installed gtk4-update-icon-cache
...
Otherwise we rely on whatever it's inside the PATH.
2020-12-20 16:33:41 +00:00
Emmanuele Bassi
fa35e3b874
Pass the bindir to the post-install script
2020-12-20 16:33:25 +00:00
Rafael Fontenelle
853883c6e5
Update Brazilian Portuguese translation
2020-12-20 14:06:52 +00:00
sicklylife
b467279c7d
Update Japanese translation
2020-12-20 08:03:00 +00:00
sicklylife
c6a5ac1d16
Update Japanese translation
2020-12-20 07:58:09 +00:00
A S Alam
e41288de4f
Update Punjabi translation
2020-12-20 06:14:42 +00:00
Jordi Mas i Hernandez
b886988a54
Update Catalan translation
2020-12-19 18:29:08 +00:00
Matthias Clasen
bb8a459fe2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2978
2020-12-19 17:20:39 +00:00
Matthias Clasen
d5143a1bf0
Revert "gl renderer: Render too big textures to the clipped area"
...
This reverts commit 7f6608cbed
.
2020-12-19 11:43:56 -05:00
Matthias Clasen
12611fa142
Revert "gl renderer: Take a out graphene_rect in blur_node()"
...
This reverts commit 7eece7e769
.
2020-12-19 11:43:43 -05:00
Matthias Clasen
3e319b409b
Merge branch 'ebassi/issue-3492' into 'master'
...
3to4: Remove GtkCheckButton:draw-indicator
Closes #3492
See merge request GNOME/gtk!2976
2020-12-19 16:41:14 +00:00
Emmanuele Bassi
f2b16836c2
3to4: Add test for GtkCheckButton:draw-indicator removal
2020-12-19 15:52:22 +00:00
Emmanuele Bassi
14bf45a0d5
3to4: Remove GtkCheckButton:draw-indicator
...
The property was removed from the widget, so we need to remove it from
UI files too.
Fixes : #3492
2020-12-18 23:14:24 +00:00
Timm Bäder
0c6a6b3370
Merge branch 'doc_backticks' into 'master'
...
docs: backtick fixes
See merge request GNOME/gtk!2975
2020-12-18 15:57:30 +00:00
wisp3rwind
9521f609d8
docs: backtick fixes
...
- in the gettext() examples, at least the _() triggers italics
- add missing closing backtick
2020-12-18 16:31:41 +01:00
Matthias Clasen
7533369695
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2973
2020-12-18 05:06:35 +00:00
Matthias Clasen
f31765d5dd
Merge branch 'ebassi/mnemonic-label-remove' into 'master'
...
a11y: Fix removing mnemonic widgets
See merge request GNOME/gtk!2970
2020-12-18 00:00:48 +00:00
Matthias Clasen
d33062795c
Merge branch 'ebassi/docs-for-master' into 'master'
...
Ebassi/docs for master
See merge request GNOME/gtk!2971
2020-12-17 23:59:41 +00:00
Emmanuele Bassi
2da8d9b0ac
Do not build gdk-pixbuf's man page
...
When using it as a sub-project. We don't really need them.
2020-12-17 20:50:16 +00:00
Matthias Clasen
3f56e8191f
Merge branch 'shortcuts' into 'master'
...
docs: Add separation between kinds of shortcuts in Keyboard input
See merge request GNOME/gtk!2964
2020-12-17 19:43:38 +00:00
Chris Mayo
bf4c3dc2c5
docs: Fix list of kinds of shortcuts in Keyboard input
...
Formatting in HTML was mangled.
2020-12-17 19:18:10 +00:00
Emmanuele Bassi
a5365ec8cb
docs: Add missing GTK types
...
If we don't specify the get_type() function, gtk-doc will not collect
properties and signals, and will use a different URL for the page.
2020-12-17 18:30:19 +00:00
Emmanuele Bassi
ec94ec0286
Merge branch 'ebassi/password-entry-notify' into 'master'
...
Notify properties on deletion in PasswordEntryBuffer
Closes #3484
See merge request GNOME/gtk!2969
2020-12-17 15:51:04 +00:00
Emmanuele Bassi
af0973c847
a11y: Fix removing mnemonic widgets
...
We must not use the variadic arguments version with GList, as it expects
a pointer to a GtkAccessible.
2020-12-17 15:49:00 +00:00
Emmanuele Bassi
e71f6b0bc0
docs: Note the caveat on GtkEditable signals with delegates
...
We cannot bubble up ::insert-text and ::delete-text signals from the
delegate to the wrapper editable without causing an infinite recursion,
due to how the signals are designed; ideally, we would have decoupled
signal emission from virtual functions *before* releasing GTK4, but now
that we have, we can't break the contract.
2020-12-17 15:13:43 +00:00
Emmanuele Bassi
1738724e4a
Notify properties on deletion in PasswordEntryBuffer
...
The GtkEntryBufferClass.deleted_text() behaviour changed between GTK3
and GTK4, which means any subclass of GtkEntryBuffer is now responsible
for emitting the "notify" signal for the "text" and "length" properties.
Without this, the GtkText delegate widget used by GtkPasswordEntry would
not be able to communicate changes in the contents of its buffer.
Fixes : #3484
2020-12-17 15:01:35 +00:00
Emmanuele Bassi
e9e09be37e
Merge branch 'issue-3483' into 'master'
...
Fix URLs for the download.gnome.org locations
Closes #3483
See merge request GNOME/gtk!2968
2020-12-17 13:47:01 +00:00
Matthias Clasen
8a923e02a1
Merge branch 'wip/jimmac/flat-button-tweaks' into 'master'
...
Adwaita: flat button adjustments
See merge request GNOME/gtk!2967
2020-12-17 12:52:22 +00:00
Emmanuele Bassi
4f12e2f711
Fix URLs for the download.gnome.org locations
...
Use a trailing slash, otherwise we end up on an out of date mirror.
Fixes : #3483
2020-12-17 12:46:12 +00:00
Jakub Steiner
addcf57b4d
Adwaita: flat button adjustments
...
- normally lighter (on bg_color)
- darker for headerbar
- undecorated checked buttons were never style properly (even gtk3)
see page2 volume buttons
Finetunes https://gitlab.gnome.org/GNOME/gtk/-/issues/3427
2020-12-17 12:20:29 +01:00
Matthias Clasen
db08bccb11
Merge branch 'cursor-aspect-ratio' into 'master'
...
Cursor aspect ratio fixes for gtk 4
Closes #3441
See merge request GNOME/gtk!2966
2020-12-16 23:40:26 +00:00
Sebastian Keller
02f0681344
settings: Change gtk-cursor-aspect-ratio from float to double
...
Float properties can not be read from keyfiles. This was causing changes
to this property in settings.ini to be ignored. Fix this by changing it
to a double.
Technically this change could be considered an API break, but there are
no users of this property as float yet and it is early enough to expect
there to never be any.
Also document this change in the 3 to 4 migration guide since in gtk 3
this setting will be kept a float.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3441
2020-12-16 22:35:36 +01:00
Emmanuele Bassi
62dbadd536
Merge branch 'fix-macos-compilation' into 'master'
...
macos: fix typo that breaks compilation
See merge request GNOME/gtk!2962
2020-12-16 20:18:27 +00:00
Matthias Clasen
0588db8a69
Merge branch 'wip/carlosg/for-master' into 'master'
...
gdk/x11: Transform XI_Motion based scroll into discrete
Closes #3459
See merge request GNOME/gtk!2959
2020-12-16 19:56:16 +00:00
Emmanuele Bassi
58b1a13453
Merge branch 'ricotz/for-master' into 'master'
...
gdk: Use correct parameter name to fix g-ir-scanner warning
See merge request GNOME/gtk!2963
2020-12-16 19:46:51 +00:00
Rico Tzschichholz
df70dbbae4
gdk: Use correct parameter name to fix g-ir-scanner warning
...
../gdk/gdktoplevellayout.c:217: Warning: Gdk: gdk_toplevel_layout_get_maximized:
unknown parameter 'maximized' in documentation comment, should be 'maximize'
2020-12-16 20:19:05 +01:00
Tom Schoonjans
81c55b06d2
macos: fix typo that breaks compilation
2020-12-16 19:16:19 +00:00
Matthias Clasen
591c2f0595
4.0
2020-12-16 12:12:58 -05:00
Matthias Clasen
9c5a42be0d
Update expected test results
...
We have one test that expected 3.99 to show up in an error message.
2020-12-16 12:12:58 -05:00
Matthias Clasen
45b7fa15e5
Merge branch 'ebassi/docs-for-master' into 'master'
...
Ebassi/docs for master
See merge request GNOME/gtk!2960
2020-12-16 16:41:44 +00:00
Emmanuele Bassi
e3de92f1ea
docs: Fix annotation for GtkSearchEntry::activate
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
2ffa2be64e
doc: Document missing GtkNotebook types
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
387078b40c
docs: Document GtkNativeDialogClass
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
5203bf0b83
docs: Document GtkTreeViewColumn::clicked
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
fb93baeae4
docs: Add missing description for GtkWidget::move-focus
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
9fa4c2f5b8
docs: Ignore gtkspinbuttonprivate.h
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
cc9528eaec
docs: Add missing documentation to GtkStatusbar
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
73dda96711
docs: Add missing stanzas for gtk_test_accessible API
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
d711acc954
docs: Ignore gtksorterprivate.h
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
ab59c47880
docs: Add missing documentation to GtkPopover
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
e4b7847904
docs: Fix documentation of GtkGestureStylus
...
Document all the signals, and fix the syntax for boolean values.
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
308115ebae
docs: Add gtk-doc stanza for GtkExpander::activate
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
1cb72536ea
docs: Fix syntax of GtkEntry::activate signal
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
f24429e84a
docs: Remove private symbols
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
fc4402b456
docs: Ignore gtkpasswordentryprivate.h
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
077aec5d32
docs: Add missing documentation for GtkTextCharPredicate
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
548949214c
docs: Add missing documentation GtkNative
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
2aec47f56f
docs: Add missing documentation for GtkCellRenderer
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
344eb21bee
docs: Complete symbol coverage for GSK
...
100% symbol docs coverage.
241 symbols documented.
0 symbols incomplete.
0 not documented.
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
4fb55b3270
docs: Complete symbol coverage for GDK
...
100% symbol docs coverage.
833 symbols documented.
0 symbols incomplete.
0 not documented.
What's left are just type system macros and windowing system opaque
structures.
2020-12-16 16:28:58 +00:00
Matthias Clasen
75764c284d
Merge branch 'wip/toplevel-layout-intent' into 'master'
...
Fix toplevel layout state communication
Closes #3466
See merge request GNOME/gtk!2958
2020-12-16 16:02:00 +00:00
Carlos Garnacho
c95a32def8
gdk/x11: Transform XI_Motion based scroll into discrete
...
Depending on the input driver, we will get XI_Motion based scroll
events for regular mouse wheels. These are intended to be handled
as discrete scroll, so detect smooth scroll events that move by
exactly 1.0 in either direction.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3459
2020-12-16 14:26:44 +01:00
Jonas Ådahl
142f7862ed
gdk/toplevellayout: Change API to be about intent, not full state
...
When being fullscreen, and wanting to unfullscreen but not caring about
whether to go unmaximized or maximized (as this information is lost), if
the GdkToplevelLayout represents the full intended state, we won't be
able to do the right thing.
To avoid this issue, make the GdkToplevelLayout API intend based, where
if one e.g. doesn't call gdk_toplevel_set_maximized() with anything, the
backend will not attempt to change the maximized state.
This means we can also remove the old 'initially_maximized' and
'initially_fullscreen' fields from the private GtkWindow struct, as we
only deal with intents now.
2020-12-16 14:16:08 +01:00
Jonas Ådahl
b6412adc32
gtk/window: Check widget mappdness and not surface mappedness
...
When deciding whether to call gdk_toplevel_present(), check the
mappedness of GtkWidget instead of the mapped-ness of GdkSurface, as the
latter is mapped asynchronously, while the former is direct state of the
GtkWindow itself.
This fixes an issue where calling e.g. gtk_window_maximize() shortly
after showing it didn't take effect, as hadn't been mapped yet. While
maximizing after showing is racy, and will likely glitch from time to
time, the correct thing to do is still to maximize and handle whatever
state the compositor configured the window to be in.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3466
2020-12-16 11:56:41 +01:00
Timm Bäder
7eece7e769
gl renderer: Take a out graphene_rect in blur_node()
2020-12-16 09:13:12 +01:00
Timm Bäder
7f6608cbed
gl renderer: Render too big textures to the clipped area
2020-12-16 08:26:46 +01:00
Timm Bäder
f816a8fb82
gl renderer: Unify viewport setting in add_offscreen_ops()
...
We use the same rect here a few times.
2020-12-16 08:26:46 +01:00
Timm Bäder
3c2484142d
vulkancontext: Remove usage of VK_ERROR_INCOMPATIBLE_VERSION_KHR
...
According to
https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/html/chap46.html
this has been removed. It also breaks the build on my system
2020-12-16 08:26:46 +01:00
Matthias Clasen
2192bb3dde
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2957
2020-12-15 20:33:01 +00:00
Matthias Clasen
e1df9a043f
Add a doc comment for GskConicGradientNode
2020-12-15 14:18:26 -05:00
Matthias Clasen
338d3ffa13
Add a doc comment for gdk_surface_request_layout
2020-12-15 14:14:49 -05:00
Emmanuele Bassi
6039a36183
Merge branch 'ebassi/for-master' into 'master'
...
Clean up the build system
See merge request GNOME/gtk!2955
2020-12-15 16:54:59 +00:00
Matthias Clasen
c551f693c2
Merge branch 'matthiasc/for-master' into 'master'
...
Update the node format docs
See merge request GNOME/gtk!2956
2020-12-15 16:23:15 +00:00
Emmanuele Bassi
5d2278a5ca
docs: Add public symbols to the GTK reference
2020-12-15 16:21:20 +00:00
Emmanuele Bassi
ea5e186bb8
Hide GtkTextAttributes functions
...
The type is private, so making functions operating on it public is
pointless.
2020-12-15 16:20:21 +00:00
Emmanuele Bassi
69b181f263
Remove boxed type for GtkCrossingData
...
The GtkCrossingData type is completely private, so there's no point in
having a boxed type for it.
2020-12-15 15:55:15 +00:00
Emmanuele Bassi
3132b10bc0
docs: Add more private headers
2020-12-15 15:55:06 +00:00
Matthias Clasen
7335e166b7
Update the node format docs
...
Update this document to mention all the render nodes we
have, and the default values for their properties.
2020-12-15 10:30:18 -05:00
Emmanuele Bassi
91bba794a6
docs: Add missing symbols to the GTK reference
2020-12-15 14:30:32 +00:00
Emmanuele Bassi
a6bd0c7eed
Remove stray mentions of GdkConfigureEvent
...
The event was removed, but some traces of it linger.
2020-12-15 13:58:52 +00:00
Emmanuele Bassi
ff351721b2
docs: Add missing symbols to the GDK reference
2020-12-15 13:47:40 +00:00
Emmanuele Bassi
538aa6c200
Move private GdkX11 symbols out of a public header
...
This avoids private symbols showing up in the introspection data, as
well as in the undocumented symbols list when generating the GDK API
reference.
2020-12-15 13:46:50 +00:00
Emmanuele Bassi
f546e03d31
docs: Add missing symbols to the GSK reference
2020-12-15 13:35:19 +00:00
Emmanuele Bassi
bdbea0d037
docs: Add more ignored header for GSK
2020-12-15 13:31:02 +00:00
Emmanuele Bassi
474b4ac1af
build: Use Meson support for dylib versions
...
Do not hand-code it inside GTK's meson.build.
2020-12-15 12:47:05 +00:00
Emmanuele Bassi
99e0929d6c
build: Use a consistent style for Meson files
2020-12-15 12:46:59 +00:00
Emmanuele Bassi
e75e44bdcc
build: Remove duplicate definition
...
The `GTK_COMPILATION` symbol is defined in gir_args.
2020-12-15 11:47:32 +00:00
Emmanuele Bassi
7975bbfcaa
build: Remove linker flags from static libraries
...
We only need hardening linker flags on the libgtk shared library;
internal static libraries don't really need them.
2020-12-15 11:36:20 +00:00
Emmanuele Bassi
11bca98a29
build: Remove unused variable
...
We don't need a `gsk_source` variable after all.
2020-12-15 11:35:27 +00:00
Emmanuele Bassi
618186723a
build: Remove unused backend_immodules variable
...
We don't have input method modules any more.
2020-12-15 11:20:19 +00:00
Emmanuele Bassi
a5986f0dcd
build: Use get_supported_link_arguments()
...
Instead of hand-coding it ourselves, let Meson deal with linker
arguments discovery.
2020-12-15 11:19:39 +00:00
Daniel Mustieles
c162d7148f
Updated Spanish translation
2020-12-15 10:28:49 +01:00
Matthias Clasen
7e1a210ae0
Merge branch 'ebassi/for-master' into 'master'
...
docs: Add note for the removal of GtkFileChooserButton
See merge request GNOME/gtk!2954
2020-12-14 20:37:34 +00:00
Jordi Mas
bf5e3efd54
Update Catalan translation
2020-12-14 18:39:00 +01:00
Emmanuele Bassi
08d52bee14
docs: Add note for the removal of GtkFileChooserButton
...
Point developers in the direction of GtkButton and GtkFileChooserNative.
2020-12-14 16:55:15 +00:00
Emmanuele Bassi
a6e9a9b644
Merge branch 'pixbuf-from-surface-leak' into 'master'
...
gdkpixbuf-drawable: Free the pixbuf on Cairo error
See merge request GNOME/gtk!2951
2020-12-14 15:12:56 +00:00
Adrien Plazas
dc96542742
gdkpixbuf-drawable: Free the pixbuf on Cairo error
...
This avoids leaking the pixbuf.
2020-12-14 15:07:41 +01:00
Matthias Clasen
e2afb59a0b
Merge branch 'matthiasc/for-master' into 'master'
...
Avoid adding // to resource paths
Closes #3469
See merge request GNOME/gtk!2947
2020-12-14 13:14:32 +00:00
Jakub Steiner
daa5d5aead
Merge branch 'dropdown-searchbar' into 'master'
...
dropdown: Improve search bar styling
See merge request GNOME/gtk!2948
2020-12-14 09:39:38 +00:00
Jakub Steiner
fd0a03cf78
Merge branch 'emoji-searchbar' into 'master'
...
Adwaita: Improve emoji picker styling
See merge request GNOME/gtk!2949
2020-12-14 09:38:45 +00:00
nana-4
34d99ea1d0
Adwaita: Improve emoji picker styling
...
- Add borders around the main scrollable content, like most other
places.
- Set padding and spacing on .emoji-searchbar and .emoji-toolbar in a
more proper way.
- Remove unused button.emoji-section label styles.
2020-12-14 05:26:39 +09:00
nana-4
90355c0b27
emojichooser: Add .emoji-searchbar style class
...
Similar to .emoji-toolbar, it would be nice to have this for styling.
2020-12-14 05:26:13 +09:00
nana-4
538cf9e294
dropdown: Improve search bar styling
...
As per the mockup. See:
https://gitlab.gnome.org/Teams/Design/os-mockups/-/blob/master/dropdown-lists/dropdown-lists.png
2020-12-14 05:08:59 +09:00
Piotr Drąg
8e3f2b879e
Update Polish translation
2020-12-13 16:51:51 +01:00
Florentina Mușat
8fa6a25aa5
Update Romanian translation
2020-12-12 18:49:22 +00:00
Matthias Clasen
96a300b2de
Merge branch 'wip/jimmac/button-shed' into 'master'
...
headerbar window controls & clean up flat button extend
Closes #3427
See merge request GNOME/gtk!2942
2020-12-12 02:51:05 +00:00
Matthias Clasen
aeca9cb7ba
Avoid adding // to resource paths
...
The GResource machinery is not forgiving about this
sort of thing.
Fixes : #3469
2020-12-11 21:47:54 -05:00
Matthias Clasen
c2727e6e04
Merge branch 'wip/carlosg/for-master' into 'master'
...
Wip/carlosg/for master
Closes #3461 , #593 , #3083 , #3009 , #3463 , and #3426
See merge request GNOME/gtk!2945
2020-12-12 02:35:01 +00:00
Carlos Garnacho
8be0918d7e
gdk/surface: Trigger motion check for next frame after thaw
...
This is a more reliable calling point than ::resume-events, and a
good one to schedule things so they happen on a frame clock in no
special phase (Thus still fixing the original issue at 80d4a08e30
)
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3461
2020-12-12 02:14:02 +01:00
Carlos Garnacho
612d3bca7d
gtk/window: Bring back L-shaped resize corners
...
These ended up square in the various refactors. Make them again L-shaped
by extending these along the edge being checked. This means we have to
check for corner positions in all edges, though.
2020-12-12 01:42:42 +01:00
Carlos Garnacho
e9fe270e94
gtk/scrolledwindow: Handle full scroll sequences only
...
In order to do this, leverage smooth scroll handling into the capture
phase scroll controller, controlled by ::scroll-begin in the propagation
phase controller.
There's 2 cases here:
- A child widget handles scroll. The scrolled window does not get
::scroll-begin, the child widget handles the full scroll sequence.
- No child handles scroll, the scrolled window gets ::scroll-begin,
and transfers control of scrolling to the capture phase controller.
As scrolling is performed, the pointer may fall into scrollable children,
but the scrolled window will be capturing the scroll events, so these
won't be seen by the child widgets.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/593
2020-12-12 01:42:42 +01:00
Carlos Garnacho
8402665c55
gtk/eventscrollerscroll: Handle smooth events in discrete controllers
...
We let smooth scroll events that don't trigger a ::scroll signal through.
This is unintended, these are handled, even if just accumulated.
This fixes cases like GtkSpinButton inside GtkScrolledWindow, where both
would handle events, until the GtkSpinButton eventually shifts away from
underneath the pointer.
Brought up at https://gitlab.gnome.org/GNOME/gtk/-/issues/593
2020-12-12 01:42:42 +01:00
Carlos Garnacho
79090f1755
gtk/entrycompletion: Ensure to show first row when shown, not allocated
...
This code was here in gtk3 to cater for the completion window being
positioned. That was only to meant once as long as the completion window
was shown.
This doesn't work as well for gtk4, ::size-allocate gets propagated from
the toplevel, so happens much more often for the completion window, this
ends up with the completion position being reset to the first row
frequently.
Do this simply once when popping up the completion, instead.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3083
2020-12-12 01:42:42 +01:00
Carlos Garnacho
3d84a38867
gtk/treeview: Position editable widgets correctly wrt left border
...
The coordinates are already widget-local here, not transformed by the
adjustment positions. Using the adjustment value here ends up pushing
the entry far from the left border.
The correct minimum value here is 0, which matches the treeview left
border.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3009
2020-12-12 01:42:42 +01:00
Carlos Garnacho
5155fac94f
gtk/modelbutton: Handle unpaired releases
...
Let model buttons handle unpaired releases, these may happen indirectly
e.g. due to other child menus being opened at the time. Clicking would
dismiss the menu, but the menu item beneath the pointer would not get
activated.
We can handle that button release though via ::unpaired-release, so
there's no second click required.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3463
2020-12-12 01:42:42 +01:00
Carlos Garnacho
7a4d15dc67
gtk/range: Move button release handling to GtkGestureDrag
...
Tracking it through the GtkGestureClick becomes a bit cumbersome for
handling of simultaneously pressed buttons. We can track ::stopped,
but that also emits for a number of situations where we want drag to
continue.
However, the GtkGestureDrag is grouped with the click gesture, and
knows better when to finish the drag gesture (not just because of a
button release), so hook drag and zoom mode finalization there.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3426
2020-12-12 01:42:42 +01:00
Emmanuele Bassi
e4d8d50a8b
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2944
2020-12-12 00:01:38 +00:00
Emmanuele Bassi
3c9a13e6cf
Update CODEOWNERS
...
Add me as the reference for the accessibility bits of the code base.
2020-12-11 23:42:25 +00:00
Emmanuele Bassi
2c97d44281
docs: Fix the Widget as Buildable example
...
The layout properties use an old name.
2020-12-11 23:41:51 +00:00
Kjartan Maraas
2d3a398678
Update Norwegian Bokmål translation
2020-12-11 11:40:55 +00:00
Florentina Mușat
d380ed2b3a
Update Romanian translation
2020-12-10 15:34:51 +00:00
Matthias Clasen
644a45714a
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Update references to GtkWindow:fullscreened
See merge request GNOME/gtk!2943
2020-12-10 14:31:54 +00:00
Matthias Clasen
324683993e
docs: Update references to GtkWindow:fullscreened
...
The property got renamed from fullscreen to fullscreened.
Update all references.
2020-12-10 09:10:21 -05:00
Jakub Steiner
f6f6241627
Adwaita: special case flat headerbar buttons
...
- make sure the hovers and pushed states are legible on a tintend headerbar
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3427
2020-12-10 14:24:29 +01:00
Jakub Steiner
6a33bed353
Adwaita: flat button :hover and :active
...
- special case undecorated button hovers
2020-12-10 14:16:25 +01:00
Jakub Steiner
f83ee0be23
Adwaita: headerbar_color > headerbar_bg_color
...
- semantic correction
2020-12-10 13:58:42 +01:00
Jakub Steiner
7442bdc383
Adwaita: duplicate selector
...
- awkward duplicate selector that should have no effect
(resulting in the same css)
2020-12-10 13:51:10 +01:00
Luna Jernberg
82950528ed
Update Swedish translation
2020-12-09 21:05:25 +00:00
Matthias Clasen
97eaef8308
Merge branch 'ebassi/popcount' into 'master'
...
Share the popcount() fallback for MSVC
See merge request GNOME/gtk!2940
2020-12-09 16:32:09 +00:00
Matthias Clasen
92189cf96a
Merge branch 'matthiasc/for-master' into 'master'
...
Remove NoDisplay from demo desktop files
Closes #2932
See merge request GNOME/gtk!2939
2020-12-09 16:10:04 +00:00
Emmanuele Bassi
b8a651df47
Share the popcount() fallback for MSVC
...
We use __builtin_popcount() in a couple of places, so it makes sense to
have it in one header.
2020-12-09 16:06:52 +00:00
Matthias Clasen
c0ed89be9a
widget-factory: Autoplay the video
...
The empty video on the frontpage is a bit of a letdown, since
the big arrow can't be clicked.
2020-12-09 10:52:55 -05:00
Matthias Clasen
ade4bcb125
Remove NoDisplay from demo desktop files
...
When these are installed (in particular, as flatpaks),
we should not hide them.
Fixes : #2932
2020-12-09 10:09:06 -05:00
Matthias Clasen
c5dd34344f
Merge branch 'wip/carlosg/for-master' into 'master'
...
Wip/carlosg/for master
Closes #3426 and #3264
See merge request GNOME/gtk!2933
2020-12-09 15:04:01 +00:00
Matthias Clasen
c90cc976a5
Merge branch 'wip/jimmac/row-transitions-and-spacing' into 'master'
...
Adwaita: row transitions and spacing
Closes #3434
See merge request GNOME/gtk!2937
2020-12-09 13:35:54 +00:00
Matthias Clasen
bd9bcd5905
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #3431
See merge request GNOME/gtk!2938
2020-12-09 13:34:21 +00:00
Matthias Clasen
0ddcbb52e6
Merge branch 'ebassi/4-0-abi-bump' into 'master'
...
Ebassi/4 0 abi bump
Closes #3392
See merge request GNOME/gtk!2883
2020-12-09 13:20:20 +00:00
Emmanuele Bassi
2457f3d54c
build: Bump up the SONAME for GTK4
...
We released all the 3.9x development snapshots using:
libgtk-4.0.so.0.xxxx.y
which means that the 4.0.0 release of GTK will have a lower SONAME than
the snapshots. To avoid that, bump the SONAME to 1.xxxx.y.
Fixes : #3392
2020-12-09 12:19:50 +00:00
Emmanuele Bassi
1cc207af32
build: Tie interface age to the development cycle
...
We don't want to increase the interface age manually, because we're
going to end up forgetting about it.
Instead, we should tie it to the rest of the version:
- in stable (even minor) cycles, we don't add new API; the interface
age is the same as the micro version
- in unstable (odd minor) cycles, every new release might have new API,
or updates to newly added API; keep the interface age to 0
This removes one more manual thing to change during release, and keeps
us honest with our promise not to add symbols during stable cycles.
2020-12-09 12:19:50 +00:00
Emmanuele Bassi
f4a0d57c07
Prepare version macros for 4.0
...
Remove the 3.9x version macros, and ensure that we handle 4.0 as the
backstop for the minimum required version.
2020-12-09 12:19:50 +00:00
Jakub Steiner
a76ee61e97
Adwaita: row transitions and spacing
...
- no fading out of row hovers. Many feel like it's a slow
refresh rather than intentional effect.
- give some margin to navigation lists
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3434
2020-12-09 12:16:15 +01:00
Yuri Chornoivan
fac367495b
Update Ukrainian translation
2020-12-09 07:08:51 +00:00
Matthias Clasen
76177b6065
Merge branch 'ebassi/prop-names' into 'master'
...
Ebassi/prop names
See merge request GNOME/gtk!2936
2020-12-09 05:51:00 +00:00
Matthias Clasen
433f305fa9
Merge branch 'sophie-h-master-patch-62064' into 'master'
...
gtk-demo: Remove potentially ableist metaphor
See merge request GNOME/gtk!2934
2020-12-09 00:53:10 +00:00
Matthias Clasen
fce824e78f
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3451
See merge request GNOME/gtk!2935
2020-12-09 00:52:53 +00:00
Emmanuele Bassi
c4b768a4ec
Rename GtkWindow:fullscreen to :fullscreened
...
Having a property with the same name of a method makes some languages
which put properties and method names in the same flat namespace not
really happy about our choices. To avoid collisions, let's put the the
"fullscreen" property into the past, alongside the "maximized" property.
2020-12-09 00:11:49 +00:00
Emmanuele Bassi
6d1be832d9
Fix the documentation for GtkWindow state properties
...
Drop the "don't write code that crashes" folksy bit; don't start
sentences with conjunctions; remove copy-pasted references to
"iconified" states; point to the corresponding property notification in
a consistent manner.
2020-12-08 23:49:45 +00:00
Matthias Clasen
a828d4318e
Mark flaky tests as flaky
...
We can't mark these as xfail, since it sometimes succeed.
2020-12-08 18:10:02 -05:00
Sophie Herold
a36ccd7f42
gtk-demo: Remove potentially ableist metaphor
2020-12-08 23:02:03 +00:00
Matthias Clasen
b4a7fe8d8f
Add bug reporting address to pot files
...
Fixes : #3451
2020-12-08 17:51:38 -05:00
Carlos Garnacho
43e4848872
gtk/main: Keep implicit grab until all buttons are released
...
Currently, the implicit grab is broken on the first button release,
in the case of pressing multiple buttons simultaneously. This means
that we emit crossing events early, and the next button releases
are sent to the pointer focus widget instead.
Consider the implicit grab effective until all buttons are released,
and only unset the pointer implicit grab (and emit crossing events)
after there are no further buttons pressed. We do this by checking
event modifiers, given button release events do contain the modifiers
in effect at the time the event was generated, we have to look for
exactly one active button modifier.
Fixes weird pointer states after pressing multiple buttons on a
widget.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3426
2020-12-08 23:27:03 +01:00
Carlos Garnacho
80d4a08e30
gdk/surface: Delay gdk_surface_request_motion() requests internally
...
Those requests are received while dealing with the ::layout frame
clock phase, this has the unintended side effect of making the
frame clock "rewind" to handle ::flush-events again during this
frame, which delays everything and practically halves the frame
rate.
We do intend to make the motion events dispatches on the next frame,
so do this in an idle at a slightly lower priority than layout/draw,
so the ::flush-events phase is actually requested for the next frame.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3264
2020-12-08 23:27:03 +01:00
Carlos Garnacho
47d0b5ad0c
gkt/textview: Set an iter position for event-less menu activation
...
This went missing. Use the current insertion position as a reference.
Fixes invoking the menu via keyboard.
2020-12-08 23:27:03 +01:00
Matthias Clasen
c59b433395
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix macOS build breakage
See merge request GNOME/gtk!2931
2020-12-08 20:32:51 +00:00
Yuri Chornoivan
18d06a1cd5
Update Ukrainian translation
2020-12-08 20:25:26 +00:00
Florentina Mușat
f13041360a
Update Romanian translation
2020-12-08 19:52:12 +00:00
Christian Hergert
0236fe80c1
macos: fix macOS build breakage
...
Fixes breakages due to recent refactoring around sizing changes.
2020-12-08 11:29:31 -08:00
Matthias Clasen
2caf283323
Mark the window-show-contents-on-map.ui reftest as xfail
...
We know now what the test is trying to test, just lack
the right plumbing to do it properly. So, keep the test
around, marked as expected fail.
2020-12-08 12:04:47 -05:00
Matthias Clasen
6fb66e299a
Revert "reftests: Remove window-show-contents-on-map.ui test"
...
This reverts commit 074b933ae4
.
2020-12-08 11:45:52 -05:00
Matthias Clasen
398a74d871
3.99.5
2020-12-08 10:58:40 -05:00
Matthias Clasen
08ca8a361e
docs: Remove a mention of gtk_window_get_size
...
That function has been removed.
2020-12-08 10:44:33 -05:00
Matthias Clasen
1f141c1953
Merge branch 'wip/surface-state-rework' into 'master'
...
Rework surface state and geometry computation
See merge request GNOME/gtk!2885
2020-12-08 15:38:36 +00:00
Jakub Steiner
1e14a91cb9
Merge branch 'wip/jimmac/no-inner-shadow-sidebars' into 'master'
...
Adwaita: no 3d shadow for pressed sidebar
Closes #3413
See merge request GNOME/gtk!2928
2020-12-08 14:18:44 +00:00
Jonas Ådahl
074b933ae4
reftests: Remove window-show-contents-on-map.ui test
...
It tested that a widget shown after the window was mapped deals with
window resizing appropriately when doing the follow-up allocation. Now,
doing this only allocates both at the same time, as allocation happens
during the frame dispatch.
To do the equivalent now, one would have to write code that shows the
label after the first frame was drawn, and that's not possible via a
reftest, so lets remove it.
2020-12-08 14:22:59 +01:00
Jonas Ådahl
7b7f3342d8
reftests/textview-tags: Hide text view cursor
...
Otherwise it'd sometimes show up, causing test flakyness.
2020-12-08 12:03:18 +01:00
Matthias Clasen
adc4bcbd24
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: various GL context cleanups
See merge request GNOME/gtk!2929
2020-12-08 00:06:19 +00:00
Jonas Ådahl
130ff5f841
testsuite/notify: Don't fiddle with GtkWidget::visible
...
It may map toplevel windows with arbitrary modes, which will effect
other properties, such as GtkWindow::maximized and
GtkWindow::fullscreen.
2020-12-07 22:41:36 +01:00
Jonas Ådahl
fea1b151e6
testsuite/filtermodel: Remove calls to gtk_widget_realize()
...
They don't do what they used to do.
2020-12-07 22:29:51 +01:00
Christian Hergert
6e0fffa0f8
macos: use CGLSetParameter and CGLEnable
...
We don't need to go through the NSOpenGLContext for these.
We can just use the C API directly. It's also clearer what is using
CGLEnable() vs CGLSetParameter().
2020-12-07 11:47:51 -08:00
Jonas Ådahl
d2c95a1b13
gdk: Replace 'WITHDRAWN' state with async 'is-mapped' boolean
...
It was used by all surfaces to track 'is-mapped', but still part of the
GdkToplevelState, and is now replaced with a separate boolean in the
GdkSurface structure.
It also caused issues when a widget was unmapped, and due to that
unmapped a popover which hid its corresponding surface. When this
surface was hidden, it emitted a state change event, which would then go
back into GTK and queue a resize on popover widget, which would travel
back down to the widget that was originally unmapped, causing confusino
when doing future allocations.
To summarize, one should not hide widgets during allocation, and to
avoid this, make this new is-mapped boolean asynchronous when hiding a
surface, meaning the notification event for the changed mapped state
will be emitted in an idle callback. This avoids the above described
reentry issue.
2020-12-07 20:37:30 +01:00
Jonas Ådahl
8f8c5040db
gtk/headerbar: Remove unused 'state' field
2020-12-07 20:37:30 +01:00
Matthias Clasen
3b69facf0b
Mention window sizes in the migration guide
2020-12-07 20:37:30 +01:00
Matthias Clasen
a6bc4c95b1
docs: Add gtk_window_is_fullscreen
2020-12-07 20:37:30 +01:00
Matthias Clasen
59fd171515
popup: Documentation tweaks
...
Use proper syntax for referring to signals.
2020-12-07 20:37:30 +01:00
Matthias Clasen
3db0d06901
Properly remove gtk_window_get_size
...
It was still in the headers and the docs, but did
not have an implementation anymore.
2020-12-07 20:37:30 +01:00
Jonas Ådahl
d7d738d745
tests/animated-resizing: Use gtk_window_default_size() instead
...
This will actually make it resize on-demand, as the default size is the
size used when computing the window size when the size is not fixed.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
ac17217c69
wayland/toplevel: Don't alwyas skip changing xdg_toplevel state
...
We only called xdg_toplevel.(un)set_maximize() if the toplevel layout
changed, but this misses the case when the compositor had changed the
maximized state. Change it to call the xdg_toplevel request if either
the local layout changed, or if the layout differs from the current
state.
This fixes an issue where one couldn't unmaximize a window by double
clicking the titlebar that, had previously been maximized e.g. using a
keyboard binding.
Do the same for fullscreen.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
2e5eeb6b92
gtk/window: Add 'fullscreen' prop and gtk_window_is_fullscreen()
...
This makes it possible to set 'fullscreen' to 'true' in a .ui file to
start an application in fullscreen mode.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
eb0eac0f03
gtk/window: Make R/O is-maximized R/W maximized prop
...
This makes it possible to set 'maximized' to true in .ui files, and the
window will show up maximized.
gtk_window_is_maximized() will return the intended maximized state until
actually mapped, it will then show the actual maximized state. The same
applies to reading the property.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
27077d5be8
gtk/window: Make 'default-size' adapt to configured size
...
This commit changes the behavior of window size computation and the
default size properties to:
* The default-width and default-height properties are updated to the
current window size unless the size is fixed by e.g. being maxmized,
tiled etc.
* The compute-size semantics are to just pick the default size, or if
not adequate, use the measured size, and consequently update the
default size, unless unresizable.
* gtk_window_get_size() is removed, what's more likely relevant is the
gtk_window_get_default_size() which will now contain more sensible
values.
Various places that used gtk_window_get_size() were updated to use
gtk_window_get_default_size() to remember and restore previous sizes.
This also changes the default value of 'default-width' and
'default-height' from -1 to 0. The gtk builder simplify tool is taught
how to omit when the default size is set to both -1 and 0.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
fd01723470
x11/surface: Avoid resizing if computed size didn't change
...
This fixes an issue where we'd resize to the previous window size during
interactive resize.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
994aa41ccc
x11/surface: Move the scattered compute-size calls to helper
...
This simplifies things, and fixes issue where we'd resize the wrong
time, and miss resizing other times.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
c791185c20
x11/surface: Remember the toplevel layout
2020-12-07 20:37:29 +01:00
Jonas Ådahl
e7ddaf5ed1
x11/surface: Compute size after update too
...
This will sometimes mean a frame is skipped if a resize was requested
during the update phase of the frame dispatch. Not doing so can cause
trying to allocate a window smaller than the minimum size of the widget.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
2217cf8ea2
x11/surface: Remember when there is a pending ConfigureNotify
...
This will be used to decide whether to try to resize windows when .
2020-12-07 20:37:29 +01:00
Jonas Ådahl
3bbeb891c4
gdk/surface: Allow inhibit layout from backend
...
If compute_size() returns TRUE, the layout will not be propagated to
GTK. This will be used by the X11 backend to queue asynchronous resizes
that shouldn't yet allocate in GTK.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
ff23a2a582
x11: Use resize counting for freezing updates too
...
It's already keep strack of when we're waiting for configure events, so
lets reuse it. This fixes an issue where reshown dialogs wouldn't
reappear.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
8396bdb759
wayland/surface: Reset last sent min/max size when hiding
...
As with the window geometry, the last sent min/max values must be reset
so they are sent again next time the surface is shown.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
351d88f7ae
wayland/surface: Clear shadow width when hiding
...
Not doing this means the next time the same surface is shown, if the
shadow size wasn't changed, it wouldn't be sent to the compositor, which
then would result in compositor deriving its own window geometry which
would include the shadow margin.
This fixes an issue where the file chooser dialog would grow each time
it opened.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
dfb7ab3352
x11/surface: Compute toplevel size outside of frame dispatch
...
We can't compute and resize a toplevel size during dispatch, as resizing
on X11 is an asynhronous operation, requiring a configuration event.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
8e3ee58e3f
tests/animated-resizing: Don't try to resize during frame dispatch
...
This will not work on X11 because it's too late to resize, due to
resizing being asynchronous i.e. it won't be complete before we need to
draw.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
40a9baa2db
gtk/native: Remove gtk_native_check_resize()
...
This is now handle by the corresponding implemenatations using per
non-gobject-type API.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
4b2aae9950
gtk/dragicon: Use private gtk_drag_icon_present() instead of GtkNative
...
It didn't even use GtkNative, just the vfunc it set to the interface
sturct.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
9d3f497a21
gtk/tooltipwindow: Use gtk_tooltip_window_present() instead of GtkNative
2020-12-07 20:37:29 +01:00
Jonas Ådahl
517bc0db84
gtk/texthandle: Use gtk_text_handle_present() instead of GtkNative
2020-12-07 20:37:29 +01:00
Jonas Ådahl
369b03a3d8
gtk/window: Don't go via GtkNative when presenting
...
It'll only call directly back into GtkWindow's toplevel present handling
code.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
2cddec7798
gtk/popover: Use gtk_popover_present() instead of going via GtkNative
...
This makes it more explicit that managers of popovers make it "present".
2020-12-07 20:37:29 +01:00
Jonas Ådahl
f7fceab40b
gtk/entry: Remove emoji chooser field
...
It wasn't ever set.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
3b66f63523
gtk/popover: Request fake motion events for popovers too
...
As with GtkWindow, we need to request fake motion events if allocation
changes, to emulate motion events given the new layout.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
96450ed9cc
gdk/surface: Emit layout event while frozen
...
The allocation of popups are part dependent of the allocation of the
root, which means the root must still be allocated when updates are
frozen, otherwise we'll try to allocate non-laid out popups.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
5eee1dfcd1
gdk/popup: Remove the popup-layout-changed signal
...
It was replaced with GdkSurface::layout.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
19d2a4ab94
gtk/window: Only fake motion events on windows with pending allocations
...
This fixes an issue where the focus of the window continuously received
fake motion events even when a popover was open, making input events end
up behind the popover.
It also adds a comment describing why motion events are requested. Note
that popovers won't work with this, and it's possible both in the past
and now that sporadic missplaced motion events will appear, e.g. when a
window changes allocation but a popover is open.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
6ee7535af0
gdk/toplevelsize: Rename 'margin' to 'shadow' and 'shadow_width'
...
This makes it more consistent with everywhere else.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
b738054344
gdk: Remove GdkSurface::size-changed
...
It's not emitted, and everyone should use the GdkSurface::layout signal
from now on.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
b8fa892b70
gtk/window: Minor cleanup
2020-12-07 20:37:29 +01:00
Jonas Ådahl
ca65ee8d50
gtk/window: Remove out-dated comment
2020-12-07 20:37:29 +01:00
Jonas Ådahl
5eca548acc
gtk/window: Use default size if non-resizable if set
2020-12-07 20:37:29 +01:00
Jonas Ådahl
42679f2903
gdk: Replace all GDK_CONFIGURE usage with GdkSurface::layout
...
This removes the GDK_CONFIGURE event and all related functions and data
types; it includes untested changes to the MacOSX, Win32 and Broadway
backends.
2020-12-07 20:37:29 +01:00
Christian Hergert
b431e39d4e
macos: we only need 24-bit for color
2020-12-07 11:27:11 -08:00
Emmanuele Bassi
606cb51293
Merge branch 'ebassi/activate-signal' into 'master'
...
Add accessors for GtkWidgetClass.activate_signal
See merge request GNOME/gtk!2925
2020-12-07 15:23:55 +00:00
Jakub Steiner
62e0c0de59
Adwaita: no 3d shadow for pressed sidebar
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3413
2020-12-07 14:19:24 +01:00
Jakub Steiner
30f789650f
Revert "Adwaita: avoid clipping menu shadows"
...
While the workaround hides majority of the issue there are still two big downsides:
- shadow does eat from the widget dimensions so alignment is broken
- situations like popover going upwards on screen edge break completely
The appropriate action is to revert these theme duct tape solutions to make room
for a proper fix.
This reverts commit b3dba1dca6
.
Issue https://gitlab.gnome.org/GNOME/gtk/-/issues/1987
2020-12-07 10:58:12 +01:00
Jonas Ådahl
3f96d4b6da
gdk: Always get shadow width via GdkToplevelSize
...
This removes the gdk_surface_set_shadow_width() function and related
vfuncs. The point here is that the shadow width and surface size can now
be communicated to GDK atomically, meaning it's possible to avoid
intermediate stages where the surface size includes the shadow, but
without the shadow width set, or the other way around.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
0dcd4a5bdb
wayland: Stop emitting size-changed
...
It's dealt with by GdkSurface::layout now.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
8a599b2582
gtk: Allocate everything from GtkNativeClass::layout
...
This changes allocation of the widget trees to happen as a side effect
to the GdkSurface::layout signal, which first passes the GtkNative
instance where it is then forwarded to the implementations of the
GtkNative interface.
The implementations of GtkNative are the ones doing the actual
gtk_widget_allocate(), and they do so in their GtkNativeClass::layout
function.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
a798edc360
gtk/window: Only deal with shadow when (ex|in)cluding csd size
...
The size should correspond what gtk_widget_measure() does, and it
measures what's within the window excluding the shadow; so make this
helper function correspond to this.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
e51c32b9c1
gdk/wayland: Always compute-size if GTK asked fer layout
2020-12-07 09:46:39 +01:00
Jonas Ådahl
048a0172a0
gdk/wayland: Always configured size when resizing
...
GTK4 doesn't support arbitrary constraints when resizing a window (e.g.
steps, or aspect ratio), so we don't need to care about the result from
compute-size when doing interactive resizing.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
64f6118af4
gdk/toplevelsize: Don't complain if only shadow extends out of bounds
2020-12-07 09:46:39 +01:00
Jonas Ådahl
14b5a5a4c7
gtk/window: Remove gtk_window_resize()
...
Use gtk_window_set_default_size() or change the size of the widget
inside the window to get the same effect.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
4083f7e47f
testsuite: Remove test for gtk_window_resize()
...
And use gtk_window_set_default_size() in the other place.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
2854d0339c
tests/testgtk: Remove 'Resize' button
...
The gtk_window_resize() API is going away, so remove this test.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
98fffe6f23
tests/animated-resizing: Resize widget instead of window
...
This means the window needs to be marked as non-resizable, otherwise it
won't shrink.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
f083849ebb
tests: Use gtk_window_set_default_size() when appropriate
...
Replace the usage of gtk_window_resize() with
gtk_window_set_default_size() where possible.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
deb58339b9
gtk/expander: Remove manual call to gtk_window_resize()
...
It happens implicitly for a non-resizeable window.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
65ad9d6d96
gdk/x11: Flush layout changes to the frame clack dispatch
...
This follows the trail of the Wayland backend in that GdkSurface changes
happen during the layout phase, and that a GDK_CONFIGURE no longer being
used to communicate the size changes of a surface; this now also uses
the layout signal on the GdkSurface.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
e0f13ecae7
gdk/surface: Try to reschedule pending phase until dispatched
...
If a surface scheduled a relayout, got frozen, and a layout phase
happened, then got unfrozen, it wouldn't see it's layout being
requested; avoid this race by remembering the pending phases until they
actually happened.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
880ceebae4
gdk/surface: Make backends aware of when layout is requested
2020-12-07 09:46:39 +01:00
Jonas Ådahl
8c014e63af
x11: Remove handling of 'substructure' events
...
Reading the comment, it seems to be related being a window manager
decoration utility; this is not something GTK4 aims to handle, just drop
support for this.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
ecd40fa265
wayland: Layout drag icon from GdkSurface::layout
2020-12-07 09:46:39 +01:00
Jonas Ådahl
3b140a05a4
gtk/dragicon: Don't show until child is set
...
Showing before the child would result in bogus
gdk_drag_surface_present() with an "empty" (1x1) size. This can easily
be avoided by postponing showing until there is anything to show.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
d38f81999e
wayland: Communicate popup layout changes via GdkSurface::layout
...
By moving popup layout emission to the layout phase, the current
GdkPopup::poup-layout-changed signal has no value on its own as it'd be
ignored by GtkPopover.
Make the Wayland backend communicate the popup layout changes via the
common signal; but leave the rest intact until other backends catch up.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
efcfd23652
wayland/surface: Restructure fields used for the next layout
...
Put them in a anonymous struct, and separate the toplevel specific ones
into another anonymous struct inside the first one. Later popup related
fields will be added.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
70b83c9a70
gdk/surface: Remove left-over signal enum value
...
The popup-layout-change signal was moved to GdkPopup, but the enum was
never removed from GdkSurface.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
4779e4e488
gdk/frame-clock: Remove the newly added 'compute-size' phase
...
What was previously done in the layout phase is now done in response to
a GdkSurface signal, which means size computation can happen on layout.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
13931463bd
wayland/surface: Compute size on layout
...
Stop using the 'compute-size' phase of the frame clock, use the layout
phase instead, now that GTK isn't using the layout phase anymore.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
ecc861bf06
Pass the layout signal via GdkSurface to GtkRoot
...
Don't have GtkRoot listen directly to the layout signal on the frame
clock, but let it pass through GdkSurface. This will allow GdkSurface to
be more involved in the layout phase.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
475c07e935
gdk/surface: Make pending schedule a phase enum
...
Scheduling an update when frozen would reschedule when unfrozen; change
this to a generic pending phase enum, and use this for resrcheduling
paint and compute-size.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
0c8d97e3f7
gtk/root: Validate css node after update
...
It should happen before layout, but after the animation tick, thus after
the update.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
8d4f8f0cfc
wayland: Concentrate size computation to 'compute-size' phase
...
This includes computing the surface size, including shadow margin,
setting the surface size, during the 'compute-size' clock phase.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
289b50785b
wayland/surface: Don't save uninitialized size
...
GdkSurface's are initialized to have the size 1x1, as otherwise we'd
receive an X11 error, would a corresponding X11 window be created.
This confuses the "saved size" mechanisms in the Wayland backend, as
treats 0 as uninitialized, and not 1.
Fix this simply not saving size that if it's smaller or equal than 1.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
68c14242b2
gdk/surface: Add API to request 'compute-size' clock phase
2020-12-07 09:46:39 +01:00
Jonas Ådahl
4af54fb410
gdk/surface: Use helper to emit 'size-changed' signal
2020-12-07 09:46:39 +01:00
Jonas Ådahl
13b4a4b24c
gdk/toplevelsize: Add way to set margin
...
Will be used to communicate the shadow margin, instead of using
gdk_surface_set_shadow_width().
Also set these values in gtkwindow.c.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
e07fde5c81
frame-clock: Add 'compute-size' phase
...
This will be handled between 'update' (which may trigger animation
ticks, CSS update, etc) and 'layout' which will allocate the widget
tree. It's meant to perform surface size computation, and is done
between these two phases in order to have an up to date state, and
letting the layout phase have an up to date size to layout in.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
8f27b3fcf6
gtk/window: Let the backend handle toplevel freezing
2020-12-07 09:46:39 +01:00
Jonas Ådahl
251bd15597
wayland: Apply new surface state at the beginning of a frame
...
Concentrate state application to the start of a frame; this is to avoid
having GTK going back and forth between different state if so would
happen between two frames.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
dd738d2787
surface: Only keep state 'withdrawn' after hiding
...
A hidden surface should start from a clean slate when showing again, so
clear any now out of date state.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
18d92c3f16
wayland: Keep pending initial state separate
...
Queue it, and then wait for it to actually take effect, i.e. be
confirmed via a configure event from the compositor, before setting the
actual GdkSurface::state value.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
f4c36fe1ce
gdk/surface: Add API to queue and apply state changes
...
This will be used to compress state changes and apply as part of a frame
clock dispatch.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
23d7392eb9
gdk/surface: Removed unused struct field
...
The 'old_state' wasn't used anywhere, lets remove it.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
996eeec16c
gtk/window: Don't gdk_toplevel_present() if not mapped
...
That would map the window too early.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
641915974b
gdk/toplevel: Make gdk_toplevel_present() async
...
The plan is to concencrate size computations as part of the frame clock
dispatch, meaning we shouldn't do it synchronously in the present()
function.
Still, in Wayland, and maybe elsewhere, it is done in the present()
function, e.g. when no state change was made, but this will eventually
be changed.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
528ec4dded
wayland: Only set mapped state when mapped
...
Mapping a surface under Wayland is an asynchronous process, where one
creates a surface and commits an initial state without having drawn
anything, then waiting for a configuration, which then is acknowledged
and content is painted and committed. Not until having received this
configuration is a surface actually mapped, so wait with setting the
mappedness until this.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
366b946f5b
wayland/popup: Use maybe_notify_mapped() helper
2020-12-07 09:46:38 +01:00
Jonas Ådahl
9e6a55a086
wayland: Decouple mapped state from surface creation
2020-12-07 09:46:38 +01:00
Christian Hergert
285781724f
macos: set opengl view as opaque in opaque windows
...
We don't need the OpenGL view to be transparent if the window itself
is not transparent. This has the potential to speed up the compositing
of the GL view onto the NSWindow.
2020-12-06 20:14:52 -08:00
Emmanuele Bassi
2d103cf80c
Merge branch 'wayland-inhbit0' into 'master'
...
wayland: avoid referencing unallocated memory when uninhibiting
See merge request GNOME/gtk!2927
2020-12-07 00:26:50 +00:00
Michael Terry
c8d991e4de
wayland: avoid referencing unallocated memory when uninhibiting
2020-12-06 18:37:40 -05:00
Zander Brown
a165bb9f46
Update British English translation
2020-12-06 22:08:30 +00:00
Timm Bäder
33ed42d985
gl renderer: Remove RESET_OPACITY flag
...
We always need to do that (and always passed the flag to
add_offscreen_ops() anyway).
2020-12-06 20:03:35 +01:00
Timm Bäder
1ee4f6138b
gl renderer: Reset opacity when rendering blend node children
...
We render those on a texture, so we need to reset the opacity because
that will be applied when rendering the resulting texture.
2020-12-06 20:01:36 +01:00
Timm Bäder
7b61ef9e0f
gl renderer: Initialize rounded rect early
2020-12-06 19:57:48 +01:00
Timm Bäder
b46d077b3a
gl renderer: Fix rendering clipped blurred inset shadow nodes
2020-12-06 19:18:10 +01:00
Timm Bäder
e32331d002
gl renderer: Ignore crossfades between equal texture nodes
2020-12-06 19:18:10 +01:00
Timm Bäder
05928608ec
gl renderer: Use scale_x and scale_y everywhere
...
Try to handle two different values for scale in horizontal and vertical
direction better.
Fixes #3431
2020-12-06 19:18:05 +01:00
Emmanuele Bassi
d8c9a67d20
docs: Clarify gtk_widget_activate()
...
We need to tell people what signal will be emitted when calling
gtk_widget_activate(), and that the shortcuts API might be more
appropriate to what they are looking for.
2020-12-06 15:13:57 +00:00
Emmanuele Bassi
c352fe9ab0
Move activate_signal to the widget private class data
...
Instead of having it as a field in the class structure.
2020-12-06 15:06:18 +00:00
Emmanuele Bassi
e396874f3c
Merge branch 'ebassi/a11y-leak' into 'master'
...
a11y: Plug a leak in the AT-SPI context
Closes #3450
See merge request GNOME/gtk!2926
2020-12-05 20:52:04 +00:00
Emmanuele Bassi
f6c53ced0d
a11y: Plug a leak in the AT-SPI context
...
Fixes : #3450
2020-12-05 20:25:30 +00:00
Matthias Clasen
ee26e282cc
Update contribution guide
...
Make my feelings about bug reporting by screencast known.
2020-12-05 11:34:52 -05:00
Matthias Clasen
894f893223
Merge branch 'revert-round-windows' into 'master'
...
Revert "theme: Round all window corners"
See merge request GNOME/gtk!2921
2020-12-05 15:10:16 +00:00
Piotr Drąg
67d7e2007f
Update POTFILES.in
2020-12-05 15:05:48 +01:00
Emmanuele Bassi
3a9cca74fc
Use WidgetClass.activate_signal getter function
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
fe9c0db603
Add getter for WidgetClass.activate_signal
...
Just like we have a setter.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
fde32c5219
Use private can_activate() method
...
Instead of checking the activate_signal field directly.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
213024a560
Use function setter for WidgetClass.activate_signal
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
e5e18ddffb
Add private method to check activatability
...
We should have an actual method, instead of checking the
WidgetClass.activate_signal directly.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
b3e03fa6f0
Add wrappers for setting the WidgetClass.activate_signal field
...
Setting a field on a class structure is not always an easy task from
languages other than C. While bindings can provide access to the class
pointer, twiddling the fields in the class structure can be awkward.
Additionally, signal ids are not always readily available.
We can paper over the direct access to the class structure, as well as
the "signal name to id" mapping with a simple couple of setter
functions.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
c0586ca6e2
Merge branch 'wip/jfelder/customsorter-null' into 'master'
...
customsorter: Add missing nullable annotation
See merge request GNOME/gtk!2923
2020-12-04 23:39:48 +00:00
Jean Felder
4430314514
customsorter: Add missing nullable annotation
2020-12-05 00:04:36 +01:00
Emmanuele Bassi
4087055b18
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix GL renderer for macOS
Closes #3420
See merge request GNOME/gtk!2922
2020-12-04 22:37:00 +00:00
Christian Hergert
a47c0065fb
macos: enable GL renderer by default
...
Now that the attribute locations are fixed for the GL renderer, we can
enable it by default on macOS.
Fixes #3420
2020-12-04 13:41:31 -08:00
Christian Hergert
6883c2214b
gl: specify attribute locations for vUv and aPosition
...
These positions are not guaranteed to be in a specific order when linked
into the final GPU program. They need to be specified so that our code
in gskglrenderer.c can use known positions for them to match up with
our GskQuadVertex.
This fixes the GL renderer on macOS's OpenGL shader compiler.
Fixes #3420
2020-12-04 13:33:34 -08:00
Matthias Clasen
7f6fdd6e7b
Merge branch 'matthiasc/for-master' into 'master'
...
emoji chooser: Fix incremental loading
Closes #3438
See merge request GNOME/gtk!2920
2020-12-04 17:21:56 +00:00
Matthias Clasen
24124452d5
docs: Fix up GtkPicture docs
...
These were missing proper linking.
2020-12-04 11:47:43 -05:00
Matthias Clasen
0dff89d9fb
Revert "theme: Round all window corners"
...
This reverts commit e46522e4b5
.
2020-12-04 11:13:26 -05:00
Matthias Clasen
f0f64f42ee
emoji chooser: Fix incremental loading
...
This broke when we started using GDK_PROFILER_CURRENT_TIME for
timekeeping - that gets defined to 0 when we're building without
sysprof, so we can use it to make such determinations. Go back
to using g_get_monotonic_time().
Fixes : #3438
2020-12-04 11:09:43 -05:00
Matthias Clasen
d278afc85b
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2918
2020-12-04 04:12:41 +00:00
Matthias Clasen
423b8209a1
gtk-demo: Use a native filechooser in the words demo
2020-12-03 22:31:05 -05:00
Benjamin Otte
559f74e0c1
Merge branch 'picture-docs2' into 'master'
...
Add docs about sizing pictures
See merge request GNOME/gtk!2917
2020-12-04 02:04:19 +00:00
Benjamin Otte
66c3a43e96
Add docs about sizing pictures
...
Suggested by Christopher Davis.
2020-12-04 02:04:19 +00:00
Matthias Clasen
d83554121f
gtk-demo: Use a native file chooser in the svg demo
2020-12-03 19:44:45 -05:00
Matthias Clasen
2688b94133
gtk-demo: Use a native filechooser in the video demo
2020-12-03 19:44:34 -05:00
Matthias Clasen
e035baee8a
gtk-demo: Remove empty row in the pickers demo
...
The file chooser button is gone.
2020-12-03 19:25:04 -05:00
Emmanuele Bassi
f1ff8f9aad
Merge branch 'wip/chergert/macos-decelerate' into 'master'
...
macos: fix typo when creating scroll events
Closes #3418
See merge request GNOME/gtk!2916
2020-12-03 22:54:46 +00:00
Christian Hergert
115ea624d9
macos: fix typo when creating scroll events
...
This fixes an issue where we would ignore events with Y delta
and no X delta while scrolling due to a typo when checking for
any delta.
This fixes deceleration of kinetic scrolling on the macOS backend.
Fixes #3418
2020-12-03 13:46:47 -08:00
Matthias Clasen
6ecae6c5f8
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix motion event delivery after closing transient window
Closes #3419
See merge request GNOME/gtk!2910
2020-12-03 20:07:16 +00:00
Matthias Clasen
6d76b587cf
Merge branch 'wip/chergert/shadertoy-macos-fix' into 'master'
...
demos: make alienplanet demo work on macOS OpenGL
See merge request GNOME/gtk!2915
2020-12-03 19:00:39 +00:00
Christian Hergert
8e62ff50fe
demos: make alienplanet demo work on macOS OpenGL
...
On the macOS OpenGL implementation, the use of noise2 as a
function within the glsl shader collides with the builtin noise2 of a
different signature.
This changes the name to something similar (noize2) so that we
do not risk colliding names when linking.
With this commit, the shadertoy alienplanet demo works on mac
OpenGL (albeit still with the Cairo renderer).
2020-12-03 10:23:13 -08:00
Matthias Clasen
0daa905a27
Merge branch 'wip/otte/conic' into 'master'
...
Implement a GL shader for conic gradients
See merge request GNOME/gtk!2913
2020-12-03 17:14:01 +00:00
Emmanuele Bassi
d1a4ad3db6
Merge branch 'wip/tintou/gdk-backends-header' into 'master'
...
build: Use the correct path to the header of the wayland and x11 backends
See merge request GNOME/gtk!2914
2020-12-03 12:32:24 +00:00
Benjamin Otte
2c1bd399d2
glrenderer: Implement a shader for conic gradients
2020-12-03 13:07:17 +01:00
Benjamin Otte
fac5fba0dc
rendernode: Fix some wrong constants for conic gradients
...
copy/paste from other nodes left some wrong values in there and that
screwed things up quite a bit.
2020-12-03 13:07:17 +01:00
Benjamin Otte
c907ad83b0
glrenderer: Emit more useful error messages
...
Catch the error when it happens, so that we can emit a specific and more
helpful error message.
Also verify that all branches in the code now do indeed set a proper
GError when they fail, so that the final catch-all is no longer needed.
Instead, assert that the error is set so that we catch future code
additions early that do not set the GError.
2020-12-03 13:07:17 +01:00
Corentin Noël
585ba777c2
build: Use the correct path to the header of the wayland and x11 backends
2020-12-03 10:02:03 +01:00
Matthias Clasen
f8ee4cfea5
NEWS: Updates
2020-12-02 23:10:39 -05:00
Matthias Clasen
35d2cbefe6
Merge branch 'wip/otte/conic' into 'master'
...
Add support for conic gradients
See merge request GNOME/gtk!2911
2020-12-03 03:54:24 +00:00
Christian Hergert
004f0a6596
macos: plug leak of application windows
...
This ensures that we don't leak window references inside the action muxer.
Otherwise, we risk not disposing the windows upon gtk_window_destroy()
and blocking the main loop from quitting.
Fixes #3419
2020-12-02 19:44:02 -08:00
Christian Hergert
b68e0bb3fb
muxer: add helper to get group by name
...
This is useful when you need to read a group back out of the muxer.
2020-12-02 19:44:02 -08:00
Christian Hergert
92f0216605
macos: ensure element is part of queue
...
We don't want to risk decrementing length field unless this is actually
part of the queue.
2020-12-02 19:44:02 -08:00
Christian Hergert
e317b9be00
macos: maintain GList element consistency
...
We need to keep this consistent so that we can look things up
faster in other places. Therefore, just take the hit here and clear
the entire list ensuring prev/next poniters are cleared.
2020-12-02 19:44:01 -08:00
Christian Hergert
2e52386be5
macos: send focus-out event to windowing
2020-12-02 19:44:01 -08:00
Christian Hergert
9431c70a6a
macos: freeze updates until surface is mapped
...
This more closely matches the X11 backend in terms of freezing
updates on the surface initially until we get mapped.
2020-12-02 19:44:01 -08:00
Matthias Clasen
6e67d44aa3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3429
See merge request GNOME/gtk!2912
2020-12-03 03:43:19 +00:00
Benjamin Otte
e622013f7e
css: Add support for conic-gradient()
...
This comes complete with animation support. For a good time, try:
@keyframes conic {
100% { background-image: conic-gradient(from 1turn, red, lime, blue, yellow, red); }
}
window {
background-image: conic-gradient(red, lime, blue, yellow, red);
animation: conic infinite linear 5s;
}
2020-12-03 04:13:33 +01:00
Benjamin Otte
3886f0c530
Merge branch 'wip/otte/diediedie' into 'master'
...
Remove GtkFileChooserButton
See merge request GNOME/gtk!2909
2020-12-03 01:31:39 +00:00
Benjamin Otte
eb9c204535
gtk: Remove GtkFileChooserButton
...
... as discussed in the meeting.
2020-12-03 02:02:27 +01:00
Matthias Clasen
ab9e99218f
docs: Remove mentions of <accelerator>
...
That is no longer supported, keyboard shortcuts
are done with GtkShortcut now.
Fixes : #3429
2020-12-02 19:59:44 -05:00
Matthias Clasen
714c610d6b
gtk-demo: Add a search button
...
Easter eggs are great, but search shouldn't be one.
2020-12-02 19:53:55 -05:00
Benjamin Otte
8706d69e60
snapshot: Add gsk_snapshot_append_conic_gradient()
2020-12-03 01:15:53 +01:00
Benjamin Otte
55a242bd81
gsk: Add GskConicGradientNode
2020-12-03 00:47:54 +01:00
Matthias Clasen
61b40c47f9
Merge branch 'fix/keyboard-input' into 'master'
...
Gdk4/Win32: Correct calls to gdk_key_event_new()
See merge request GNOME/gtk!2903
2020-12-02 22:14:27 +00:00
Matthew Jakeman
710d0620a4
Gdk4/Win32: Correct call to gdk_key_event_new()
...
The keycode and modifier (state) parameters are in the wrong order
for gdk_key_event_new() in the gdk win32 backend, which causes
key up/down events to be populated incorrectly.
2020-12-02 22:14:27 +00:00
Benjamin Otte
71cb7c2063
rendernodeparser: Split out a function
2020-12-02 21:48:35 +01:00
Matthias Clasen
a482d870dd
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
Revert "macos: specify a window level for surfaces"
See merge request GNOME/gtk!2908
2020-12-02 20:15:51 +00:00
Emmanuele Bassi
bc4992fef9
Merge branch 'ebassi/doc-fixes' into 'master'
...
Ebassi/doc fixes
Closes #3428
See merge request GNOME/gtk!2906
2020-12-02 20:08:05 +00:00
Christian Hergert
b38d0d7d9e
macos: resign main/key when hiding window
...
This isn't done automatically for us, so we need to synthesize it in
our hide helper.
With this commit, we properly re-focus the new main/key window after
we have closed a transient-for window.
2020-12-02 11:36:38 -08:00
Christian Hergert
853a9c7a8c
macos: disconnect frame clock when destroying surface
2020-12-02 11:35:02 -08:00
Christian Hergert
26b9254ac7
macos: track grab serial like other backends
...
This is what is done elsewhere, so copy that here too now that we actually
generate serials for events.
2020-12-02 11:34:31 -08:00
Benjamin Otte
a51f11999a
tests: Remove testsvg
...
That demo lives in gtk-demo now.
2020-12-02 20:17:28 +01:00
Christian Hergert
f11c23f407
Revert "macos: specify a window level for surfaces"
...
This reverts commit ca8b00e871
.
This isn't needed and causes issues with other applications getting
stacked beneath our windows.
2020-12-02 11:15:57 -08:00
Emmanuele Bassi
0c8de4e561
Fix transfer of GtkTreeExpander.get_item()
...
We return a full reference to the item.
Fixes : #3428
2020-12-02 19:10:13 +00:00
Emmanuele Bassi
13f9993007
docs: Add missing fields to GtkTextBufferClass
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
b2b451d762
docs: Hide private files/directories in the GTK reference
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
2e146a56f7
docs: Mark GtkModelButton's section as private
...
The widget is not public any more.
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
34197d4f8a
docs: Add more symbols to the GDK reference
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
39dbd91bb0
docs: Add yet another private header
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
901d99d7c5
docs: More ignored files
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
8f6e3848f6
docs: Remove duplicate symbol
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
3548350dfa
docs: Add missing GdkDragSurfaceInterface gtk-doc annotation
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
caae240bc7
docs: Ignore harder
...
First of all, we must list *all* ignored headers. Since we have public
headers in the x11 and wayland directories, we must explicitly declare
all headers that we consider private under those directories.
The "quartz" subdirectory was renamed "macos", with the new macOS
backend. The "mir" directory was removed, so there's no need to ignore
it.
We are also missing a bunch of ignored headers in the top-level gdk
directory.
Finally, pass the list of ignored files to gtkdoc-mkdb, so we won't get
missing declaration warnings.
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
f5f6ceece5
docs: Remove private symbols from the API reference
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
4caceb5dd4
Remove gtk-doc annotation from private symbols
...
Keep the documentation, just tweak it so that gtk-doc won't try to find
the declarations of these private symbols.
2020-12-02 19:05:41 +00:00
Matthias Clasen
3da41b6021
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix window stacking
See merge request GNOME/gtk!2907
2020-12-02 18:38:14 +00:00
Christian Hergert
9b9fb4d7a3
macos: place above transient-for when presenting
...
We need to re-attach to the transient-for window whenever we present or
we risk getting placed behind the window by the display server. Apparently
that setting does not persist across a hide of the NSWindow.
2020-12-02 10:21:16 -08:00
Christian Hergert
ca8b00e871
macos: specify a window level for surfaces
2020-12-02 10:15:43 -08:00
Matthias Clasen
4434889e41
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2905
2020-12-02 15:57:39 +00:00
Bilal Elmoussaoui
475352fbc0
StringList: add missing nullability annotations
2020-12-02 10:36:29 -05:00
Bilal Elmoussaoui
ad30ac3932
Shortcut: add missing nullability annotations
2020-12-02 10:29:16 -05:00
Bilal Elmoussaoui
9d52ca1887
StringFilter: get_search fix nullable annotation
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
ec537d75e4
Text: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
b47ea9421f
TextView: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
845d2e5433
TreeModel: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
50310f7b14
TreeView: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Matthias Clasen
af944aa74c
widget: Add a missing nullability annotation
2020-12-02 10:08:58 -05:00
Matthias Clasen
b5077d02ed
Clarify the docs for gtk_widget_class_set_css_name
...
Reword, and mention the default css name.
2020-12-02 10:06:01 -05:00
Bilal Elmoussaoui
6a3bd1c4d1
window: default_icon_name can be null
2020-12-02 10:00:18 -05:00
Emmanuele Bassi
2fcd0e21bd
Merge branch 'ebassi/for-master' into 'master'
...
Various documentation fixes
See merge request GNOME/gtk!2900
2020-12-02 13:40:25 +00:00
Daniel Mustieles
5127726bbc
Updated Spanish translation
2020-12-02 13:54:32 +01:00
Daniel Mustieles
db456a70ee
Updated Spanish translation
2020-12-02 09:26:08 +01:00
Emmanuele Bassi
770e848953
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: various macos improvements for GTK 4
See merge request GNOME/gtk!2902
2020-12-02 01:14:30 +00:00
Christian Hergert
9e1dd15e31
macos: use Cairo renderer by default
...
Until the GL renderer is working on macOS OpenGL, we need to default
to the Cairo renderer.
2020-12-01 16:24:15 -08:00
Christian Hergert
27b9a9e7ef
macos: glFlush() when switching GL contexts
...
The Mac OpenGL programming guide suggests that you glFlush() before changing
contexts to ensure that the commands have been submitted.
2020-12-01 16:19:04 -08:00
Christian Hergert
a020c901ba
macos: treat some toplevel NSWindow like document windows
...
This makes the window animate in by the window manager like other
application windows on macOS. Currently ignored for transient windows.
2020-12-01 16:19:04 -08:00
Emmanuele Bassi
cdad68e858
docs: Ignore generated Wayland protocol file
2020-12-01 18:03:31 +00:00
Emmanuele Bassi
ef36028526
docs: Ignore more private files
2020-12-01 18:01:33 +00:00
Emmanuele Bassi
69b1b19315
docs: Annotate missing symbols
2020-12-01 17:28:16 +00:00
Emmanuele Bassi
516f71bbdc
Use the appropriate prefix for GtkBuilderClosureFlags
...
Facilitate the job of glib-mkenums, and ensure that the enumeration
nicknames are computed reliably.
2020-12-01 17:26:34 +00:00
Emmanuele Bassi
d820fea7a4
docs: Annotate GtkBuildableParser
2020-12-01 17:21:45 +00:00
Emmanuele Bassi
3e8d157118
docs: Hide GtkBitsetIter fields
2020-12-01 17:18:38 +00:00
Emmanuele Bassi
67f45940ce
docs: Annotate GtkAssistant::escape action signal
2020-12-01 17:18:23 +00:00
Emmanuele Bassi
95400e6451
docs: Annotate GtkAppChooserButton::changed
2020-12-01 17:16:05 +00:00
Emmanuele Bassi
d46fe31f54
docs: Ignore more files
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
4f67be1c8e
docs: Add missing annotations for GtkTextTagTable
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
c13e164f25
Make GtkCenterLayout accessors more idiomatic
...
Add argument validation, and emit a layout-changed signal whenever the
start, center, and end widgets change.
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
eba8f36d4f
docs: Fix annotations in GtkCenterLayout
...
Missing ':' separator.
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
37f11ab77d
docs: Annotate GskRenderer
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
8b898818c2
docs: Annotate the GL shader objects
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
0f62ab6c42
docs: Annotate all render node types
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
c524b72d13
docs: Annotate structure types used by GskRenderNodes
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
b5313dbd4d
docs: Annotate GdkDeviceTool
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
b9a1827da7
docs: Annotate GdkGLTexture
2020-12-01 13:48:07 +00:00
Emmanuele Bassi
1057189ea2
docs: Annotate GdkMemoryTexture
2020-12-01 13:47:56 +00:00
Emmanuele Bassi
879b2845ad
docs: Annotate GdkPaintable
...
The dummy typedef needs a gtk-doc stanza, and the interface
documentation needs to be slightly clarified.
2020-12-01 13:44:51 +00:00
Emmanuele Bassi
ecce3756d4
docs: Annotate GdkPopup
2020-12-01 13:42:07 +00:00
Emmanuele Bassi
6e4dd5811d
docs: Annotate GdkSnapshot
2020-12-01 13:41:28 +00:00
Emmanuele Bassi
598e1304f6
docs: Annotate the GdkToplevel interface
2020-12-01 13:39:48 +00:00
Emmanuele Bassi
e3fbc0ee9c
docs: Fix typo in the GdkTolevelLayout annotation
2020-12-01 13:38:33 +00:00
Emmanuele Bassi
4021734047
docs: Annotate the GdkContentProviderClass structure
2020-12-01 13:38:12 +00:00
Emmanuele Bassi
5a307fa7f3
docs: Ignore more private headers
2020-12-01 13:37:59 +00:00
Matthias Clasen
617d12fd77
Merge branch 'sophie-h/gtk-nullables-2'
...
Merge Sophie's nullable annotations, with some documentation
fixups on top.
2020-11-30 23:43:44 -05:00
Matthias Clasen
837f398a9b
columnviewcolumn: Improve docs
...
Mention what setting sorter to NULL means.
2020-11-30 23:40:03 -05:00
Matthias Clasen
e18211deca
centerlayout: Improve docs
...
Explain what passing NULL does.
2020-11-30 23:36:23 -05:00
Jordi Mas
32a547cc3e
Update Catalan translation
2020-11-30 22:35:47 +01:00
Matthias Clasen
365afa381a
Merge branch 'arnaudb/annotate-set-title' into 'master'
...
Add "nullable" annotation.
See merge request GNOME/gtk!2895
2020-11-30 21:14:28 +00:00
Matthias Clasen
b7d3c073f8
NEWS: Updates
2020-11-30 14:00:26 -05:00
Matthias Clasen
56b0095622
Merge branch 'master' into 'master'
...
broadway: make header name parsing case-insensitve
Closes #3406
See merge request GNOME/gtk!2894
2020-11-30 17:55:27 +00:00
Matthias Clasen
39f0c48eb2
Apply 1 suggestion(s) to 1 file(s)
2020-11-30 17:44:30 +00:00
Matthias Clasen
7d24e1405e
Apply 1 suggestion(s) to 1 file(s)
2020-11-30 17:42:39 +00:00
Matthias Clasen
3680ae220a
Merge branch 'matthiasc/for-master' into 'master'
...
build: Use link_whole for linking our convenience libs
See merge request GNOME/gtk!2899
2020-11-30 15:49:25 +00:00
Matthias Clasen
f309fa21c9
build: Use link_whole for linking our convenience libs
...
Without this, we lose exported symbols from e.g. libgsk
that are not used elsewhere in the code.
2020-11-30 09:56:55 -05:00
Matthias Clasen
61e7326f22
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3364
See merge request GNOME/gtk!2898
2020-11-30 14:44:15 +00:00
Timm Bäder
dc13ff97e2
modelbutton: Reset active menu item on pointer leave
...
We don't want to leave an active menu item behind if the pointer doesn't
enter another menu item.
This matches the old GtkMenu behavior
2020-11-30 09:23:03 -05:00
Timm Bäder
af28237569
popovermenu: Connect to right controller signal
...
leave is emitted before the new contains-pointer value is set, so the
signal handler wasn't working right.
2020-11-30 09:22:57 -05:00
Timm Bäder
ff8de0a93f
eventcontrollermotion: Notify by pspec
2020-11-30 09:22:49 -05:00
Timm Bäder
aefabcc056
popovermenu: Pull variable declaration in closest scope
2020-11-30 09:22:41 -05:00
Timm Bäder
1d6c6fc3b8
shortcutcontroller: Separate trigger/action early returns
...
We take this early return in update_accel over 36k times when starting
the widget factory and always because the action is not a named action.
2020-11-30 09:22:34 -05:00
Timm Bäder
8645773fc6
shortcutcontroller: Pass the muxer to update_accel()
...
We only needed the widget to get its action muxer. And this way we don't
have to call gtk_widget_get_action_muxer() dozens of times, just once in
set_widget().
2020-11-30 09:22:29 -05:00
Timm Bäder
d663909159
shortcutcontroller: Use priv->shortcuts directly in set_widget()
...
Instead of treating the shortcut controller itself as a GListModel,
which just passes everything along from priv->shortcuts.
2020-11-30 09:22:21 -05:00
Timm Bäder
e3ff92bc87
shortcutcontroller: Save signal handler ID
...
gtk_shortcut_controller_finalize() used to take ~13.8% when closing the
complex listbox demo in gtk4-demo. Now it takes nothing.
2020-11-30 09:21:57 -05:00
Timm Bäder
2d43ecf8ca
widget: root child before emitting child observer signals
...
Try to avoid the childen_observer signal handlers screwing up internal
state.
Fixes #3364
2020-11-30 09:21:52 -05:00
Timm Bäder
5f4beb711f
widgetprivate: Remove unused function
2020-11-30 09:21:42 -05:00
Timm Bäder
da514187f5
gl renderer: Make minimal rounded rects more minimal
2020-11-30 09:21:34 -05:00
Matthias Clasen
6bd9ce7b55
docs: Ignore more generated Wayland protocol headers
...
These inject mysterious words like Airbrush, Lense and
Mouse into the list of undocumented apis. No need for that.
2020-11-30 09:21:24 -05:00
Matthias Clasen
ec21d354b9
gsk: doc fixups
2020-11-30 09:21:24 -05:00
Matthias Clasen
8cf4ce5d9e
Merge branch 'ebassi/cell-renderer-get-size' into 'master'
...
Remove GtkCellRendererClass.get_size()
See merge request GNOME/gtk!2896
2020-11-30 14:09:03 +00:00
Emmanuele Bassi
09b6c37e1d
Merge branch 'ebassi/for-master' into 'master'
...
Blend nodes might have NULL top/bottom nodes
See merge request GNOME/gtk!2891
2020-11-30 13:10:25 +00:00
Piotr Drąg
3161dbfff2
Update Polish translation
2020-11-29 12:11:26 +01:00
Yuri Chornoivan
8412928a14
Update Ukrainian translation
2020-11-29 07:53:56 +00:00
Emmanuele Bassi
60a7830ba5
Remove GtkCellRendererClass.get_size()
...
The get_size() vfuncs is deprecated in GTK3, and only used as a
fallback path for cell renderers that do not implement preferred
size virtual functions.
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
ac473282a2
Port CellRendererGraph to preferred size vfuncs
...
Drop use of GtkCellRendererClass.get_size()
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
20f9e0f144
Port GtkCellRendererProgress to preferred size vfuncs
...
Drop the use of GtkCellRendererClass.get_size()
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
71a9e5d8c2
Port GtkCellRendererToggle to preferred size vfuncs
...
Drop the use of GtkCellRendererClass.get_size()
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
a605fcc2bd
Port GtkCellRendererSpinner to preferred size vfuncs
...
Drop the use of GtkCellRendererClass.get_size()
2020-11-28 19:21:23 +00:00
Emmanuele Bassi
3eaebf1e0b
Port GtkCellRendererPixbuf to preferred size vfuncs
...
Drop the GtkCellRendererClass.get_size() override.
2020-11-28 19:21:23 +00:00
Аляксей
e540ccbd34
Update Belarusian translation
2020-11-28 14:30:43 +00:00
Arnaud Bonatti
55ce61d1a8
Add "nullable" annotation.
2020-11-28 12:15:38 +01:00
Jakub Steiner
8e14f43398
Merge branch 'wip/jimmac/dark-prelights' into 'master'
...
wip/jimmac/dark prelights
Closes #3380
See merge request GNOME/gtk!2892
2020-11-27 18:14:09 +00:00
Jakub Steiner
bbbcc72460
Adwaita,HC: use dark prelights
...
- increase :hover visibility by going darker rather than lighter
puppies died.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3380
2020-11-27 18:17:12 +01:00
Anders Jonsson
c2b1b00e52
Update Swedish translation
2020-11-27 13:35:03 +00:00
Anders Jonsson
05c2e35c5d
Update Swedish translation
2020-11-27 13:31:30 +00:00
Benjamin Beichler
8efde9c48c
broadway: make header name parsing case-insensitve
...
since http RFC state that the header names should be processed case in-sensitive, broadway should not rely on the actual case. E.g. the go-language libraries tend to rewrite the header, which cause problems with e.g. Caddy
Fixes #3406
2020-11-27 12:05:51 +01:00
Emmanuele Bassi
247fc2e471
Blend nodes might have NULL top/bottom nodes
...
We have code in place to handle a NULL node in the state when dealing
with blend nodes, but we don't always check for NULL, which leads to
warnings in the CSS Blend modes demo.
2020-11-26 00:21:11 +00:00
Matthias Clasen
9d2ca90b4c
popover: Fix a typo
...
s/Wether/Whether/
Fixes #3393
2020-11-25 13:59:16 -05:00
Emmanuele Bassi
3a5f8b6192
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #3404 and #3403
See merge request GNOME/gtk!2890
2020-11-25 18:43:53 +00:00
Emmanuele Bassi
16b5a88097
a11y: Check before disconnecting Text signals
...
Use the same initial check for the accessible object type that we use
when connecting the signal, in case we try to disconnect signals on
different widgets. Additionally, check before accessing data that might
have already been removed.
Fixes : #3403
2020-11-25 18:15:04 +00:00
Emmanuele Bassi
fdf2e046c3
a11y: Check before disconnecting selection signals
...
If the selection data has already been cleared we should just bail out.
Fixes : #3404
2020-11-25 18:13:54 +00:00
Jakub Steiner
531d57f30c
Merge branch 'wip/jimmac/menus-darker' into 'master'
...
Adwaita: darker selected menuitem + sidebars
Closes #3390
See merge request GNOME/gtk!2881
2020-11-25 13:42:55 +00:00
Jordi Mas i Hernandez
841bf67bb9
Update Catalan translation
2020-11-25 13:42:11 +00:00
Jakub Steiner
399b457f54
Adwaita: darker selected menuitem + sidebars
...
- without sacrificing the fg/bg contrast too much, increase
selected item visibility
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3390
2020-11-25 14:28:19 +01:00
Sophie Herold
fed734edfc
Fix some nullable return annotations 2
2020-11-24 19:27:33 +01:00
Matthias Clasen
c84c014536
Merge branch 'wip/chergert/for-master' into 'master'
...
textview: fix precondition assertions
Closes #3386
See merge request GNOME/gtk!2886
2020-11-24 17:14:53 +00:00
Christian Hergert
1e994419ee
textview: fix precondition assertions
...
It is a programmer error to call this with a child widget that has not
been placed within the GtkTextView.
Fixes #3386
2020-11-24 08:29:52 -08:00
Matthias Clasen
7b22c44b39
Merge branch 'fix-integer-overflow' into 'master'
...
gdk/win32: fix integer overflow in monitor refresh rate calculation
Closes #3394
See merge request GNOME/gtk!2884
2020-11-24 16:22:49 +00:00
Anders Jonsson
2e744260e0
Update Swedish translation
2020-11-23 22:09:28 +00:00
Volker Rümelin
7190a31b5f
gdk/win32: fix integer overflow in monitor refresh rate calculation
...
In gdk/win32/gdkmonitor-win32.c in function
populate_monitor_devices_from_display_config() refresh->Numerator * 1000
overflows for refresh->Numerator > 4294976.
Cast the factor 1000 to UINT64 to prevent the overflow.
Fixes #3394
2020-11-23 21:42:58 +01:00
Matthias Clasen
729f007379
Merge branch 'no-more-devel-headers' into 'master'
...
Drop devel styling from our windows
See merge request GNOME/gtk!2882
2020-11-23 19:01:44 +00:00
Matthias Clasen
b75b359f19
Drop devel styling from our windows
...
We are about to do a stable release. Time to get used
again to plain old, boring header bars.
2020-11-23 12:10:01 -05:00
Emmanuele Bassi
d7de720275
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2876
2020-11-23 15:41:03 +00:00
Emmanuele Bassi
ef86e46238
a11y: Cache the accessibility bus address
...
Just check for it once; doing it every time we failed to create an
ATContext is just going to fill up the logs.
2020-11-23 14:34:46 +00:00
Emmanuele Bassi
0a46baeb56
a11y: Turn critical warnings into debug messages
...
The accessibility bus might not be available, and if it isn't the case,
it means something has failed at a level where the user can't do much
about it. There's no need to emit a critical warning.
2020-11-23 14:34:46 +00:00
Emmanuele Bassi
fd3a6299ce
Merge branch 'ebassi/glib-min-version' into 'master'
...
Ebassi/glib min version
See merge request GNOME/gtk!2880
2020-11-23 14:33:20 +00:00
Emmanuele Bassi
803b147483
Disable deprecation warnings from GLib
...
We don't want to test the latest changes in GLib in our own build.
2020-11-23 13:04:11 +00:00
Emmanuele Bassi
1f44319588
Drop redundant dependencies
...
PangoCairo already depends on Pango; Cairo-gobject already depends on
Cairo.
2020-11-23 13:04:11 +00:00
Emmanuele Bassi
505478bc59
Drop GLib dependency from GTK's declared dependencies
...
We depend on GObject, which already depends on GLib; on older versions
of Meson, this ends up trying to depend on the system copy of GLib,
instead of the sub-project copy, in case the version of GLib we have
installed is too old.
2020-11-23 12:29:32 +00:00
Emmanuele Bassi
de7833b6a0
Use the right GLib macros for version checking
...
There's a typo in the name, and we never noticed.
2020-11-23 12:06:22 +00:00
Emmanuele Bassi
3a1b2083d6
Do not depend on GLib API introduced after 2.66
...
To avoid bleeding edge deprecations we use GLIB_VERSION_MIN_REQUIRED and
GLIB_VERSION_MAX_ALLOWED. Since we depend on GLib 2.66, we cannot use
API introduced in 2.67, even when conditionally compiled.
2020-11-23 12:06:22 +00:00
nana-4
3e996f61ae
icon-browser: Add .sidebar style class in the main window
...
So the sidebar can get the proper background and border colors.
2020-11-23 10:51:58 +01:00
nana-4
56eac4f846
gtk-demo: Add .sidebar style class in the main window
...
So the sidebar can get the proper background and border colors.
2020-11-23 10:51:58 +01:00
nana-4
61dcb685b2
Adwaita: Unify sidebar background-color
...
The sidebar item style is already unified. The sidebar background-color
should be unified as well.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-23 10:51:58 +01:00
nana-4
bd0d75e237
Adwaita: Make sidebar row styling better
...
- Reorder declaration blocks for code legibility.
- Don't lighten text color on :hover and :selected for better contrast.
- Add missing :focus-visible:focus-within styling to non-:selected row.
2020-11-23 10:51:58 +01:00
nana-4
179fc68355
Adwaita: Fix some sidebar sizing
...
- Don't set the sidebar padding twice.
- Add padding to the assistant sidebar directly, as it doesn't have
.navigation-sidebar internally.
- Set missing margin to the sidebar separator.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-23 10:51:58 +01:00
nana-4
9828756e05
Adwaita: Move placessidebar-specific sizing from .navigation-sidebar
...
The common .navigation-sidebar styling should be more generic.
2020-11-23 10:51:58 +01:00
nana-4
40f2b49c0d
Adwaita: Make treeexpander styling generic
...
The widget can be used outside .navigation-sidebar.
This also fixes the label misalignment in the widget.
2020-11-23 10:51:58 +01:00
nana-4
8e81cbef2c
stacksidebar: Add missing .navigation-sidebar to the inner list
...
Also don't set :show-separators, which is not applied in other sidebars.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-23 10:51:58 +01:00
Timm Bäder
47d572834b
Merge branch 'scalebutton' into 'master'
...
properly set ScaleButton's parent_class
Closes #3381
See merge request GNOME/gtk!2877
2020-11-23 07:38:17 +00:00
Bilal Elmoussaoui
46601325f1
properly set ScaleButton's parent_class
...
GtkScaleButton doesn't subclass GtkButton anymore
Fixes #3381
2020-11-23 02:47:12 +01:00
Emmanuele Bassi
0abc7a3361
Merge branch 'nullables-1' into 'master'
...
Fix some nullable return annotations
See merge request GNOME/gtk!2873
2020-11-21 16:11:34 +00:00
Sophie Herold
1e01b9079d
Fix some nullable return annotations
2020-11-21 16:33:40 +01:00
Piotr Drąg
be688c46f2
Update POTFILES.skip
2020-11-21 14:39:17 +01:00
Jakub Steiner
ab163f168d
Merge branch 'wip/jimmac/clipped-menu-shadows' into 'master'
...
Adwaita: avoid clipping menu shadows
Closes #1987
See merge request GNOME/gtk!2872
2020-11-20 12:37:49 +00:00
Jakub Steiner
e937f7eac8
Revert "Adwaita: unified sidebar styles"
...
Doing the same mistake twice :( Even margin is eating from the container,
not expanding outside of it.
This reverts commit 6be575992f
.
2020-11-20 13:24:23 +01:00
Jakub Steiner
b84945e43f
Merge branch 'wip/jimmac/sidebar-backdrop' into 'master'
...
Adwaita: don't backdrop labels
Closes #3377
See merge request GNOME/gtk!2868
2020-11-20 12:08:59 +00:00
Jakub Steiner
b3dba1dca6
Adwaita: avoid clipping menu shadows
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1987
2020-11-20 13:04:04 +01:00
Jakub Steiner
060cfc713f
Merge branch 'wip/jimmac/unified-sidebar-styles' into 'master'
...
Adwaita: unified sidebar styles
Closes #3382
See merge request GNOME/gtk!2871
2020-11-20 11:40:30 +00:00
Jakub Steiner
6be575992f
Adwaita: unified sidebar styles
...
- stacksidebar focus, separation and color as everything else
- eliminate placessidebar double padding
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-20 12:24:40 +01:00
Jakub Steiner
4bec75c66b
Adwaita: don't backdrop labels
...
- instead of overriding :backdrop for sidebars, continue pursuing
not to backdrop anything but headerbar items and buttons.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3377
2020-11-20 09:34:23 +01:00
Matthias Clasen
8e4cc59a7a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2870
2020-11-20 02:02:10 +00:00
Matthias Clasen
c17227966d
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtk/main: Do not unset active state on button release w/o implicit grab
See merge request GNOME/gtk!2869
2020-11-20 01:46:03 +00:00
Matthias Clasen
a2ce6268b2
gtk-demo: Make a more interesting constraints demo
...
Show various ways to influence spacing. This is more or
less modeled on the way Androids constraint layout lets
you set up 'chains'.
2020-11-19 20:35:15 -05:00
Carlos Garnacho
5ab14ff7f6
gtk/main: Do not unset active state on button release w/o implicit grab
...
If an active grab gets undone on button press (e.g. closing a menu), we
will receive a button release on the new target even though it didn't handle
the button press, and disable ::active state.
This causes warnings when handling the button release, as it tries to undo
::active state that is not really there.
In order to fix this, check that the pointer focus actually had an implicit
grab at the time of receiving the button release, before trying to unset
the ::active state.
2020-11-19 22:58:14 +01:00
Emmanuele Bassi
8482b956d6
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2867
2020-11-19 16:37:58 +00:00
Matthias Clasen
562c7b1ff3
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
GTK4: various fixes
See merge request GNOME/gtk!2864
2020-11-19 16:05:47 +00:00
Jakub Steiner
8099de22f9
Merge branch 'wip/jimmac/industrial-style-menuitems' into 'master'
...
Adwaita: revert edge-to-edge menuitems
Closes #3366
See merge request GNOME/gtk!2866
2020-11-19 15:52:25 +00:00
Emmanuele Bassi
a4c3bee4a1
a11y: Hide children of GtkFishBowl
...
The fishbowl widget is purely presentational, and its children should
not be visible in the accessibility tree.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
5afa985e85
demo: Make GtkFishBowl a presentation widget
...
It has no accessible content, even if it displays widgets.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
e600a07237
a11y: Skip atspi.Cache signals for hidden elements
...
If the accessible object is hidden, we can skip the emission of the
AddAccessible and RemoveAccessible signals on the cache, as those
objects won't be visible in the accessibility tree.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
8fa58c2e17
a11y: Get the accessible role once
...
Simplify getting the accessible role when checking if an accessible
implementation should present itself; this avoids going through
GtkAccessible twice to get the same data.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
d436c2e839
a11y: Remove weak ref from atspi.Cache
...
The GtkAtSpiContext is responsible for removing itself from the root,
which will remove itself from the cache. Any code path that leads to the
GtkAtSpiContext instance being collected passes through the
unrealization phase, which will also unregister the context from the
accessibility bus and from the cache.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
b37634dcd5
a11y: Add a fallback for the root base path
...
In case g_get_prgname() returns NULL, which seems to be the case for the
GTK tests.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
2d636fdda0
a11y: Reuse the generated AT-SPI interface name
...
We already have the name available.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
28095641c5
a11y: Use the appropriate GVariant for cache signals
...
We need to wrap the argument for AddAccessible and RemoveAccessible into
a tuple, as that's what GDBus expects.
2020-11-19 12:14:55 +00:00
Jakub Steiner
d58b06ceeb
Adwaita: revert edge-to-edge menuitems
...
- use the old Industrial style menuitems to make the design feel purposeful
- adjust corners to have compatible border-radii of child elements
- include sidebars and navigation sidebars to look consistent
(plus the assistant sidebar)
Implements https://gitlab.gnome.org/GNOME/gtk/-/issues/3366
2020-11-19 11:16:28 +01:00
Christian Hergert
0d2ea14ac1
types: fix various use of volatile in type registration
...
The use of volatile was incorrect in GLib and has been that way for
a long time. Recently however that has changed, and this makes GTK
follow suit to avoid using volatile in the type registration.
See also: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
Combined with the above merge request for GLib, this fixes a large
number of compilation warnings when using Clang.
2020-11-18 20:21:33 -08:00
Christian Hergert
82b4c34eca
gl: add some debugging information to DEBUG_OPS
2020-11-18 20:16:40 -08:00
Christian Hergert
ee47ddf5fd
lpr: fix cast warning
2020-11-18 20:16:40 -08:00
Christian Hergert
f32ae2964a
macos: fix various compiler warnings
2020-11-18 20:16:37 -08:00
Christian Hergert
eae5eaeb21
gl: use glFramebufferTexture2D to set framebuffer texture
...
When mapping a texture to the framebuffer, we can use the 2D
form instead of the cube mapping form.
2020-11-18 20:09:01 -08:00
Matthias Clasen
09fd2d61c4
gtk-demo: Rename some demos
...
This is just to make it easier for myself to
find the right sources.
2020-11-18 18:58:45 -05:00
Matthias Clasen
86d7ab7c50
docs: Update GtkSensitivityType docs
...
Don't talk about steppers here, since we are only using
this type for combobox buttons nowadays.
2020-11-18 18:18:31 -05:00
Matthias Clasen
88be92ceee
scrollbar: Don't talk about steppers
...
There steppers were lost on the way from GtkRange
to GtkScrollbar, so don't talk about them in the docs.
2020-11-18 17:27:13 -05:00
Matthias Clasen
04c4b387a0
gtk-demo: Add more keywords
...
Add GtkShortcutController as a keyword to some demos that
show its use.
2020-11-18 10:48:57 -05:00
Matthias Clasen
7551f85d4c
Merge branch 'wayland-minimize' into 'master'
...
wayland: Implement minimization
Closes #2688
See merge request GNOME/gtk!2861
2020-11-18 14:23:56 +00:00
Matthias Clasen
184886f893
Merge branch 'constraint-editor-work' into 'master'
...
Constraint editor work
See merge request GNOME/gtk!2863
2020-11-18 12:19:07 +00:00
Matthias Clasen
36ef94b002
constraint-editor: Fix creating constant constraints
...
We were not making the button sensitive in the case
of a constant constraint, and we were not properly
creating constant constraints either.
2020-11-17 23:16:57 -05:00
Matthias Clasen
831ebe3ef2
constraint-editor: Fix saving of constraints
...
g_file_replace_contents take a gsize, so passing -1
for string length does not work here.
2020-11-17 23:14:29 -05:00
Matthias Clasen
76b8676955
constraintlayout: Fix parsing of constant constraints
...
We were inadvertently turning constant constraints into
constraints against super, due to confusion between target
and source attribute.
2020-11-17 23:11:16 -05:00
Matthias Clasen
b3243132a0
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix rendering artifacts with hover transitions
See merge request GNOME/gtk!2862
2020-11-18 03:04:01 +00:00
Matthias Clasen
de461712a1
constraint-editor: Improve display of constraints
...
No need to go for ALGOL60 style operators when we
have Unicode.
2020-11-17 21:52:15 -05:00
Christian Hergert
dd7f52c59a
macos: fix rendering artifacts with hover transitions
...
Using an image surface seems to fix some rendering artifacts when
performing cross-fade CSS transitions.
2020-11-17 18:20:55 -08:00
Matthias Clasen
3f1bc740e4
wayland: Implement minimization
...
Use the set_minimized method of the xdg_toplevel
interface to implement minimization as well as possible.
It is not possible, since there is no corresponding
state that we could use to update our surface state,
but in practice, it works well enough.
Fixes : #2688
2020-11-17 19:57:56 -05:00
Matthias Clasen
9128ad105b
Merge branch 'wip/carlosg/for-master' into 'master'
...
gdk/wayland: Update to gtk_shell1 version 3
See merge request GNOME/gtk!2860
2020-11-18 00:13:17 +00:00
Carlos Garnacho
745cbc6c91
gdk/wayland: Update to gtk_shell1 version 3
...
Bring in line with gtk3, in terms of startup notification and
activation support.
2020-11-18 00:41:46 +01:00
Matthias Clasen
b635736ac2
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
node-editor: fix length of text during save
See merge request GNOME/gtk!2859
2020-11-17 22:49:05 +00:00
Matthias Clasen
ba081bf119
Merge branch 'fix-doc-packtype' into 'master'
...
doc: Adapt GtkPackType documentation to GTK4 changes
See merge request GNOME/gtk!2858
2020-11-17 22:46:43 +00:00
Christian Hergert
3003f37e9d
node-editor: fix length of text during save
...
The length parameter for g_file_replace_contents() is a gsize, so -1 is
unsuitable here. Just use strlen() directly.
2020-11-17 14:34:11 -08:00
Matthias Clasen
c1e05e7c52
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3278
See merge request GNOME/gtk!2856
2020-11-17 19:25:05 +00:00
Matthias Clasen
6b475aacd2
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
inspector: handle differences in DPI between backends
See merge request GNOME/gtk!2857
2020-11-17 19:24:47 +00:00
vanadiae
bc4969ec42
doc: Adapt GtkPackType documentation to GTK4 changes
...
Since GTK4, the functions that used the GtkPackType enumeration,
`gtk_box_pack_{start,end}`, were replaced by `gtk_box_{append,prepend}`,
hence this enumeration isn't used anymore by any function within the
GtkBox type, and the child packing properties were also removed for GTK4.
So this commit adapts the documentation accordingly.
2020-11-17 20:19:16 +01:00
Benjamin Otte
1c7daece7a
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2855
2020-11-17 19:08:01 +00:00
Christian Hergert
37a8c138f9
inspector: handle differences in DPI between backends
...
This fixes an issue on macOS where the text gets much larger once opening
the inspector.
2020-11-17 10:45:25 -08:00
Matthias Clasen
34d547a2aa
inspector: Limit the width of readonly properties
...
For readonly properties, we show the serialized value
in a label. If we don't take precautions, this can cause
our window to grow extremely wide, and break things.
So, ellipsize things at a reasonable size.
Fixes : #3278
2020-11-17 13:36:57 -05:00
Benjamin Otte
163c04c101
snapshot: Add cleanup function to snapshot state
...
Otherwise we're leaking data in error cases.
2020-11-17 19:04:39 +01:00
Benjamin Otte
f2284ff40f
rendernode: Rename all gsk_render_node_peek_*() functions
...
Those are getters, they should be gsk_render_node_get_*() functions.
2020-11-17 19:04:39 +01:00
Benjamin Otte
eded9459df
tests: Fix for new tranfer behavior of constructors
...
We were still unreffing a listmodel where the reference wasn't ours
anymore.
2020-11-17 19:04:39 +01:00
Benjamin Otte
8fd1530848
testsuite: Make defaultvalue test always get the property
...
Make the test not skip properties completely, just skip checking the
property.
This caught the last 2 commits.
2020-11-17 19:04:39 +01:00
Benjamin Otte
77f9efa747
textbuffer: Remove unused properties
...
The getters and setters were removed in
f53848c360
but the pspecs were forgotten.
2020-11-17 19:04:39 +01:00
Benjamin Otte
109ec523cb
shortcut: Actions are objects
2020-11-17 19:04:39 +01:00
Emmanuele Bassi
5cc5022a8f
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: bring forward quartz search engine updates
See merge request GNOME/gtk!2854
2020-11-17 17:58:14 +00:00
Emmanuele Bassi
3c769bb11d
Merge branch 'ebassi/inout-args' into 'master'
...
Remove pointless inout arguments
See merge request GNOME/gtk!2853
2020-11-17 17:40:13 +00:00
Christian Hergert
33b07e4825
macos: bring forward quartz search engine updates
...
These were not cherry picked after GTK branched for 4 development.
2020-11-17 09:37:13 -08:00
Matthias Clasen
714e5c72f6
docs: Add details about plain builds
...
Mention that build type 'plain' puts the responsibility
for debug features into the hands of the builder.
Related: !2831
2020-11-17 12:21:29 -05:00
Emmanuele Bassi
153c6424d3
Remove pointless inout arguments
...
GtkTreeView.get_tooltip_context() takes an inout X and Y coordinates,
but the "out" side is a side effect: the conversion from widget-relative
to bin window-relative coordinates is not documented, and can be done
using public API, if needed.
GtkIconView.get_tooltip_context() follows the same pattern, and takes
two inout arguments for the coordinates, but it does not change them any
more, after GtkIconView's bin window was dropped in commit 8dc5e13e
.
There's really no point in having these `inout` arguments, and while
GtkTreeView and GtkIconView are certainly de-emphasised in GTK4, and we
nudge developers to move to the new list views, we should take advantage
of the API break to remove warts.
2020-11-17 16:38:12 +00:00
Emmanuele Bassi
b76e514322
Merge branch 'ebassi/for-master' into 'master'
...
Introspection fixes
Closes #3281
See merge request GNOME/gtk!2852
2020-11-17 16:04:03 +00:00
Jakub Steiner
1501aa0603
Revert "Adwaita: avoid clipping menu/popover shadow"
...
There are big side effects to adding padding around all menus and popovers.
https://gitlab.gnome.org/GNOME/gtk/-/issues/1987#note_963889
This reverts commit d266bd62de
.
2020-11-17 16:53:32 +01:00
Emmanuele Bassi
cf5a173a4f
Add type annotations for GtkShortcutAction types
...
The constructors and singleton getters need proper annotations for their
return type, given that we return a base type.
2020-11-17 14:17:26 +00:00
Matthias Clasen
2b8c3731c1
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2851
2020-11-17 14:12:23 +00:00
Emmanuele Bassi
ade2f1030a
Annotate GdkTimeCoord's array field
...
We need to resolve the array length manually, because g-ir-scanner
cannot turn an enumeration member into a constant size.
2020-11-17 14:07:11 +00:00
Emmanuele Bassi
4f12df5f1c
Annotate the return type for GtkTreeExpander.get_item()
...
We use gpointer for C convenience, but the returned value is really a
GObject.
2020-11-17 13:54:22 +00:00
Emmanuele Bassi
9941799449
Annotate out argument for gdk_popup_layout_get_offset()
2020-11-17 13:52:15 +00:00
Emmanuele Bassi
5a938ad83d
Annotate the gsk_border_node_peek_widths() return value
...
We return a fixed sized C array of floats.
2020-11-17 13:48:07 +00:00
Matthias Clasen
835c807d7a
widget-factory: Remove an unused size group
...
This was left behind when 361407201b
removed
the unused popover that this size group applied to.
2020-11-17 07:34:53 -05:00
Matthias Clasen
2ef72442ec
docs: Fix the links for keybinding signals
...
GtkBindingSignal does not exist anymore, so link to
GtkSignalAction for an explanation of keybinding signals.
2020-11-17 07:34:52 -05:00
Matthias Clasen
3bc2bf40a8
popover: Document signals
2020-11-17 07:34:52 -05:00
Matthias Clasen
cd4c0b6127
menubutton: Fix a gtk-doc complaint
2020-11-17 07:34:52 -05:00
Matthias Clasen
fa79e8651e
gtk: Fix a doc oversight
2020-11-17 07:34:52 -05:00
Matthias Clasen
9a29487e25
gsk: Fix a doc oversight
2020-11-17 07:34:52 -05:00
Matthias Clasen
fceff93994
Merge branch 'fix-gi-warning' into 'master'
...
Fix a warning caused by difference between prototype and definition
See merge request GNOME/gtk!2849
2020-11-17 12:31:36 +00:00
Matthias Clasen
acd8b08d35
Merge branch 'wip/exalm/caption' into 'master'
...
widget-factory: Fix caption style class name
See merge request GNOME/gtk!2850
2020-11-17 12:22:29 +00:00
Alexander Mikhaylenko
2abee57421
widget-factory: Fix caption style class name
...
It's lowercase.
2020-11-17 13:16:47 +05:00
Qiu Wenbo
437f902c9d
Fix a warning caused by difference between prototype and definition
...
This commit fix the warning:
../gdk/wayland/gdkdisplay-wayland.c:1079: Warning: GdkWayland: gdk_wayland_display_set_cursor_theme: unknown parameter 'name' in documentation comment, should be 'theme'
2020-11-17 14:59:14 +08:00
Matthias Clasen
a7befc647e
Merge branch 'gsk-binding-api' into 'master'
...
gsk: Avoid using gtk css types in public api
Closes #2454
See merge request GNOME/gtk!2848
2020-11-17 05:36:15 +00:00
Matthias Clasen
121e61cf01
gsk: Avoid using gtk css types in public api
...
Using GtkCssSection in public headers here may be
ok from the C perspective, since it all ends up in
the same library anyway. But it causes circular
dependency problems for our gir files that are still
split by namespace.
To avoid this problem, copy the GtkCssLocation struct
struct as GskParseLocation, and pass take two of them
instead of a GtkCssSection in the error callback.
Update all users.
Fixes : #2454
2020-11-16 23:27:44 -05:00
Matthias Clasen
f7ac13b78f
Merge branch 'matthiasc/for-master' into 'master'
...
popover: Fix submenu navigation
Closes #3301
See merge request GNOME/gtk!2847
2020-11-17 03:11:13 +00:00
Matthias Clasen
c2ae73f247
popover: Fix submenu navigation
...
In commit 024d832d94
, we introduced a
cascade-popdown property that makes closing a submenu
propagate up and close its parent menus. This is the
behavior we want when a menuitem in the submen is
activated.
What we overlooked is that we still need to be able to
close a submenu during navigation, before opening another
one. And in this case, propagating the closing is breaking
things. Fix this by adding a private close_submenu api
to GtkPopoverMenu that avoids the propagation.
Fixes : #3301
2020-11-16 21:34:33 -05:00
Benjamin Otte
4b0b6100d6
build: Include GSK types in gtk_test_register_all_type()
2020-11-17 03:13:31 +01:00
Matthias Clasen
2c9bf55eea
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2846
2020-11-17 01:07:34 +00:00
Emmanuele Bassi
1d11d42aa0
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2840
2020-11-16 23:06:55 +00:00
Matthias Clasen
361407201b
widget-factory: Remove an unused popover
...
We are no longer using the hand-rolled variant of that
popover on page 3, so drop it from the ui file.
2020-11-16 15:22:12 -05:00
Matthias Clasen
50c29398e6
Merge branch 'wip/exalm/button' into 'master'
...
Allow pressing multiple buttons at once on touch
See merge request GNOME/gtk!2813
2020-11-16 20:16:10 +00:00
Jakub Steiner
dff8a9eb46
Merge branch 'wip/jimmac/popover-menu-submenus' into 'master'
...
Adwaita: fix up submenus again
See merge request GNOME/gtk!2845
2020-11-16 19:50:08 +00:00
Matthias Clasen
1bb4e660fd
Merge branch 'wip/chergert/for-master' into 'master'
...
gsk: use glFrameBufferTexture2D and release texture
See merge request GNOME/gtk!2842
2020-11-16 19:20:19 +00:00
Jakub Steiner
ded6ec6424
Merge branch 'wip/jimmac/circular-button-focus' into 'master'
...
Adwaita: circular button focus
Closes #3368
See merge request GNOME/gtk!2844
2020-11-16 18:55:30 +00:00
Jakub Steiner
47e49acc7d
Adwaita: fix up submenus again
...
- move menubar section under more generic popover.menu
rather than resort to specificity dir(ltr) hacks
2020-11-16 19:48:11 +01:00
Jakub Steiner
0996b178dc
Adwaita: circular button focus
...
- have the same focus look like the other items
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3368
2020-11-16 19:11:52 +01:00
Matthias Clasen
4befd13744
Merge branch 'wip/jimmac/spinbutton-spacing' into 'master'
...
Adwaita: spinbutton spacing
Closes #3370
See merge request GNOME/gtk!2841
2020-11-16 17:50:56 +00:00
Emmanuele Bassi
bb1463871c
a11y: Ensure valid object paths in the fallback code
...
When falling back to using the program name to create a unique base path
for the objects on the accessibility bus we need to ensure that the name
is a valid DBus object path.
2020-11-16 17:47:15 +00:00
Christian Hergert
12a9164414
gsk: use glFrameBufferTexture2D and release texture
...
glFrameBufferTexture maps to all faces of a cube and that is not needed
here. Additionally, texture_id is not deleted after we use the additional
flipped texture, but should be.
2020-11-16 09:26:07 -08:00
Jakub Steiner
108fe033aa
Adwaita: spinbutton spacing
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3370
2020-11-16 18:22:17 +01:00
Emmanuele Bassi
9de2b4b0e1
a11y: Implement atspi.Cache
...
The AT-SPI cache interface is used to quickly populate the accessible
objects tree.
The tricky bit is ensuring that we emit change notifications on the
cache only when the cache is available, which means waiting until the
root is asynchronously registered.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
ee056fd8bd
a11y: Update the Cache interface introspection
...
The type for cached items is, unsurprisingly, wrong when compared to the
implementation inside atk-spi2-atk.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
bc4f71a107
a11y: Add getters for GtkAtSpiContext
...
We are going to use them in order to implement atspi.Cache.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
125442297f
a11y: Use the tab widget to label the notebook stack page
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
eec92b40ea
a11y: Compute the base path in the root object
...
The root path is shared by all AtSpiContext instances, so we should
compute it once, instead of every time we instantiate a new context.
This allows us to defer the path creation at realization time and ensure
that we have a registered application.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
d392f6f2a4
a11y: Resync the AT-SPI XML
...
Mostly just changes in the annotations coming from at-spi2-core, but
it's good to try and keep the XML in sync.
2020-11-16 16:44:56 +00:00
Jakub Steiner
41a9c46ec8
Merge branch 'wip/jimmac/circular-button-padding' into 'master'
...
Adwaita: circular buttons
See merge request GNOME/gtk!2838
2020-11-16 14:50:16 +00:00
Matthias Clasen
0530aeec17
docs: Mention cairo-gobject as build requires
...
Using cairo from a system dependency and cairo-gobject
as subproject is problematic and left me stuck on a
hard-to-understand build error.
2020-11-16 09:31:23 -05:00
Jakub Steiner
22741a74ff
Adwaita: circular buttons
...
- the vertical padding was thown off with the chin/forehead of menus removed
2020-11-16 15:21:46 +01:00
Jakub Steiner
23331c1919
Merge branch 'wip/jimmac/menu-clipped-shadow' into 'master'
...
Wip/jimmac/menu clipped shadow
Closes #1987
See merge request GNOME/gtk!2837
2020-11-16 14:10:21 +00:00
Jakub Steiner
d266bd62de
Adwaita: avoid clipping menu/popover shadow
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1987
2020-11-16 14:20:24 +01:00
Matthias Clasen
57c95937b1
gsk: Fix some docs oversights
...
These apis have been renamed a few times, and the docs
haven't kept up.
2020-11-16 07:44:41 -05:00
Matthias Clasen
1d86086434
gdk: Docs cosmetics
...
Add a few missing parameters in doc comments.
2020-11-16 07:44:17 -05:00
Matthias Clasen
e2f26b0d9a
docs: Fix a typo
2020-11-16 07:37:33 -05:00
Matthias Clasen
7816fc2b83
docs: Remove gtk_render_insertion_cursor
...
This function was removed in 2bcef7f030
.
2020-11-16 07:35:41 -05:00
Jakub Steiner
04d802f7f4
Adwaita: remove chin on menus
...
- clipping a rounded corner seems to be working fine for first and last item.
Addresses https://gitlab.gnome.org/GNOME/gtk/-/issues/3366
2020-11-16 13:31:27 +01:00
Jakub Steiner
994cc32d7b
Merge branch 'wip/jimmac/subtle-sidebar' into 'master'
...
Adwaita: navigation sidebar color changes
Closes #3362
See merge request GNOME/gtk!2836
2020-11-16 09:34:36 +00:00
Jakub Steiner
f14ca28c4e
Adwaita: navigation sidebar color changes
...
- use more subtle selected state grey
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3362
2020-11-16 10:17:57 +01:00
Matthias Clasen
da9d32e472
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2835
2020-11-16 04:29:10 +00:00
Matthias Clasen
08d6db4ab6
gtk-demo: Plug a memory leak
...
The Characters demo was leaking its columns.
2020-11-15 23:03:30 -05:00
Matthias Clasen
6891f40110
modelbutton: Fix keynav for check and radio
...
The expected behavior when activating check or radio
menuitems via keynav is that Space toggles the item
but keeps the menu open, while Return toggles the
item and closes the menu.
2020-11-15 21:52:07 -05:00
Matthias Clasen
cdbf24c3af
Merge branch 'fix-tooltip-trigger' into 'master'
...
Fix tooltip triggering
See merge request GNOME/gtk!2833
2020-11-15 17:37:47 +00:00
Matthias Clasen
b30715da6a
Fix tooltip triggering
...
Ever since 5b5d2665d3
, tooltips don't work properly,
since we get more motion events now, and those keep the
tooltips from appearing. This can be seen e.g. on the icon
in the password entry in widget-factory, or on the section
switcher buttons in the Emoji chooser.
Ignore synthetic motion events for the purposes of
determining whether the user moved the mouse.
2020-11-15 10:54:36 -05:00
Emmanuele Bassi
5e9883453d
Merge branch 'widget-no-a11y-crash' into 'master'
...
gtkwidget: fix crashes with GTK_A11Y=none
Closes #3333
See merge request GNOME/gtk!2834
2020-11-15 15:23:42 +00:00
Christoph Reiter
b97b95b0c7
gtkwidget: fix crashes with GTK_A11Y=none
...
at_context can be NULL in that case, so guard against it.
Fixes #3333
2020-11-15 15:59:31 +01:00
Matthias Clasen
dd0a854bbb
Merge branch 'button-fill-var-removal' into 'master'
...
Adwaita: Stop using $button_fill
Closes #3354
See merge request GNOME/gtk!2828
2020-11-15 13:45:42 +00:00
Matthias Clasen
b8d0ad8643
Merge branch 'parse-debug-env-vars-always' into 'master'
...
Always parse GTK/GDK/GSK_DEBUG env vars and make some entries available in non-debug mode
See merge request GNOME/gtk!2830
2020-11-15 13:37:44 +00:00
Christoph Reiter
65d57877a8
Revert "Update comment annotations of gtk_tree_model_iter_previous and gtk_tree_model_iter_next to state that the ITER parameter is modified."
...
This reverts commit 1340ff2bc2
.
Same as with 53cd499621
2020-11-15 13:36:42 +01:00
Christoph Reiter
afc73c38ce
Always parse GTK/GDK/GSK_DEBUG env vars and make some entries available in non-debug mode
...
Currently GTK can be built with G_ENABLE_DEBUG which enables various debug code and parsing
of those env vars, or without, which instead of parsing them prints a warning if they are set.
While building with G_ENABLE_DEBUG isn't strictly needed it's the only way to make GTK_DEBUG=interactive work,
which is a nice thing to have always.
This enables parsing of those env vars in any case and allows specific values being marked as also
available when not built with G_ENABLE_DEBUG (interactive for example). If not built with G_ENABLE_DEBUG
then all unavailable values will be marked as such in the help output and a note is added that
GTK needs to be built with G_ENABLE_DEBUG to use them, which should help discoverability.
2020-11-15 11:34:54 +01:00
Yuri Chornoivan
f4e1c271ea
Update Ukrainian translation
2020-11-15 08:01:26 +00:00
Matthias Clasen
8e42239439
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtk/main: Reset active state on grab broken only if implicit
See merge request GNOME/gtk!2832
2020-11-14 14:41:01 +00:00
Carlos Garnacho
5b4ac5456e
gtk/main: Reset active state on grab broken only if implicit
...
An implicit grab means some button is down, reset the active state
only in that case when we get a grab broken event.
Avoids active state accounting warnings when we do get active grabs
broken (e.g. after selecting a menu option).
2020-11-14 10:52:34 +01:00
nana-4
f1db73379e
Adwaita: Stop using $button_fill
...
Since the $button_fill variables are no longer used outside of the
button() mixin (and it was for an ugly hack), there is no need to keep
that anymore.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3354
2020-11-14 10:13:05 +09:00
Matthias Clasen
20918dbe8e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3359 and #3353
See merge request GNOME/gtk!2827
2020-11-14 00:15:34 +00:00
Matthias Clasen
b5ec20db88
Adwaita: Fix list separators
...
Commit bfe5b0d1b7
ran into some specificity
trouble.
Fixes : #3353
2020-11-13 17:18:05 -05:00
Matthias Clasen
d347df431d
label: Avoid short-circuiting
...
Commit 0db504edde
made a mistake described here:
https://en.wikipedia.org/wiki/Short-circuit_evaluation#Possible_problems
Fixes : #3359
2020-11-13 15:35:51 -05:00
Matthias Clasen
25e6988d95
Merge branch 'alatiera/nightly-demos' into 'master'
...
ci: publish demo apps to the Nightly repository
See merge request GNOME/gtk!2825
2020-11-13 19:28:44 +00:00
Matthias Clasen
a7f05b8d91
Merge branch 'wip/jimmac/tooltips' into 'master'
...
Adwaita: tooltip styling
Closes #3352
See merge request GNOME/gtk!2826
2020-11-13 19:23:58 +00:00
Jordan Petridis
fe690265eb
ci: publish demo apps to the Nightly repository
2020-11-13 20:38:09 +02:00
Jakub Steiner
f45ea3fa90
Adwaita: tooltip styling
...
- balance padding
- increase border radius, yuck
- get rid of text shadow
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3352
2020-11-13 19:36:26 +01:00
Jakub Steiner
bdc28cd870
Merge branch 'wip/jimmac/submenus' into 'master'
...
Wip/jimmac/submenus
See merge request GNOME/gtk!2824
2020-11-13 17:05:00 +00:00
Jakub Steiner
c648c1f235
Merge branch 'wip/jimmac/declare-buttonfill-once' into 'master'
...
Adwaita: double declated $button_fill
See merge request GNOME/gtk!2823
2020-11-13 16:57:18 +00:00
Jakub Steiner
8a92ee03ea
Adwaita: rounded submenus
...
- all corners have rounded corners
See https://gitlab.gnome.org/GNOME/gtk/-/issues/2745
2020-11-13 17:27:40 +01:00
Jakub Steiner
e3c72f8f09
Adwaita: double declared $button_fill
...
- this was already in place in _common, no need to have it in _colors
2020-11-13 17:24:13 +01:00
Jakub Steiner
1f472104ad
Adwaita: double declated $button_fill
...
- this was already in place in _common, no need to have it in _colors
2020-11-13 17:21:03 +01:00
Jakub Steiner
4b41580041
Merge branch 'wip/exalm/window' into 'master'
...
Round window corners
See merge request GNOME/gtk!1952
2020-11-13 15:33:15 +00:00
Matthias Clasen
c136f84584
Merge branch 'wip/carlosg/for-master' into 'master'
...
Improve handling of ::active with touch and multiple foci
Closes #3348
See merge request GNOME/gtk!2821
2020-11-13 04:13:34 +00:00
Carlos Garnacho
80de00a248
gtk/main: Stack ::active calls
...
We may have the situation of multiple touchpoints in the same
widget, or combinations with other devices. Stack those ::active
states are preserved on widgets on all but the last pointer/touch
going away.
2020-11-13 00:39:23 +01:00
Carlos Garnacho
50a7e59623
gtk/main: Toggle active flag with touch events
...
This went missing at some point, add the missing toggling of active
state with GDK_TOUCH_BEGIN/END/CANCEL events.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3348
2020-11-13 00:39:23 +01:00
Emmanuele Bassi
92ca3a3419
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2819
2020-11-12 22:22:20 +00:00
Emmanuele Bassi
8203d9cc40
a11y: Use GROUP role for ShortcutsShortcut
...
And hide the image from the accessible tree.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
abc9b403f8
a11y: Implement atspi.Text.ScrollSubstringTo for GtkTextView
...
We reuse the existing implementation in GTK3.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
b9ad3172a4
a11y: Document GtkRevealer's accessible state
...
Use the GROUP role, and make sure to note that the child is always
revealed. Unlike GtkExpander, GtkRevealer can only be programmatically
toggled, so we cannot turn it into a "button" object.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
0d7fcdda28
a11y: Add more accessible data to GtkTreeExpander
...
Document the role of the GtkTreeExpander, and the behaviour of the
expander button.
Additionally, improve the label of the expander button, by adding a
fixed "Expand" label, and setting the "labelled-by" relation to the
child of the GtkTreeExpander.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
75f9b83b1e
Establish a control relation between demo search and list
...
The search entry changes the content of the list view, so we should
mention that relation to assistive technologies.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
61e980bfb6
a11y: Add accessible actions to GtkSearchEntry
...
Just like GtkPasswordEntry, GtkSearchEntry should have its set of
accessible actions.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
ebda736a09
a11y: Mark SearchEntry icons as presentational
...
While the "clear the search entry" icon behaves like a button, we don't
have any actual action that can trigger it, so let's ignore it.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
d4ddfdc265
a11y: Set the role on GtkSearchBar
...
The search bar widget has a "SEARCH" landmark role, which is described
as:
A landmark region that contains a collection of items and
objects that, as a whole, combine to create a search facility.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
f8bb206034
a11y: Icons in buttons are presentational
...
Buttons are described by text, and the icon child can be safely ignored.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
87f92a93d3
a11y: Add more accessibility labels to GtkNotebook
...
Label the various components:
- the tab list
- the tab widget
- the arrow widgets
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
e49e084f4c
a11y: Use the stack page title as its accessible label
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
995daa1e29
a11y: GtkStack is a group of stack pages
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
d34936c1ea
Handle empty stack pages when creating an ATContext
...
If we don't have a widget inside GtkStackPage, we should use the default
GdkDisplay.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
a59889a274
Unrealize the ATContext in StackPage on dispose
...
Otherwise we're going to try to unrealize it during the GtkStack
destruction, which will emit warnings.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
bfb054a023
a11y: Icons in WindowControls are presentational only
...
They don't contribute anything to the accessible description.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
e940704018
a11y: Ignore more structural roles when computing labels
...
These roles should not have a fallback name when explicitly unlabelled.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
429c7fc039
a11y: Add role exception for GtkScrolledWindow
...
ARIA does not have a "scroll pane" role, but AT-SPI does.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
0d6e4f7a6e
demo: Add more accessibility labels to the UI
2020-11-12 21:46:05 +00:00
Matthias Clasen
1f9eb5c64c
Merge branch 'clear-search-entry' into 'master'
...
searchbar: Fix clearing search entry on hide
See merge request GNOME/gtk!2820
2020-11-12 19:25:57 +00:00
Florian Müllner
056a073061
searchbar: Fix clearing search entry on hide
...
Commit fa3d1940bf
added separate grab handling for GtkSearchEntry, but
didn't consider whether the bar was revealed or concealed. The expected
behavior for the latter is that the entry is cleared rather than focused,
fix the condition accordingly.
2020-11-12 19:59:55 +01:00
Alexander Mikhaylenko
e46522e4b5
theme: Round all window corners
2020-11-12 22:19:00 +05:00
Alexander Mikhaylenko
7ac7919697
theme: Restructure window style
2020-11-12 22:17:52 +05:00
Matthias Clasen
5d9799d4e3
Merge branch 'ebassi/for-master' into 'master'
...
ATContext lifetime fixes
Closes #3341
See merge request GNOME/gtk!2811
2020-11-12 12:35:23 +00:00
Jakub Steiner
f95943a752
Merge branch 'wip/jimmac/sassc-global-vars' into 'master'
...
Adwaita: avoid !global
See merge request GNOME/gtk!2816
2020-11-12 12:34:10 +00:00
Jakub Steiner
ef88e9ffcc
Adwaita: avoid !global
...
- Work around having !global variables as sassc will
no longer support it
2020-11-12 13:14:37 +01:00
Alexander Mikhaylenko
49613dca8e
button: Don't make the gesture exclusive
...
With the last commit, pressing the same button with multiple fingers
doesn't cause extra emissions, so we can remove exclusive and allow
pressing multiple buttons at once on touch.
2020-11-12 15:27:16 +05:00
Alexander Mikhaylenko
a651a0ce69
gestureclick: Only emit release for the same sequence
...
Avoid spurious releases when touching the same widget with another finger.
2020-11-12 15:26:36 +05:00
Emmanuele Bassi
08d59d3f68
docs: Add "Accessibility" section to various widgets
...
There are a few widgets that gained an accessible role, which means
adding an "Accessibility" section in their description.
2020-11-12 00:36:32 +00:00
Matthias Clasen
afff39c503
Merge branch 'suggestion-entry-demo2' into 'master'
...
gtk-demo: Add suggestion entry demos
See merge request GNOME/gtk!2812
2020-11-11 21:40:07 +00:00
Matthias Clasen
a2897e1868
gtk-demo: Add suggestion entry demos
...
Add a possible replacement for GtkEntryCompletion
as a demo.
Move the Dropdowns demo to Lists/Selections, and make
it show both GtkDropDown and the suggestion entry, with
some variations.
2020-11-11 15:54:43 -05:00
Matthias Clasen
15172ebdb0
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2810
2020-11-11 20:49:51 +00:00
Emmanuele Bassi
9ac4a7d99f
a11y: Simplify GtkModelButton
...
Instead of recreating GtkATContexts in order to change their role, we
can simply unrealize and realize them back.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
8157717e03
a11y: Add missing fallback for accessible-role getter
...
If the per-instance accessible role is unset, use the class role.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
9052f6dafe
a11y: Rework ownership and lifetime of GtkATContext
...
Now that GtkATContext is explicitly realized and unrealized, we should
always create an instance at widget initialization time, and drop it
during the widget finalization. This should make it easier to set up the
initial accessible state of a widget during the instance initialization,
as well as reduce the chances of accidental creation of GtkATContext
instances during the destruction sequence.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
292576f312
a11y: Defer to the GtkAccessible's implementation
...
Since GtkATContexts are now lazily realized, we need to go through the
GtkAccessible's implementation to access the :accessible-role property,
in case there are fallbacks.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
2285382074
a11y: Create AtSpiRoot on realization
...
There's no need to do a lot of work on construction, if we're delaying
all remote work after the GtkATContext is realized.
The GtkAtSpiContext should also keep a reference on the root, and drop
it at unrealize time.
2020-11-11 18:46:44 +00:00
Emmanuele Bassi
526f1e315b
a11y: Use GROUP role for GtkNotebook
...
A notebook is a grouping of a tab list, tabs, and tab pages.
2020-11-11 18:46:11 +00:00
Emmanuele Bassi
877a7f98ca
a11y: Protect should_present() from empty contexts
...
If the GtkAccessible implementation returns a NULL context, we should
not be calling methods on it.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
73b14a3c3a
a11y: Do not leak the ATContext in GtkStackPage
...
GtkStackPage is not a widget, so it must release the reference on the
ATContext it owns.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
40c0826921
a11y: Mark more containers as structural elements
...
Widgets that just provide grouping and layout to other widgets should
not be relevant to the accessible tree.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
27b9b2e76c
a11y: Use the window title as its label
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
04c4d293a7
a11y: Skip unlabelled structural roles
...
If a structural role is left unlabelled, just leave it unnamed.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
033791b374
a11y: Translate ARIA windows to AT-SPI frames
...
For backward compatibility with GTK3.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
95ee5ff424
a11y: Add more ARIA/AT-SPI role translations
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
65d29e00c7
a11y: Realize parent ATContext for the stack page
...
Just like for popovers, the stack page is not directly connected on the
widget's DOM, so we need to realize the parent ATContext ourselves.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
3b2cd972d5
a11y: Implement missing atspi.Component getters
...
Some of them are entirely innocuous, and we can easily provide values
that match what GTK3 provides.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
428ec29598
a11y: Unrealize ATContext on dispose()
...
By unrealizing the context we avoid additional work during the dispose
phase, in case widget code updates the accessible state. We use
GtkAccessible's API, to ensure we unrealize the right ATContext, instead
of the one we store inside GtkWidgetPrivate.
We drop the ATContext instance inside GtkWidget during finalization, to
mop up eventual vivifications there.
2020-11-11 18:33:15 +00:00
Matthias Clasen
bfe5b0d1b7
Adwaita: Don't do n-th child things for list rows
...
Making the list row child css depend on the position
is very expensive, and does not acutally work correctly
(since we don't have widgets for all children, so the
position of the child widget does not reflect the actual
model item position).
To make this more palatable, use the bottom border
instead of the top border, since most lists have a natural
border at the top (with headers), and may end up with
empty space at the bottom.
2020-11-11 13:18:08 -05:00
Matthias Clasen
82b855cc4b
label: Avoid a needless strdup
...
Don't duplicate the string before we know if it
has actually changed.
2020-11-11 12:24:35 -05:00
Matthias Clasen
0db504edde
label: Optimize GtkLabel setters
...
The overarching goal here is to not queue a resize
unless something has actually changed. In columnview
scenarios, we often deal with hundreds of labels.
Labels are cattle, not pets.
2020-11-11 11:48:27 -05:00
Matthias Clasen
5ed3ad6cc8
gtk-demo: Split off SvgPaintable
...
Put the SvgPaintable implementation into its
own source files, for ease of copying.
2020-11-11 10:35:54 -05:00
Matthias Clasen
27c4c19333
Don't hide widgets in dispose()
...
This is leftover code from when widgets were hidden
by default, and was setting them back to their initial
state.
This is getting in the way now, as hiding the widget
updates the HIDDEN accessible state, which ends up
re-creating the at context that we've already disposed
of, leading to memory leaks.
2020-11-11 10:35:54 -05:00
Matthias Clasen
74a7f73239
Merge branch 'matthiasc/builder-requires' into 'master'
...
Matthiasc/builder requires
See merge request GNOME/gtk!2806
2020-11-11 03:53:52 +00:00
Matthias Clasen
a047b7d6d1
Merge branch 'fix-demos-wo-pangoft2' into 'master'
...
gtk-demo: Fix building scrolling demo without PangoFT2
See merge request GNOME/gtk!2807
2020-11-11 03:50:46 +00:00
Chun-wei Fan
a76f37a501
gtk-demo: Fix building scrolling demo without PangoFT2
...
For builds that do not have PangoFT2, the demo fails to link because we weren't
building listview_ucd.c. Fix the build by building listview_ucd.c with
script-names.c and unicode-names.c for all builds, as we now require a Pango
version that already always depends on HarfBuzz and those sources do not use
anything from PangoFT2.
2020-11-11 11:15:05 +08:00
Matthias Clasen
d6a0948182
testsuite: Update buildertool tests
...
gtk-builder-tool simplify --3to4 now produces a
<requires lib="gtk" version="4.0"/>.
Adapt for that, and also add some tests that check that we
actually verify the requires, and accept 3.99 and 4.0, but
not 5.x.
2020-11-10 19:20:51 -05:00
Matthias Clasen
7215c74933
buildertool: Supplant a requires
...
When we convert a ui file to GTK 4 syntax, we *know*
that it requires GTK 4, so put that in the output.
2020-11-10 19:19:40 -05:00
Matthias Clasen
e4be785c6c
builder: Be a bit more strict about requires
...
Check that the major version matches (without this, the
requires check is really toothless), but allow 3.99 to
match 4.0.
2020-11-10 19:18:26 -05:00
Matthias Clasen
18779b9d67
testsuite: Remove <requires> from ui files
...
We don't need these here, the testsuite is shipped
with GTK.
2020-11-10 19:17:45 -05:00
Matthias Clasen
9b056f57f7
examples: Remove requires from ui files
...
No need to check requires for things that are shipped
with GTK.
2020-11-10 18:38:54 -05:00
Matthias Clasen
d6c753bde7
gtk4-demo: Remove <requires> from ui files
...
No need to check requires for things that are shipped
with GTK.
2020-11-10 18:37:40 -05:00
Matthias Clasen
d69a943661
gtk: Remove <requires> from ui files
...
We don't need to check requirements for things
that are shipped *with* gtk.
2020-11-10 18:36:03 -05:00
Matthias Clasen
0ececc7109
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #3343 and #3342
See merge request GNOME/gtk!2804
2020-11-10 18:33:36 +00:00
Matthias Clasen
3cc0870084
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2805
2020-11-10 16:59:47 +00:00
Emmanuele Bassi
2229d7f66c
docs: Add example of relations with lists of references
2020-11-10 14:38:09 +00:00
Emmanuele Bassi
ed7619ec16
a11y: Clone GtkATContext in GtkModelButton
...
The hypothetical widget that needs to clone ATContext instances
because it needs to control the accessible role post-construction is
really GtkModelButton.
Fixes : #3342
2020-11-10 14:31:57 +00:00
Emmanuele Bassi
7ed06480cf
a11y: Add private API to clone a GtkATContext
...
Some widgets might want to override GtkAccessible and create their own
context in order to control the accessible role post-construction time.
To avoid explicitly copying the existing state over from the original
ATContext to the new one, we need a way to clone the context's state
from inside the ATContext itself.
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
f9db651f32
a11y: Do not copy the list of references
...
The constructor for GtkReferenceListAccessibleValue is transfer full,
which means we should not be copying the GList around.
Fixes : #3343
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
c264254d4b
a11y: Parse reference lists using varargs
...
Using GList is a bit lame, and makes the API more complicated to use
than necessary in the common case.
The only real use case for a GList is gtk_widget_add_mnemonic_label(),
and for that we can use the GValue-based API instead.
Fixes : #3343
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
6af89e9034
a11y: Add GValue initializers for accessible attributes
...
Consumers of the GValue-based API for GtkAccessible need to have a way
to initialize the GValue with the correct type for the given attribute.
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
1bdc8b9061
a11y: Proxy GtkWidget:accessible-role
...
The accessible-role property in GtkWidget has three possible targets:
- the :accessible-role of a GtkATContext, if realized
- the accessible_role field of GtkWidgetPrivate
- the accessible_role field of GtkWidgetClassPrivate
When we set the accessible role of a widget using the GObject property
mechanism, we want to either set the GtkWidgetPrivate.accessible_role
field, if there's no ATContext *or* if the ATContext is not realized.
Conversely, when we get the accessible-role property we want to have a
series of fallbacks in place:
- if GtkAccessible.get_at_context() returns an ATContext, and that
ATContext is realized, return the :accessible-role of the context
- if GtkWidgetPrivate.accessible_role is not WIDGET, return the
stored accessible role
- return GtkWidgetClassPrivate.accessible_role
This should help catch the case of getting the accessible role of
widgets that override GtkAccessible.get_at_context(), like
GtkModelButton.
See: #3342
2020-11-10 14:31:56 +00:00
Matthias Clasen
c442f9f05a
printdialog: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:54 -05:00
Matthias Clasen
6cbd7e29dd
fontchooser: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:40 -05:00
Matthias Clasen
6079033cde
columnview: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:22 -05:00
Matthias Clasen
d63afaf5ad
x11: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:01 -05:00
Matthias Clasen
7e089664fc
win32: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:06:37 -05:00
Matthias Clasen
06fbad0b26
wayland: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:05:55 -05:00
Yuri Chornoivan
2a3c3b4c6a
Update Ukrainian translation
2020-11-10 08:15:59 +00:00
Yuri Chornoivan
eb3933cffd
Update Ukrainian translation
2020-11-10 07:58:38 +00:00
Matthias Clasen
d1de9234c5
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2803
2020-11-10 04:47:28 +00:00
Matthias Clasen
3e8260d528
gtk-demo: Plug a memory leak
2020-11-09 23:29:03 -05:00
Matthias Clasen
192f515682
gtk-demo: Tweak a demo title
2020-11-09 23:28:45 -05:00
Matthias Clasen
2543c9f5a3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2802
2020-11-10 01:42:30 +00:00
Matthias Clasen
a745dbfc15
gkt-demo: Add a columview to the scroll demo
...
This is an interesting case, since it has many labels,
and we are struggling to provide good scrolling performance.
2020-11-09 20:07:09 -05:00
Matthias Clasen
14be50839e
gtk-demo: Improve consistency
...
Make the shortcut triggers demo big enough
to not ellipsize the window title.
2020-11-09 19:54:17 -05:00
Matthias Clasen
a85d9cda07
gtk-demo: Improve consistency
...
Make the paintable svg demo follow the same
pattern we use for other demos.
2020-11-09 19:53:44 -05:00
Matthias Clasen
7d49f1e250
gtk-demo: Improve consistency
...
Make the paintable emblems demo follow the same
pattern we use for other demos.
2020-11-09 19:52:28 -05:00
Matthias Clasen
6fa2936956
gtk-demo: Set default size for drawingarea demo
...
Set a default size, so we don't ellipsize the window
title when the window is presented.
2020-11-09 18:50:43 -05:00
Matthias Clasen
b81463e7d3
gtk-demo: Plug a memory leak
2020-11-09 18:48:10 -05:00
Matthias Clasen
b622745501
gtk-demo: Plug a memory leak
2020-11-09 18:48:10 -05:00
Matthias Clasen
5379a4bf34
a11y: Clean up properly in unregister_object
...
Things that are set up in register_object should
be cleaned up in unregister_object.
2020-11-09 18:48:10 -05:00
Matthias Clasen
b966f593a5
Merge branch 'wip/jimmac/search-entry-icon' into 'master'
...
search entry: icon
Closes #3340
See merge request GNOME/gtk!2801
2020-11-09 22:41:41 +00:00
Jakub Steiner
706a8f9784
search entry: icon
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3340
2020-11-09 22:55:21 +01:00
Matthias Clasen
2dc7e327ad
Merge branch 'ebassi/for-master' into 'master'
...
docs: Add missing a11y environment variables
See merge request GNOME/gtk!2788
2020-11-09 17:19:12 +00:00
Matthias Clasen
7b151c3ef0
Merge branch 'kinetic-scroll-velocity-accumulation' into 'master'
...
scrolledwindow: Accumulate velocity with kinetic scrolling
See merge request GNOME/gtk!2768
2020-11-09 17:14:03 +00:00
Emmanuele Bassi
0af6630521
a11y: Consolidate accessibility environment variables
...
Use a single environment variable for everything:
- select the ATContext implementation
- select the test ATContext
- disable ATContext entirely
We use the same pattern as GSK_RENDERER, GTK_DEBUG, etc.
The documentation needs to be updated to include the environment
variable.
2020-11-09 16:21:49 +00:00
Chris Lord
4b459a99be
scrolledwindow: Accumulate velocity with kinetic scrolling
...
Accumulate existing velocity when decelerating from a swipe if the swipe
velocity is above a certain fraction of that existing velocity.
2020-11-09 15:28:32 +00:00
Matthias Clasen
e093ed7d67
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3337
See merge request GNOME/gtk!2799
2020-11-09 14:21:26 +00:00
Matthias Clasen
ddbea8feda
Remove GtkPlacesOpenFlags from public headers
...
The GtkPlacesOpenFlags enum is only used in private
API, so move it to private headers. Since we still need
a GType for it, add gtkplacessidebarprivate.h to the
headers we use for generating private enum types. In turn,
this registers the other private enums in that header, so
take the opportunity to fix their naming, and use the
generated types for the corresponding sidebarrow properties.
Fixes : #3337
2020-11-09 08:45:36 -05:00
Matthias Clasen
6b5dff5667
docs: Document GTK_MEDIA
...
Add a paragraph about the GTK_MEDIA environment variable.
2020-11-08 09:58:26 -05:00
Matthias Clasen
53cd499621
Revert "Update gtktreestore.c: gtk_tree_store_remove didn't have the proper comment annotation"
...
This reverts commit 32baa0a549
.
See discussion in https://gitlab.gnome.org/GNOME/gtk/-/issues/78
for the background.
2020-11-07 21:36:34 -05:00
Matthias Clasen
30c5a6f79c
Merge branch 'patch-3' into 'master'
...
gtk/gtktextbuffer: remove GtkTextBufferTargetInfo
See merge request GNOME/gtk!2797
2020-11-08 01:11:26 +00:00
Emmanuele Bassi
4e1191550c
Merge branch 'patch-4' into 'master'
...
gtk/gtkversion: fix doc comment references
See merge request GNOME/gtk!2798
2020-11-08 00:50:40 +00:00
David Lechner
3b1363d31a
gtk/gtkversion: fix doc comment references
...
Cross-references for constants use the "%" prefix rather than the "#" prefix.
2020-11-07 23:57:13 +00:00
David Lechner
160e29ea95
gtk/gtktextbuffer: remove GtkTextBufferTargetInfo
...
GtkTextBufferTargetInfo is not used anywhere and can be removed.
2020-11-07 22:29:11 +00:00
Emmanuele Bassi
b9adad304e
Merge branch 'patch-6' into 'master'
...
gtk/enums: remove GtkPopoverConstraint
See merge request GNOME/gtk!2796
2020-11-07 22:19:33 +00:00
Emmanuele Bassi
ef17d716d7
Merge branch 'patch-4' into 'master'
...
doc: fix missing GtkNotebookTab
See merge request GNOME/gtk!2794
2020-11-07 22:01:33 +00:00
Emmanuele Bassi
8ec01772be
Merge branch 'patch-5' into 'master'
...
gtk/enums: remove GtkMenuDirectionType
Closes #3336
See merge request GNOME/gtk!2795
2020-11-07 21:59:04 +00:00
David Lechner
4084b4c6c6
gtk/enums: remove GtkPopoverConstraint
...
GtkPopoverConstraint is no longer used anywhere and can be removed.
2020-11-07 21:47:32 +00:00
David Lechner
c3cb8e0a79
gtk/enums: remove GtkMenuDirectionType
...
This was used by GtkMenu and can safely be removed.
Closes #3336
2020-11-07 21:39:34 +00:00
Emmanuele Bassi
19b5e5349e
Merge branch 'gles-no-queries' into 'master'
...
gl renderer: Generate queries only on desktop GL
See merge request GNOME/gtk!2792
2020-11-07 21:33:09 +00:00
Emmanuele Bassi
f87923e09e
Merge branch 'patch-3' into 'master'
...
docs: include GtkFilterMatch
See merge request GNOME/gtk!2793
2020-11-07 21:32:40 +00:00
David Lechner
05684f6c3c
doc: fix missing GtkNotebookTab
...
GtkNotebookTab was listed under private, but it is used by the "focus-tab" signal, so it needs to be public.
2020-11-07 21:17:09 +00:00
Emmanuel Gil Peyrot
08193ecf1c
gl renderer: Generate queries only on desktop GL
...
On desktop GL, GL 1.5 or GL_ARB_occlusion_query is required to get the
glGenQueries() etc. symbols. This isn’t the case on GLES, where they
are provided by GL_EXT_occlusion_query_boolean, and more importantly
have never been made core.
This patch allows gtk4-demo to start when GDK_DEBUG=gl-gles is set, on
my Mali 400 MP running the Lima driver from Mesa.
2020-11-07 21:49:42 +01:00
David Lechner
8c9a827516
docs: include GtkFilterMatch
...
The GtkFilterMatch enum type was missing from the documentation.
2020-11-07 20:45:41 +00:00
Timm Bäder
638987f359
Merge branch 'dlech-master-patch-13962' into 'master'
...
gtk/enums: fix doc comment references
See merge request GNOME/gtk!2791
2020-11-07 18:47:55 +00:00
David Lechner
8190f0c420
gtk/enums: fix doc comment references
...
Enum members need a "%" prefix rather than "@" or "%@" in order to
automatically create links in the documentation.
2020-11-07 17:46:26 +00:00
Arnaud Bonatti
f7de0bc9c8
Fix tests with regard to GtkBuilder <requires>.
2020-11-07 16:17:36 +01:00
Arnaud Bonatti
08f2990eac
Document the GtkBuilder <requires> tag changes.
2020-11-07 16:17:14 +01:00
Arnaud Bonatti
e6d46ec5ad
Teach gtk-builder-tool
to rewrite <requires>.
2020-11-07 16:17:01 +01:00
Arnaud Bonatti
db6d7dccd8
Drop “gtk+” plus sign in GtkBuilder <requires>.
2020-11-07 16:16:55 +01:00
Piotr Drąg
4e8a5f2ec8
Update POTFILES.skip
2020-11-07 11:45:07 +01:00
Matthias Clasen
63e9414210
Merge branch 'wip/carlosg/for-master' into 'master'
...
Minor text handle fixes
See merge request GNOME/gtk!2787
2020-11-07 03:10:27 +00:00
Carlos Garnacho
4751ac1ac8
gtk/textview: Improve check for cursor-mode
...
Check the text handle role, instead of looking for the other handle
visibility. The other handle may be invisible during selection mode
(e.g. pointing to offscreen contents). This fixes both this code
switching to cursor mode out of the blue, and possible crashes later
on as this handle might be hidden in the process, while its own event
controller is handling events on the parent surface.
2020-11-06 14:30:18 +01:00
Carlos Garnacho
9d56c56117
gtk/texthandle: Point handle to the middle of the pointing_to rect
...
At least vertically, this gives again as much space up and down before
moving the selection the the prev/next line.
2020-11-06 14:28:46 +01:00
Matthias Clasen
0d82faa239
Merge branch 'wip/carlosg/for-master' into 'master'
...
Text handle fixes
Closes #3176
See merge request GNOME/gtk!2785
2020-11-06 01:23:16 +00:00
Matthias Clasen
fb27724042
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: tweak opacity, color/alpha size requests
See merge request GNOME/gtk!2786
2020-11-06 01:20:23 +00:00
Christian Hergert
90141ef305
macos: use NSOpenGLContext directly for current tracking
...
We don't need to interact with GdkGLContext here to keep the
current context active.
2020-11-05 13:57:41 -08:00
Christian Hergert
bc05da8dc0
macos: explicitly request color and alpha sizes
2020-11-05 13:37:25 -08:00
Christian Hergert
bf3e1e5b40
macos: use opaque GL context when possible
...
This is better for situations where the window is decorated and therefore we can
rely on window system clipping of rounded corners.
2020-11-05 13:34:29 -08:00
Carlos Garnacho
0ae93c8cdc
gtk/textview: Do not forcibly show text handles
...
The gtk_text_view_set_handle_position() function called some lines above
takes care of handle visibility already, also accounting for other
conditions (e.g. whether the handle points to contents onscreen).
Forcibly showing handles here misbehaves if the handle should stay hidden,
and somewhat expensively as it involves creating and throwing a native
surface every time.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
f9813019a7
gtk/textview: Defer touchscreen focus placing to drag end
...
With the scrolledwindow drag gesture not claiming the sequence immediately,
we end up placing the cursor (and undoing the previous selection) each time
we scroll.
There is already handling too short drags in ::drag-end, so let this code
handle touchscreens as well.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
5e907ebd58
gtk/textview: Clean up further if the drag gesture is taken over
...
If the gesture becomes captured (e.g. from a parent scrolledwindow), we
leave some things in the air. Clean these up properly. This is recurrent
with touch scroll.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
fa5fa3a881
gtk/imcontextwayland: Unset focus when unsetting widget
...
In destruction paths of a focused entry, the IM context might first
end up detached from its widget, then destroyed. This currently prevents
the IM context from detaching itself from the GtkIMContextWaylandGlobal.
Make it do so when unsetting the client widget, so the IM context gets
properly unfocused before destruction.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3176
2020-11-05 21:29:20 +01:00
Carlos Garnacho
9b9cc2f947
gtk/texthandle: Handle events on parent surface's native
...
In wayland, popup positioning and event handling are doubly async.
This makes it unreliable to figure out parent surface coordinates
out of the popup position and the events received. This results in
jumpy text handles there.
The best way to deal with parent surface coordinates is to handle
the events there. Make the handles transparent to input, and make
the drag gesture be set up on the parent widget's native.
The gesture is set up in the capture phase, setting it on the native
(as opposed to the parent widget) achieves a feeling similar to it
being a distinct surface, as it should take precedence over other
gestures in the emission chain (e.g. scrolledwindows).
As everything is in parent widget's native's coordinates, the drag
handles become smooth again.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
80f5be8b13
gdk/wayland: Ensure to update input area on map
...
If a surface is hidden, then shown again, it should preserve the
input area specified. Make sure that happens.
2020-11-05 21:29:20 +01:00
Matthias Clasen
ec5b5e8aaa
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3325
See merge request GNOME/gtk!2784
2020-11-05 16:43:08 +00:00
Emmanuele Bassi
95463719ae
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2783
2020-11-05 15:37:38 +00:00
Emmanuele Bassi
041415e9b4
docs: Add a note on the "presentation" role
2020-11-05 14:50:40 +00:00
Emmanuele Bassi
abd5383d40
docs: Add a section on accessible buttons
...
Anything that behaves like a button should do so at the accessibility
level as well.
2020-11-05 13:57:50 +00:00
Emmanuele Bassi
c5dc0e2e4c
a11y: Use proper role and state for tree expander image
...
The "expander" image is a button, and it controls the expansion of the
row, so it has a state associated to it that we must update.
2020-11-05 13:46:43 +00:00
Emmanuele Bassi
88116712f6
a11y: Use "presentation" role instead of "hidden" state
...
The intended use case of the "presentation" role is
| […] when an element is used to change the look of the page but does not
| have all the functional, interactive, or structural relevance implied
| by the element type, or may be used to provide for an accessible
| fallback in older browsers that do not support WAI-ARIA.
One of the examples is, literally:
| An element whose content is completely presentational (like a spacer
| image, decorative graphic, or clearing element);
Which fits perfectly for the GtkTreeExpander's "indent" builtin icon
widget.
2020-11-05 13:25:53 +00:00
Emmanuele Bassi
7dfa41bbc4
a11y: ARIA's "presentation" role maps to ATSPI_ROLE_SECTION
...
See the mapping role table in the Core-AAM normative document:
https://w3c.github.io/core-aam/#mapping_role_table
2020-11-05 13:14:08 +00:00
Matthias Clasen
c09ff35df4
dragicon: Make a function propertly exported
...
Mark gtk_drag_icon_create_widget_for_value with
GDK_AVAILABLE_IN_ALL, since it is meant to be public.
Also, clarify the documentation a bit.
Fixes : #3325
2020-11-05 07:23:38 -05:00
Matthias Clasen
d526bcc71b
Cosmetics
...
Fix argument ordering of gdk_cursor_new_from_name.
2020-11-04 23:36:09 -05:00
Matthias Clasen
13d1e497f7
testsuite: Improve GdkCursor coverage
2020-11-04 23:36:09 -05:00
Matthias Clasen
3eaae748d3
3.99.4
2020-11-04 21:46:10 -05:00
Matthias Clasen
7f16067383
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
...
macos: gl context improvements and event cleanup
See merge request GNOME/gtk!2780
2020-11-05 02:21:02 +00:00
Matthias Clasen
024e048c26
Merge branch 'wip/chergert/fix-macos-pointer-position-over-surface' into 'master'
...
macos: fix calculation of mouse position
See merge request GNOME/gtk!2781
2020-11-05 02:19:18 +00:00
Christian Hergert
c31c3848df
macos: fix calculation of mouse position
...
This fixes the calculation of the position of the pointer over the surface
which was incorrectly providing negative values.
2020-11-04 18:03:54 -08:00
Matthias Clasen
b0e0af1838
Merge branch 'patch-5' into 'master'
...
Update comment annotations of gtk_tree_model_iter_previous and...
See merge request GNOME/gtk!2775
2020-11-05 01:53:34 +00:00
Matthias Clasen
3785bf1f17
Merge branch 'fix-issue-2019-for-master' into 'master'
...
[master] GdkW32: remove klassTEMPSHADOW
Closes #2019
See merge request GNOME/gtk!2750
2020-11-05 01:53:02 +00:00
Matthias Clasen
79fb5724f9
Merge branch 'mr1063-for-master' into 'master'
...
Forward port MR !1063 (Win32 IME fixes) to GTK master
See merge request GNOME/gtk!2777
2020-11-05 01:48:37 +00:00
Christian Hergert
65b2ea1888
macos: resize extra GL window/view when surface changes
...
Once we figure out what is going on with textures, changes are we'll be
able to let this stay a zero rect. But that is still a bit up in the air right now.
2020-11-04 17:21:21 -08:00
Christian Hergert
6309bd12ac
macos: clip damage when swapping buffers
...
This ensures that we only copy the changed area.
2020-11-04 17:21:17 -08:00
Christian Hergert
7444a151b2
macos: remove synthesize_motion helper
...
We can use gdk_surface_request_motion() now instead of our extra
helper to do essentially the same thing.
2020-11-04 16:58:50 -08:00
Christian Hergert
ce9cc2db86
macos: always create dummy window/view for GL context
...
This simplifies the creation by always creating the dummy views, and then
removes it if necessary by detecting the begin_frame/end_frame pair.
2020-11-04 16:52:12 -08:00
Christian Hergert
e91b930648
Revert "Simplify gdk_surface_queue_render"
...
This reverts commit 2120e9df88
.
2020-11-04 16:28:13 -08:00
Matthias Clasen
ed78fb1366
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2779
2020-11-04 20:41:09 +00:00
Matthias Clasen
388f12b7d9
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2778
2020-11-04 20:37:39 +00:00
Matthias Clasen
8ae415acff
popovermenu: Fail gracefully if no model
...
If we don't have a model yet, return FALSE from
gtk_popover_menu_add_custom().
2020-11-04 14:59:32 -05:00
Matthias Clasen
d2cc9365fc
Cosmetics
...
Extraneous pair of parens snuck in with 2120e9df88
.
2020-11-04 14:59:27 -05:00
Matthias Clasen
dcfb6e5ef5
surface: Be smarter about autohide
...
When we close grabbing popups due to an outside
click, check at each level if the click is still
outside. This makes closing the nested popover
menu in the popover on page 3 of widget-factory
work as expected, when you click the menubutton
again.
2020-11-04 14:56:30 -05:00
Matthias Clasen
75f96b83de
surface: Be more lenient for autohide
...
When an event happens on a non-grabbing popup that hangs off
a grabbing popup, don't trigger the autohide. This makes touch
text handles work inside the popover on page 3 of widget-factory.
2020-11-04 14:56:30 -05:00
Emmanuele Bassi
66bba1493e
a11y: Remove stray g_printerr()
2020-11-04 19:39:08 +00:00
Emmanuele Bassi
1dde54b872
a11y: Hide the "indent" in GtkTreeExpander
...
It's just padding.
2020-11-04 19:38:14 +00:00
Emmanuele Bassi
c48a990778
a11y: Describe window controls
...
The window controls for client side decorations have only icons, which
means they are not accessible.
2020-11-04 18:59:11 +00:00
Matthias Clasen
23c425618e
Merge branch 'a11y/atcontext-realize' into 'master'
...
A11y/atcontext realize
See merge request GNOME/gtk!2772
2020-11-04 18:10:55 +00:00
Matthias Clasen
d2a7ecf72c
gtk-demo: Simplify the run button
...
Don't create the label manually. It is not necessary,
and letting the button do it also improves the
accessibility setup.
2020-11-04 12:54:48 -05:00
Matthias Clasen
f220a1e3c7
gtk-demo: Set some accessible properties
...
Set labels in the builder demo. The ARIA authoring practices
say that both menubars and toolbars *must* have an accessible
label.
2020-11-04 12:53:23 -05:00
Emmanuele Bassi
ba63aa76ca
a11y: Move parent context ref getter to its own function
...
Keeps the body of handle_accessible_get_property() readable.
2020-11-04 17:16:24 +00:00
Emmanuele Bassi
72415eaa49
a11y: Make the Button labelled by its child label
...
Establish the relation whenever we set the label widget.
2020-11-04 17:15:13 +00:00
Emmanuele Bassi
d88f7c9459
a11y: Use the tooltip text as the accessible description
...
It's more common to have a tooltip as the accessible description than an
explicit description. This is also the behaviour of GTK3.
2020-11-04 17:15:13 +00:00
Emmanuele Bassi
425d8ad02a
Set accessible label on GTK Demo's primary menu
...
Otherwise its label is going to be "GtkMenuButton".
2020-11-04 17:15:13 +00:00
Emmanuele Bassi
ae9758b964
a11y: Unrealize ATContext on dispose
2020-11-04 17:15:13 +00:00
Matthias Clasen
828a067b2b
Propagate accessible-role to backend
...
We want to allow setting the accessible role as long
as the context is unrealized, so we need to propagate
the new role.
2020-11-04 11:53:07 -05:00
Matthias Clasen
bb24b350ac
gtk-demo: Set an accessible role
...
Set an accessible role for the toolbar in the
builder demo. This tests accessibility support
in GtkBuilder.
2020-11-04 11:36:52 -05:00
Emmanuele Bassi
dafb2b0361
a11y: Allow updating role on unrealized contexts
...
We can still change the accessible role if an ATContext instance is
unrealized.
2020-11-04 15:22:31 +00:00
Emmanuele Bassi
30210c7087
a11y: Move ATContext to an explicit realization model
...
We are doing too much work during the construction phase of the
AT-SPI backend for GtkATContext. Instead of having the AtSpiContext
register itself at construction time, let's add explicit realize
and unrealize operations, and connect the ATContext realization to the
rooting operation of a GtkWidget.
2020-11-04 15:02:44 +00:00
Philip Zander
d8a795df0a
Win32 IME fixes
...
See merge request !1063
2020-11-04 17:17:52 +08:00
kai-berlin
499e4b4c50
broadway: Set modifier state of scroll events
...
Set modifier state of scroll events, so Ctrl-scroll
works.
Fixes : #2733
2020-11-03 19:21:00 -05:00
Matthias Clasen
fd52220b1b
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3318 , #3319 , and #3320
See merge request GNOME/gtk!2776
2020-11-03 20:15:08 +00:00
Matthias Clasen
e9438224ab
texthandle: Queue a draw when role changes
...
This helps with role changes not taking immediate
effect.
Fixes : #3320
2020-11-03 14:39:29 -05:00
Matthias Clasen
2120e9df88
Simplify gdk_surface_queue_render
...
We can just call gdk_surface_invalidate_rect here
like we do elsewhere in gdk, and I'm a bit uncertain
about the current code that adds an empty update
region.
2020-11-03 14:37:27 -05:00
Matthias Clasen
ddd16dd312
texthandle: Fix positioning
...
Use the same approach we use for popovers, using
gtk_widget_get_surface_allocation. It works.
Fixes : #3319
2020-11-03 12:37:39 -05:00
Matthias Clasen
7624f66fec
widget-factory: Make sure we close popover on page 3
...
We don't want the popover to stay open when we open
an about dialog or shortcuts window. Since cascade-popdown
would also affect e.g. the context menu of the text widgets,
do this explicitly.
2020-11-03 12:09:43 -05:00
Matthias Clasen
dab11ea841
popover: Change default for cascade-popdown
...
We've found a number of cases where this cascading
has unexpected side-effects. So, turn it off by
default, and only set it for menus.
2020-11-03 11:00:32 -05:00
Matthias Clasen
a3f3dc0f1c
Adwaita: Set a background for magnifiers
...
The magnifier in entries is magnifying the GtkText
widget, which does not draw any background itself.
Therefore, we give the magnifier a background, to
make things look as expected.
Fixes : #3318
2020-11-03 11:00:32 -05:00
Matthias Clasen
5d59447ccb
magnifier: Set a css name
...
Predictably, we use the name "magnifier".
2020-11-03 11:00:32 -05:00
Matthias Clasen
e3c38e4143
NEWS: Updates
2020-11-03 11:00:32 -05:00
Matthias Clasen
e5ec4df702
docs: Mention g_file_get_basename
...
Mention g_file_get_basename in the migration guide section
about GtkFileChooser api changes.
2020-11-03 11:00:32 -05:00
Danny Milosavljevic
1340ff2bc2
Update comment annotations of gtk_tree_model_iter_previous and gtk_tree_model_iter_next to state that the ITER parameter is modified.
2020-11-03 15:10:11 +00:00
Matthias Clasen
dbdc909e19
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2774
2020-11-03 12:14:21 +00:00
Matthias Clasen
c6ef1943e4
gtk-demo: Remove more gtk3-demo icon uses
...
Use our own logo everywhere.
2020-11-02 22:50:03 -05:00
Matthias Clasen
a3c9f8594a
gtk-demo: Tweak images demo
...
Use our own logo instead of the gtk3-demo one, and
tweak the headings to refledct what we show.
2020-11-02 22:43:44 -05:00
Matthias Clasen
354f2b65fa
gtk-demo: Reanimate floppy buddy
...
Implement a GdkPaintable wrapper around GdkPixbufAnimation,
so floppy buddy can waive again.
2020-11-02 21:38:02 -05:00
Matthias Clasen
b3657d5f2e
widget-factory: Restore modality of the about dialog
...
Make the about dialog of widget-factory modal again.
This was lost in 87a8fda163
.
2020-11-02 21:37:55 -05:00
Timm Bäder
82ca65956f
gl renderer: Make debugging code shorter
2020-11-02 14:55:14 -05:00
Timm Bäder
c8c2106f3e
gl renderer: Refactor vertex data loading code
2020-11-02 14:55:14 -05:00
Timm Bäder
8178dfb85a
gl renderer: Use the load_vertex_data* functions more often
2020-11-02 14:55:14 -05:00
Timm Bäder
50e78198a8
gl renderer: More load_vertex_data* usage
2020-11-02 14:55:14 -05:00
Timm Bäder
ee04cbcfa8
gl renderer: Reword a comment
2020-11-02 14:55:14 -05:00
Timm Bäder
fc312f7ffe
gl renderer: Remove an outdated comment
2020-11-02 14:55:14 -05:00
Timm Bäder
e6e964c3f3
gl renderer: Refactor rendering shadow nodes
...
Also use load_vertex_data_with_region here.
2020-11-02 14:55:14 -05:00
Timm Bäder
df5e796d99
gl renderer: Refactor blurred shadow drawing code
...
We already have various load_vertex_data* code, so try to reuse that
here.
2020-11-02 14:55:14 -05:00
Timm Bäder
d3239c953d
gl renderer: Nine-slice unblurred outset shadows
...
See #3284
2020-11-02 14:55:13 -05:00
Timm Bäder
fb9a3bf32b
printoperation: Remove double assignment
2020-11-02 14:55:13 -05:00
Matthias Clasen
ace83a938d
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo polish
See merge request GNOME/gtk!2773
2020-11-02 19:36:09 +00:00
Matthias Clasen
fb028f0fe7
gtk-demo: Renovate the paned demo
...
Make this look less like testgtk from GTK 2.
2020-11-02 13:56:19 -05:00
Matthias Clasen
8a13909bab
fixup: window titles
2020-11-02 12:02:19 -05:00
Matthias Clasen
4e745f06e9
gtk-demo: Polish all entry demos
...
Make the spacing a bit more consistent, and tweak
some strings here and there.
2020-11-02 12:01:11 -05:00
Matthias Clasen
14b65a3c4f
gtk-demo: Polish the search bar demo
...
Rename this, and make it look a bit less like a
debugging tool, and more like a demo.
2020-11-02 12:00:24 -05:00
Matthias Clasen
64ad490bc1
gtk-demo: Tweak tagged entry styling
...
Move the tags closer together, and avoid resizing too much.
2020-11-02 11:59:22 -05:00
Matthias Clasen
d2d7a4bcab
gtk-demo: Tweak window titles
...
This is an attempt to improve consistency in the sidebar
and the window titles.
2020-11-02 11:11:44 -05:00
Matthias Clasen
14cbd13ef2
gtk-demo: Use typographic style classes
...
We don't need to hardcode <u> in markup anymore.
Use the heading style class instead.
2020-11-02 08:38:20 -05:00
Matthias Clasen
efc314196d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2769
2020-11-02 11:52:13 +00:00
Matthias Clasen
403a70ca89
testsuite: Add tests for gtk4-builder-tool validate
2020-11-01 23:09:26 -05:00
Matthias Clasen
44b36b6321
builder-tool: Stop rewriting GtkPopoverMenu
...
We no longer allow manual creation of GtkPopoverMenu,
translating individual properties is not going to
change that.
2020-11-01 23:09:26 -05:00
Matthias Clasen
4bd829e3e1
testsuite: Test GtkFixed rewriting
2020-11-01 23:09:26 -05:00
Matthias Clasen
38f74d8a23
builder-tool: Rewrite GtkFixed more
...
GtkFixedLayout does not have layout properties
for x and y, so turn those into a transform.
2020-11-01 23:09:26 -05:00
Matthias Clasen
2613c2ef9b
builder-tool: Avoid duplicate path prefixes
...
It is enough to print the file in which the error
occurred once; GtkBuilder already makes that part
of its error message.
2020-11-01 23:09:26 -05:00
Matthias Clasen
5751cd662d
builder-tool: Install a log writer
...
Install a log writer function that is a bit simpler than
the default GLib log writer, and does not put PIDs and
timestamps in the output, so we can compare easily in
our testsuite.
2020-11-01 23:09:26 -05:00
Matthias Clasen
4039b713c3
Set G_LOG_USE_STRUCTURED globally
...
It doesn't make much sense to set this in per-directory
meson files, since that makes use use different logging
facilities in different parts of the project. Set it
globally.
2020-11-01 21:23:35 -05:00
Matthias Clasen
c3f8010b19
testsuite: Test GtkToolbar rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
3e8a22ae8a
builder-tool: Rewrite GtkToolbar more
...
Replace GtkToolbar with GtkBox and GtkToolButton with
GtkButton.
2020-11-01 21:23:35 -05:00
Matthias Clasen
c01f3be6e6
testsuite: Test GtkActionBar rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
0cf372c814
testsuite: Test GtkPaned rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
ac20c9cd41
builder-tool: Fix rewriting GtkPaned
...
The properties have been renamed in bc6643f3c2
.
2020-11-01 21:23:35 -05:00
Matthias Clasen
d74c2a74e5
builder-tool: Drop unneeded code
...
We are rewriting the tree before simplifying it,
so there is no need to 'keep things for rewriting'
in the simplify phase.
2020-11-01 21:23:35 -05:00
Matthias Clasen
b79637ac41
testsuite: Test GtkOverlay rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
e135772119
buildertool: Improve GtkOverlay rewriting
...
Translate the GtkOverlay:pass-through child property to
the GtkWidget:measure property, and drop the :index
child property.
2020-11-01 21:23:35 -05:00
Matthias Clasen
3cf26b471b
Fix the definition of GtkWidget:can-target
...
We are setting the value to TRUE initially, but
the property had a declared default of FALSE.
This is messing up the simplification of .ui files
with gtk4-builder-tool, since it thinks it can
omit can-target properties when it really can't.
2020-11-01 21:23:35 -05:00
Matthias Clasen
c630285692
Cosmetics
2020-11-01 21:23:35 -05:00
Matthias Clasen
5702b71037
Remove leftover file
...
This was never used in tests.
2020-11-01 21:23:35 -05:00
Matthias Clasen
a4e5f5ca50
testsuite: More gtk4-builder-tool tests
2020-11-01 21:23:35 -05:00
Matthias Clasen
b0b00d49d2
testsuite: Test gtk4-builder-tool simplify --replace
...
Run all gtk4-builder-tool test with and without --replace.
This improves test coverage for gtk4-builder-tool
2020-11-01 21:23:35 -05:00
Matthias Clasen
cb018ec047
builder-tool: Avoid a crash
...
Be more careful about types that have been removed.
I was getting criticals when converting ui files
containing GtkToolbars.
2020-11-01 21:23:35 -05:00
Matthias Clasen
168b21c77e
testsuite: Improve coverage for GdkTexture
2020-11-01 21:23:35 -05:00
Matthias Clasen
2dcc641d5a
testsuite: Improve coverage for GdkDisplayManager
2020-11-01 21:23:35 -05:00
Matthias Clasen
c8432ae668
testsuite: Improve coverage for seats
2020-11-01 21:23:35 -05:00
Matthias Clasen
642ad4e06f
testsuite: Improve coverage for rectangles
2020-11-01 21:23:35 -05:00
Tim Sabsch
924796b478
Update German translation
2020-11-01 14:08:13 +00:00
Piotr Drąg
319d4c7e01
Update Polish translation
2020-11-01 10:37:21 +01:00
Matthias Clasen
07c491f235
testsuite: Improve coverage for keys
2020-10-31 14:57:02 -04:00
Matthias Clasen
970f91ec24
testsuite: Add more css parser tests
...
Add tests for url parsing.
2020-10-31 09:18:40 -04:00
Matthias Clasen
48381bd4f6
testsuite: Add a forgotten test
...
I've written this test a while ago, but did not add
it to the test data list in meson.build.
2020-10-31 08:30:02 -04:00
Matthias Clasen
1a12999431
testsuite: Add a css test
...
This test verifies that CDO and CDC are ignored
as required.
2020-10-31 00:38:49 -04:00
Matthias Clasen
90676540ec
css: Fix tokenization of CDO
...
A CDO is 4 characters: <!--, not 3 as our tokenizer
was pretending.
2020-10-31 00:38:49 -04:00
Matthias Clasen
7db58d5f8d
gsk: Don't compile unused code
...
The NodeSample and GskGLImage code is not used,
so don't compile it.
2020-10-30 23:36:39 -04:00
Matthias Clasen
875452b476
testsuite: Improve coverage for GtkMultiSorter
2020-10-30 23:33:34 -04:00
Matthias Clasen
1c4c5e3b80
testsuite: Improve coverage for GtkStringList
2020-10-30 23:33:15 -04:00
Matthias Clasen
af5e13b9a1
Remove an unused function
...
The only property of GtkStringObject is readonly since
commit fb14f50ec1
, so we don't need a
set_property implementation.
2020-10-30 23:32:30 -04:00
Matthias Clasen
9b78bc4af7
testsuite: Improve coverage
2020-10-30 23:04:23 -04:00
Matthias Clasen
1702a4c223
Drop an unused private function
2020-10-30 22:51:54 -04:00
Matthias Clasen
f0e35c8ed8
Drop unused includes
2020-10-30 22:50:38 -04:00
Matthias Clasen
26150d8489
testsuite: Improve coverage for GtkExpression
2020-10-30 22:27:40 -04:00
Matthias Clasen
48dcbf4935
expression: Fix property expressions for interfaces
...
We were not checking the passed-in type in the right
way. An interface type can still pass the
g_type_is_a (..., G_TYPE_OBJECT) check, if G_TYPE_OBJECT
is one of its prerequisites. What we need to check is
whether the fundamental type is G_TYPE_OBJECT.
2020-10-30 22:27:40 -04:00
Matthias Clasen
59dd7d8900
testsuite: Improve coverage for GtkMultiFilter
2020-10-30 22:27:40 -04:00
Matthias Clasen
c279bdaa81
testsuite: Improve coverage for GtkStringFilter
2020-10-30 20:15:25 -04:00
Matthias Clasen
01d52a7292
testsuite: Make all css tests run again
...
The tests in subdirectories of testsuite/css were
using an environment defined in the parent directory,
causing them to not find their test data. Give each
test directory its own environment.
2020-10-30 20:14:17 -04:00
Matthias Clasen
2b38d14bf5
tests: Improve coverage for css data url parsing
...
Cover the error conditions as well.
2020-10-30 19:26:56 -04:00
Matthias Clasen
d35a21873e
testsuite: Improve coverage for GtkBoolFilter
2020-10-30 18:17:50 -04:00
Matthias Clasen
b23cae9643
Drop unused gtk_buildable_set_buildable_property
2020-10-30 17:19:52 -04:00
Matthias Clasen
505df337c2
Add a test for constraints in ui files
...
Test the various values that are possible for the constraint
attributes.
2020-10-30 16:21:14 -04:00
Matthias Clasen
117997da54
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
...
macos: add more aggressive clip to transparent subview
See merge request GNOME/gtk!2762
2020-10-30 19:48:57 +00:00
Matthias Clasen
19052d4360
gtk-demo: Tweak descriptions of constraints demos
...
Make these a little longer, and include more details.
2020-10-30 15:26:37 -04:00
Matthias Clasen
2dbaca2464
constraintlayout: Make sure guides get their constraints
...
When using GtkBuilder to create constraints and guides,
the layout manager is already rooted when the guides get
created, and we were forgetting to create the guides
constraints in this case. Fix it by adding a call to
gtk_constraint_guide_update().
This was showing up in the new builder-based constraints
demo as the guide not having the expected effect.
2020-10-30 15:04:13 -04:00
Matthias Clasen
4b8134b19b
constraintlayout: Emit less change notification
...
This isn't strictly required for correctness, but
it makes the GtkBuilder codepath do the same that
the vfl codepath does: call gtk_layout_manager_layout_changed
only once, after all the constraints have been added.
2020-10-30 15:04:13 -04:00
Matthias Clasen
588fe5b5c1
gtk-demo: Tweak the new constraints demo
...
With these somewhat random ordering changes, things get
closer to working the same as the code example. Still,
the guide doesn't work right.
2020-10-30 15:04:13 -04:00
Matthias Clasen
b8f44de48e
constraintlayout: Fix parsing from ui file
...
Guides were not properly looked up when creating
constraints in a ui file.
2020-10-30 15:04:13 -04:00
Matthias Clasen
49bdc4f0c2
Add another constraints demo
...
This one attempts to use constraints in a ui file.
It doesn't work.
2020-10-30 15:04:13 -04:00
Matthias Clasen
a0ee25a21e
gtk-demo: Remove unnecessary code
...
I was distracted by this code that sets names
on widgets in the constraints demo - the names
aren't used and aren't needed, so remove them.
2020-10-30 15:01:50 -04:00
Christian Hergert
d8192013f3
macos: add more aggressive clip to transparent subview
...
The Cairo implementation for the Macos backend uses a toplevel
window with full transparency and a series of NSView to create opaque
regions. This improves compositor performance because it allows the
display server to avoid costly blends.
However, we want to ensure we clip better when exposing the
transparent region so that we only expose the shadows/corners as
necessary.
2020-10-29 19:41:21 -07:00
Matthias Clasen
8ed1f51f7f
Merge branch 'wip/chergert/remove-GDK_WINDOWING_QUARTZ' into 'master'
...
gdk: remove remaining GDK_WINDOWING_QUARTZ usage
See merge request GNOME/gtk!2761
2020-10-30 01:36:10 +00:00
Matthias Clasen
03fec389f4
docs: Add details for gsk_renderer_new_for_surface
...
Mention the GSK_RENDERER variable here.
2020-10-29 18:21:44 -04:00
Matthias Clasen
38c39e2aa1
NEWS: Updates
2020-10-29 18:21:32 -04:00
Christian Hergert
6298fd1eef
gdk: remove remaining GDK_WINDOWING_QUARTZ usage
2020-10-29 13:57:28 -07:00
Matthias Clasen
5a77994516
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2760
2020-10-29 18:55:53 +00:00
Matthias Clasen
6142238237
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
...
macos: implement GL rendering on with Cairo renderer
See merge request GNOME/gtk!2759
2020-10-29 18:33:13 +00:00
Matthias Clasen
3164f328b5
docs: Some restructuring
...
Give the GDK docs some more structure.
2020-10-29 14:23:46 -04:00
Matthias Clasen
ce78d0c301
docs: Tweak GdkToplevel docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
94305f248b
docs: Tweak GdkPopup docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
3afd5d7a89
docs: Tweak GdkSurface docs
...
Add more details, and refer to the GdkToplevel / GdkPopup
docs.
2020-10-29 14:23:46 -04:00
Matthias Clasen
d2adbad408
docs: Tweak frame clock docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
2df382277d
docs: Small additions for GdkCursor docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
9f71bdd045
docs: Cosmetics
...
Make the GdkRGBA heading less repetitive.
2020-10-29 14:23:46 -04:00
Matthias Clasen
838d0924b9
docs: Tweak GdkPaintable docs
...
Minor additions here and there.
2020-10-29 14:23:46 -04:00
Matthias Clasen
1f8d593931
docs: Add some detail to GdkTexture docs
...
Minor additions here and there.
2020-10-29 14:23:46 -04:00
Matthias Clasen
574a3a456d
gdk: Drop GdkPoint from the api
...
This typedef was not used in any public APIs, and is
only used in the MacOS backend. It is not worth preserving
as public API, move it to the only user.
2020-10-29 14:23:46 -04:00
Matthias Clasen
3617fbab42
docs: Include GDK_WINDOWING_MACOS
...
We no longer have a Quartz backend, it is called
MacOS now.
2020-10-29 14:23:46 -04:00
Matthias Clasen
29ccd13e15
docs: Stop referring to the Quartz backend
...
Its MacOS now.
2020-10-29 14:23:46 -04:00
Christian Hergert
de9c9efa6f
macos: implement GL context
...
This implements the basics for a GdkGLContext on macOS. Currently, rendering
only is fully working for the GskCairoRenderer case where we read back pixels
into a cairo surface for rendering. More work on synchronization is required for
the GL on GskGLRenderer case.
When we attempt to render a surface itself with GL, the context will ensure that
the new GdkMacosGLView is placed within the NSWindow. In other cases, we
use a dummy NSView and NSWindow for backing the NSOpenGLContext to
ensure that we can get accelerated drawing.
This gets GtkGLArea working when running with GSK_RENDERER=cairo.
2020-10-29 10:57:02 -07:00
Christian Hergert
eb809ba425
macos: tweak gravity while resizing
...
This helps a situation where the window contents has not changed
in time for a drawing. Setting the texture gravity helps that side or
corner to be less jittery while moving.
Ideally, we can get to a point where we are synchronized and keeping
up with drawing fast enough to not need this. That may require some
work to drive frame clocks from drawRect: though.
2020-10-29 10:57:02 -07:00
Christian Hergert
adf60fb3a1
macos: be tolerant of NULL GL context
...
Some code appears to unconditionally attempt to make the context current,
so this makes things tolerant to a NULL GdkGLContext and just return FALSE.
2020-10-29 10:57:02 -07:00
Christian Hergert
a3fd46c516
glsl: tweak pre-processor to support Apple GLSL compiler
...
The Apple GLSL compiler cannot deal with empty pre-processor blocks such as
#if GSK_GLES
#elif GSK_LEGACY
2020-10-29 10:57:02 -07:00
Christian Hergert
0040667965
macos: remove unused GL layer
...
This isn't being used, and instead we'll go the route of a NSView for
the OpenGL implementation.
2020-10-29 10:57:02 -07:00
Christian Hergert
60e67a62e6
macos: move setNeedsDisplay helper to GdkMacosCairoView
...
This isn't needed in the base class, which will eventually get a GL subclass.
2020-10-29 10:57:02 -07:00
Matthias Clasen
931f130377
Merge branch 'wip/chergert/gdk-remove-texture_from_surface' into 'master'
...
gl: remove unused texture_from_surface API
See merge request GNOME/gtk!2756
2020-10-29 15:50:01 +00:00
Christian Hergert
524fbc35a7
gl: remove unused texture_from_surface API
...
This is not used anywhere and only exists within the X11 backend. It
can be removed now.
2020-10-29 08:26:27 -07:00
Matthias Clasen
51d35750f6
Cosmetics
...
Whitespace fix.
2020-10-29 07:40:30 -04:00
Matthias Clasen
90fde9c939
Merge branch 'matthiasc/for-master' into 'master'
...
textview: Update child allocations
See merge request GNOME/gtk!2757
2020-10-29 11:21:30 +00:00
Matthias Clasen
5cbc55578f
textview: Update child allocations
...
This was accidentally lost when display line caching
was introduced.
2020-10-28 20:18:54 -04:00
Piotr Drąg
f90e7b9c56
Update POTFILES.skip
2020-10-28 15:12:01 +01:00
Matthias Clasen
d5b9489408
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #3282
See merge request GNOME/gtk!2755
2020-10-27 22:38:58 +00:00
Matthias Clasen
975d763db1
Merge branch 'dropdown-checkmark' into 'master'
...
Dropdown checkmark
Closes #3291
See merge request GNOME/gtk!2754
2020-10-27 20:41:34 +00:00
Matthias Clasen
907fc30fac
gtk-demo: Add checkmarks to all dropdown demos
...
This follows the mockups that these demos are
copied from. Unfortunately, it has to be implemented
for every item factory, so we repeat it here.
Fixes : #3291
2020-10-27 16:13:44 -04:00
Matthias Clasen
25d2efeabe
dropdown: Add a checkmark to the selected item
...
Make the default factory add a checkmark to the
currently selected item (not the hovered item)
in the popup. This will unfortunately have to be
done in non-default factories too.
Related: #3291
2020-10-27 16:13:38 -04:00
Matthias Clasen
3a119a3d3a
dropdown: Make search entry shrink
...
We don't want the popup to be wider than the button
if we can help it. The search entry does not need
to be very wide.
2020-10-27 15:35:34 -04:00
Matthias Clasen
8df883ed71
Merge branch 'matthiasc/atspi-child' into 'master'
...
Emit ChildrenChanged signal on hierarchy updates
See merge request GNOME/gtk!2752
2020-10-27 18:24:43 +00:00
Matthias Clasen
0c49f7349d
Merge branch 'matthiasc/a11y-buildable' into 'master'
...
Implement accessible attributes for ui files
See merge request GNOME/gtk!2751
2020-10-27 18:13:44 +00:00
Luca Bacci
eef1097c90
GdkW32: remove klassTEMPSHADOW
...
Fixes issue #2019
2020-10-27 18:26:45 +01:00
Benjamin Otte
08004d4eed
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
Closes #3295
See merge request GNOME/gtk!2748
2020-10-27 16:27:10 +00:00
Benjamin Otte
6d7e56bed6
cloudprint: Make compile without warnings
2020-10-27 16:43:34 +01:00
Benjamin Otte
8e6701c9a6
gtkmediafile: Use cubic volume function
...
Gstreamer suggests doing that.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1439
Fixes #3295
2020-10-27 16:32:53 +01:00
Jakub Steiner
6d5c512571
Merge branch 'wip/jimmac/gtk4-dropdown-papercuts' into 'master'
...
Adwaita: dropdown search box
See merge request GNOME/gtk!2747
2020-10-27 12:55:33 +00:00
Jakub Steiner
b94ea1b4f7
Adwaita: dropdown search box
...
- have some whitespace around entry
Partial fix for https://gitlab.gnome.org/GNOME/gtk/-/issues/3291
2020-10-27 13:32:04 +01:00
Matthias Clasen
b2d6011679
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2746
2020-10-27 05:05:33 +00:00
Matthias Clasen
c0aa1c8a49
Merge branch 'popover-menu-custom-child' into 'master'
...
popovermenu: Allow custom items
Closes #3260
See merge request GNOME/gtk!2728
2020-10-27 04:51:00 +00:00
Matthias Clasen
5fe837483c
docs: Add GtkOverlay to the widget gallery
2020-10-27 00:42:38 -04:00
Matthias Clasen
4f15b988e7
docs: Add box, grid and center box to the gallery
2020-10-27 00:24:54 -04:00
Matthias Clasen
6cd3bc7384
modelbutton: Explicitly set up LABELLED-By relation
...
GTK does this automatically based on mnemonics, but only
if the string actually contains a mnemonic. This makes
orca read out menuitems, as expected.
2020-10-26 22:48:01 -04:00
Matthias Clasen
0faadef36f
widget-factory: Add a scale to the gear menu
...
This tests the custom menuitem support, and lets you
control the transition duration for the main stack.
2020-10-26 22:43:12 -04:00
Matthias Clasen
af6c3017fb
popovermenu: Allow adding custom items in ui files
...
Support <child type="ID"> to fill custom child slots
in both GtkPopoverMenus and GtkPopoverMenuBars that
are created in ui files.
2020-10-26 22:42:28 -04:00
Matthias Clasen
8157abe591
popovermenu: Allow custom items
...
Add a way to add children at certain places in
the generated menu for both GtkPopoverMenu and
GtkPopoverMenuBar.
New apis:
gtk_popover_menu_add_child
gtk_popover_menu_remove_child
gtk_popover_menu_bar_add_child
gtk_popover_menu_bar_remove_child
Fixes : #3260
2020-10-26 22:41:33 -04:00
Matthias Clasen
61e08baec1
Merge branch 'master' into 'master'
...
Fix the build with cups < 2.2.12
Closes #2968
See merge request GNOME/gtk!2744
2020-10-26 20:09:30 +00:00
Thomas Lange
0493e89897
Fix the build with cups < 2.2.12
...
PPD_CUSTOM_UNKNOWN was introduced in cups 2.3.
and has been backported to 2.2.12.
Only handle it when we build against a new enough cups.
Fixes : #2968
2020-10-26 19:16:26 +01:00
Matthias Clasen
c783e9aa5f
Treat tristate as an enum when parsing
...
This makes it so that you have to explicitly specify
"true" and "false" for the checked state, but it
matches how this enumeration is meant to be used.
2020-10-26 08:01:13 -04:00
Matthias Clasen
4661f15fab
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2741
2020-10-26 05:28:43 +00:00
Matthias Clasen
e51a98d184
docs: Add GtkDrawingArea to the gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
b67eee5741
docs: Add GtkShortcutsWindow to the widget gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
d9259fc958
docs: Add GtkPopoverMenu to the widget gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
65f748fc62
docs: Add GtkPopover to the widget gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
bed3616bf0
docs: Add GtkPopoverMenuBar to the gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
1605ca0140
docs: Add GtkExpander to the gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
8692f5d8e3
docs: Add GtkEmojiChooser to the gallery
...
To make this possible enable the doc shooter
to take screenshots of popovers.
2020-10-26 01:08:49 -04:00
Matthias Clasen
42e2c54922
docs: Redo the GtkColorChooserDialog gallery image
...
Show the new palette.
2020-10-25 22:54:53 -04:00
Matthias Clasen
291c61891a
docs: Improve the GtkStackSidebar gallery image
2020-10-25 22:54:41 -04:00
Matthias Clasen
59e08c0dac
docs: Tweak gallery layout
...
Now that the volume button image is small, move it
to a better place in its section. Improves the layout.
2020-10-25 22:46:30 -04:00
Matthias Clasen
a70c9c69a0
docs: Fix the GtkVolumeButton gallery image
...
Give up on showing the popup, we don't do that
for other buttons either.
2020-10-25 22:42:40 -04:00
Matthias Clasen
dffe6b87e4
docs: Add GtkCalendar to the gallery
...
It has been missing far too long.
2020-10-25 22:32:27 -04:00
Matthias Clasen
28b7962bee
docs: Improve the GtkMediaControls gallery image
2020-10-25 22:26:19 -04:00
Matthias Clasen
64e131f285
docs: Improve the GtkVideo gallery image
2020-10-25 22:17:15 -04:00
Matthias Clasen
a9f0f18c3a
docs: Tweak gallery layout
...
Improve the breaks in the container section.
2020-10-25 22:16:26 -04:00
Matthias Clasen
2e0822bed0
docs: Shrink the editable label gallery image
...
Makes it fit better with the other entries.
2020-10-25 21:52:51 -04:00
Matthias Clasen
b0fb31fc96
docs: Some reordering in the gallery
...
Align things better.
2020-10-25 21:47:40 -04:00
Matthias Clasen
163d32eea1
docs: Work around GtkPicture growing
...
Make the GtkPicture gallery image stay within its
limits, by overpowering its request mode.
2020-10-25 21:30:15 -04:00
Matthias Clasen
b7728a884b
docs: Tweak gallery ordering
...
Move GtkSpinButton to the entries, where it
belongs, despite its name.
2020-10-25 21:10:12 -04:00
Matthias Clasen
86b4b2eef2
docs: Fix links from the gallery
...
It turns out gtk-doc can't even parse its own custom
links if you don't arrange for the <link> element to
on a single line, since it is just a glorified sed
script :(
2020-10-25 21:07:12 -04:00
Matthias Clasen
09eda804f7
docs: Add GtkWindowControls to the gallery
2020-10-25 21:06:46 -04:00
Matthias Clasen
37d4932b31
a11y: Add more tests
...
Test some of the attributes that GTK maintains
for every widget.
2020-10-25 19:29:00 -04:00
Matthias Clasen
0fddf73ddb
a11y: Add some parser tests
...
Checking basic support for acessible states, properties
and relations in ui files.
2020-10-25 13:01:44 -04:00
Matthias Clasen
f981ab7a9e
Remove erroneous preconditions
...
Tests found these functions to be non-working.
2020-10-25 12:43:52 -04:00
Matthias Clasen
677ea5f22d
a11y: Reuse builder parsing for enums
...
No need to manually write all these parsing functions
when _gtk_builder_enum_from_string does exactly what
is needed here.
2020-10-25 12:38:52 -04:00
Matthias Clasen
fce455ae0b
a11y: Parse booleans in ui files as expected
...
Accept the same syntax for booleans as GtkBuilder
does elsewhere.
2020-10-25 12:20:55 -04:00
Matthias Clasen
e050a2661c
builder: Expot _gtk_builder_boolean_from_string privately
...
When specifying accessible properties in ui files, it
is better to accept the same syntax for booleans as
elsewhere, so lets reuse this function.
2020-10-25 12:19:21 -04:00
Piotr Drąg
a03581ce39
Update Polish translation
2020-10-25 10:37:47 +01:00
Matthias Clasen
13b9b9b7d8
scale: Set round-digits to -1 initially
...
This ensures that keybindings for small-step changes
work despite draw-value being FALSE now. This was
fallout from 8ca612c966
that showed up
as arrow keys not working anymore for the color scales
in the color chooser.
2020-10-25 00:31:18 -04:00
Matthias Clasen
0a3b370805
Cosmetics
...
Remove some comments that refer to no longer
existing menu code.
2020-10-25 00:31:18 -04:00
Matthias Clasen
313ba0280a
color editor: Add accessible labels
...
Add some labels to the controls in this dialog.
2020-10-24 23:55:56 -04:00
Matthias Clasen
adb7676fc1
a11y: More State<>Change confusion
...
We should really avoid this needless duplication
- the 'state' is never stored anywhere.
2020-10-24 23:12:36 -04:00
Matthias Clasen
8ffb398517
a11y: Handle all cases for state change
...
Make state_change handle state changes for non-widgets,
and handle the cases for HIDDEN involving stack pages.
2020-10-24 22:05:17 -04:00
Matthias Clasen
9a943e21d3
stack: Update HIDDEN a11y state for stack pages
...
This will let us handle additions and removals
in the AT-SPI backend.
2020-10-24 22:04:26 -04:00
Matthias Clasen
7c106578ed
Cosmetics
...
Make gtk_at_spi_root_child_changed take a
GtkAccessible for the child.
2020-10-24 21:35:35 -04:00
Matthias Clasen
d1d9b92aee
Merge branch 'meson-deps-continued' into 'master'
...
Turn more options into "feature"
See merge request GNOME/gtk!2708
2020-10-25 01:10:01 +00:00
Matthias Clasen
434b145ee0
stack: Don't transition when the visible child is remove
...
This is a corner-case, and it is causing crashes in
the shortcuts window, after a11ab6c995
.
2020-10-24 20:54:55 -04:00
Matthias Clasen
2546b88661
a11y: Redo child-added/-removed for toplevels
...
Instead of monitoring the list of toplevels, rely
on GtkWindow updating the HIDDEN state before windows
get removed. This is better, since we still have the
object available when it happens, so we can pass it
to the ATs.
2020-10-24 15:26:12 -04:00
Matthias Clasen
bba6d604f0
window: Maintain accessible HIDDEN state
...
We want to use the HIDDEN state to control when
things get added and removed from the accessible
tree, so ensure that we a) set HIDDEN to true
initially for windows, and b) we update HIDDEN
when a window is shown or hidden.
The second part is handled by gtk_widget_hide
for other widgets, but hiding a window does not
always go through that code path.
2020-10-24 15:25:03 -04:00
Matthias Clasen
274f9ad919
a11y: Emit child notification when toplevels get hidden
...
When a toplevel window gets hidden (and not destroyed),
the frontend code set the HIDDEN state, and we need to
emit child notification when that happens.
2020-10-24 13:17:20 -04:00
Matthias Clasen
89a8c89663
a11y: Improve child index helpers
...
We need to use gtk_accessible_should_present() whenever we
calculate accessible tree positions, to avoid inconsistencies.
While we are at it, make these helpers usable for finding
the position of accesibles that are now ignored, by not
looking at should_present for the object itself. This will
be relevant when we calculate the position of objects whose
HIDDEN state changes.
2020-10-24 13:14:44 -04:00
Matthias Clasen
e7b290debb
a11y: Improve child notification for toplevels
...
We need to translate the list model position into
an accessible tree position, since hidden toplevels
will be skipped.
While we are at it, add an api for this notification
that will be used in the next commit.
2020-10-24 13:13:07 -04:00
Matthias Clasen
46e754a17d
a11y: Skip non-presented children when required
...
Whenever we determine the index of a child, we need
to skip its non-presented siblings.
2020-10-24 11:22:09 -04:00
Matthias Clasen
b12992c1cb
a11y: Handle HIDDEN state changes
...
Hidden elements are not presented in the accessible
tree, so when then HIDDEN state changes, we should
emit child-added or -removed signals.
This commit does not yet handle all cases (HIDDEN
toplevels or hidden stack pages are not handled),
but it should cover the common case.
2020-10-24 11:17:56 -04:00
Matthias Clasen
374a451eeb
a11y: Don't present HIDDEN accessibles
...
The ARIA spec is clear on this: when an element has the
HIDDEN state, it should not be presented in the accessible
tree.
This change is incomplete, we also need to emit child-added/
removed signals when the state changes, but that needs to
wait for the child added infrastructure to land.
2020-10-24 11:17:56 -04:00
Matthias Clasen
1e13acb206
widget: Don't add reordered children
...
gtk_widget_reposition_after is called both to add new children,
and to reposition existing children. We only want to emit
accessible changes in the former case (since AT-SPI doesn't
have events for reordering).
2020-10-24 11:17:56 -04:00
Matthias Clasen
5b2b2feb9f
a11y: Fix up state / change enum confusion
2020-10-24 11:17:56 -04:00
Matthias Clasen
77af993181
Merge branch 'flush-events' into 'master'
...
Flush events
See merge request GNOME/gtk!2740
2020-10-24 12:53:01 +00:00
Matthias Clasen
c5ed5c5ff9
gdk: Deliver queued events on flush
...
The current code was marking queued events as flushed,
but left them in the queue. That doesn't make sense to
me - we should deliver all events we have before we
reach the paint phase of the frame cycle.
2020-10-23 17:03:00 -04:00
Matthias Clasen
6b53a55dd7
NEWS: Updates
2020-10-23 15:07:25 -04:00
Matthias Clasen
83fbdcd5e6
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3226
See merge request GNOME/gtk!2739
2020-10-23 17:25:33 +00:00
Matthias Clasen
cb8bf6540c
editablelabel: Properly clean up in dispose
...
Unparenting the stack finalizes the entry and label,
but at least the label is available via the
gtk_editable_get_delegate API, and the a11y
implementation uses that at dispose time. So, clear
the pointers to prevent them from being dangling.
This was showing up as a segfault of the doc-shooter.
2020-10-23 12:27:55 -04:00
Matthias Clasen
fdb1fa4d08
Give all search entries an icon
...
This was first requested for the search entry in
GtkDropDown, but it is better to be consistent and
give every search entry an icon.
Related: #3291
2020-10-23 12:19:31 -04:00
Matthias Clasen
10d7ccc8e0
window: Fix state updates
...
When the compositor unmaximized the window, we get a
state-changed signal, and we update the maximized field.
But then we go and recompute our layout based on the
maximize_initially field, and that is still TRUE, when
we were maximized initially. So we need to update both
fields.
This fixes a problem where using the window menu to
unmaximize an initially maximized window would not
work.
Fixes : #3226
2020-10-23 11:51:02 -04:00
Matthias Clasen
b973f7f375
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2737
2020-10-23 01:45:22 +00:00
Matthias Clasen
7671c1074b
Tweak focus tests
...
These tests are a bit fragile because the initial focus
that is taken depends on what ends up in the center of
the window, horizontally or vertically, which depends
on things like fonts, or theme spacing.
This commit makes some tweaks to push things in the
widget-factory example around far enough to make the
tests work again.
We should figure out a way to make this more robust.
2020-10-22 21:18:46 -04:00
Matthias Clasen
6ce2e19bbe
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2735
2020-10-22 22:53:34 +00:00
Matthias Clasen
3a08706e40
dropdown: Add an icon the search entry
...
A small detail for #3291 .
2020-10-22 14:33:41 -04:00
Matthias Clasen
e5722fe9d2
passwordentry: Respect border spacing
...
We are not using a box layout here since we want
to ignore the icons for measuring. But we still
want the layout to respect border spacing that
comes from the theme.
2020-10-22 14:27:19 -04:00
Matthias Clasen
700f957d9a
Adwaita: Set border-spacing for entries
...
When our entries contain icons, they should not run
directly into the text, so put some spacing between
the children of entries.
2020-10-22 14:26:21 -04:00
Timm Bäder
9109dee072
gl renderer: Don't use blur node bounds
...
The blur node bounds are different/larger than the ones we use. This
made the textures get stretched to the blur node bounds.
Fixes #3282
2020-10-22 17:46:34 +02:00
Timm Bäder
b6a843a05b
gl renderer: Fix two scale_x/y mixups
2020-10-22 17:46:34 +02:00
Timm Bäder
ff1fb4f10d
text: Remove empty root() implementation
2020-10-22 17:46:34 +02:00
Timm Bäder
1bf79a4dae
text: Fix a documentation mishap
2020-10-22 17:46:34 +02:00
Timm Bäder
85d4b86545
text: Fold focus_{in,out} into only caller
2020-10-22 17:46:34 +02:00
Timm Bäder
98e88b7b53
text: Avoid a crash
...
Calculate the "was previous focus in a child widget" condition before
chaining up into grab_focus, to a void that unreffing the prev_focus
widget.
2020-10-22 17:46:34 +02:00
Timm Bäder
85702f8f5d
dnd demo: Make the transform code a bit more idiomatic
2020-10-22 17:46:34 +02:00
Timm Bäder
d97cb851f1
textview: Remove a broken debug output statement
...
redraw_rect does not exist.
2020-10-22 17:46:34 +02:00
Timm Bäder
6dcdb4a601
atspitextbuffer: Explicitly cast between pango and gtk enums
2020-10-22 17:46:34 +02:00
Timm Bäder
41ef1d87ef
atspicontext: Add a few missing break statements
2020-10-22 17:46:34 +02:00
Timm Bäder
44728d09a9
stack: assert for some assumptions
2020-10-22 17:46:34 +02:00
Timm Bäder
b1664534af
gdksurface: Ensure some assumptions
...
Just to please scan-build
2020-10-22 17:46:34 +02:00
Timm Bäder
56e89e8d26
demos: Remove a dead assignment
2020-10-22 17:46:34 +02:00
Timm Bäder
f6ebc06767
filechooserwidget: Avoid an uninitialized value
...
If the operation mode is OPERATION_MODE_RECENT and we end up in the
'goto file_entry' case, we don't set info.result. Then later after
calling check_save_entry, is_empty is TRUE which causes a goto out and
here we then try to use info.result, which is uninitialized.
Initialize info.result before doing all this.
Found by scan-build
2020-10-22 17:46:33 +02:00
Timm Bäder
3db5e15bde
filechooserwidget: gtk_widget_get_root() can return NULL
2020-10-22 17:46:33 +02:00
Timm Bäder
a2291fb989
showrendernode: Pass error to deserialize()
2020-10-22 17:46:33 +02:00
Timm Bäder
af97f19926
textview: Respect return value of get_text_surface_coords()
2020-10-22 17:46:33 +02:00
Timm Bäder
0dae1f48fd
listbox test: Only compare values for rows we have
...
This shouldn't happen, but don't compare 100 values if we didnt' get 100
values from the listbox.
2020-10-22 17:46:33 +02:00
Timm Bäder
c7dbb8ef91
label: Plug a potential memory leak
...
This only happens in error cases so pretty insignificant.
Found by scan-build
2020-10-22 17:46:33 +02:00
Timm Bäder
3a1e019e83
print-editor: Fix a wrong comparison
...
If error is NULL, replacing the file contents worked and we don't
show the error dialog. The previous version pretty explicitly
dereferenced a NULL pointer by first ensuring that error is NULL and
then accessing error->message.
Found by scan-build
2020-10-22 17:46:33 +02:00
Matthias Clasen
a923be95b3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2736
2020-10-22 14:52:57 +00:00
Matthias Clasen
a11ab6c995
a11y: Handle stack case for addition/removal
...
Since we interpose stack pages as non-widget accessibles,
we need to tweak the signals we emit when their corresponding
widgets get added or removed.
2020-10-22 10:06:06 -04:00
Matthias Clasen
1d802881eb
stack: Change ordering for removal
...
Unparent the child widget before tearing down its
stack page. This is necessary so a11y can still access
the stack page accessible to emit change notification
when it learns that the child is removed.
2020-10-22 10:05:17 -04:00
Emmanuele Bassi
6c796cf201
docs: Fix cross-linking for GIO types
2020-10-22 13:33:49 +01:00
Matthias Clasen
44c6619660
gtk-demo: Speed up image demo
...
The progressive loading demo here was so slow as to appear
broken. Make it faster, and ensure that it updates regularly.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ef7499a31b
gtk-demo: Add alternative text to a GtkPicture
...
This lets us text GtkPicture a11y support.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ed571ae68a
picture: Set alternative text as description
...
Use the alternative text as accessible description
for GtkPicture.
2020-10-22 07:51:44 -04:00
Matthias Clasen
e2b3cbac23
colorbutton: Improve accessibility
...
Make the swatch not appear selectable, and
set an accessible label on it.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ba290eb9b0
a11y: Add actions for color swatches
...
Add the same actions that we exported in GTK 3.
2020-10-21 23:36:22 -04:00
Matthias Clasen
3805e1d507
colorswatch: Export some functions for a11y
...
Make simple functions to activate, select or customize
a GtkColorSwatch. These will be exported by a11y as
actions.
2020-10-21 23:36:22 -04:00
Matthias Clasen
daf3b3a3b4
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2734
2020-10-22 02:52:46 +00:00
Matthias Clasen
800eb76a2d
linkbutton: Use the LINK role
...
It is a bit ambiguous, but I think link buttons are
more links than buttons. See WAI-ARIA for a discussion
of the differences.
Update tests to match.
2020-10-21 22:19:54 -04:00
Matthias Clasen
bcbc6159f4
a11y: Document abstract roles
...
Since we mention abstract roles in the documentation
for GtkAccessibleRole, we should say what roles are
abstract. Doing this shows that we actually use two
abstract roles heavily, ourselves: WIDGET and WINDOW.
2020-10-21 21:47:14 -04:00
Matthias Clasen
5f8c6d2287
a11y: Document roles used in menu
2020-10-21 21:40:19 -04:00
Matthias Clasen
88eb3a9c34
atspi: Give model buttons a click action too
...
GtkModelButton is no longer derived from GtkButton,
but can still treat it like a button for the purposes
of having a click action. This lets ATs activate
menu items again.
2020-10-21 21:27:38 -04:00
Matthias Clasen
3e43dda9d4
modelbutton: Recreate our AT context
...
When the button role changes, we want to update the
accessible role to match. Since accessible roles are
unchangeable post-creation of the AT context, we have
to cheat a bit and recreate the whole context.
2020-10-21 21:27:38 -04:00
Matthias Clasen
f96a1cfadd
modelbutton: Initial accessibility setup
...
Set the accessible role to GTK_ACCESSIBLE_ROLE_MENU_ITEM.
This is incomplete, we need to recreate the context when
the buttons role changes, and there are other things that
need to be set.
2020-10-21 21:27:38 -04:00
Matthias Clasen
758bcd5343
popovermenubar: Initial accessibility setup
...
Set roles, properties and relations according to the
ARIA authoring practices document. This is not quite
complete.
2020-10-21 21:27:38 -04:00
Matthias Clasen
2bfd4196fb
popovermenu: Initial accessibility setup
...
Set roles, properties and relations according to the
ARIA authoring practices document.
2020-10-21 21:27:38 -04:00
Xavier Claessens
1b7a99cb24
Apply 1 suggestion(s) to 1 file(s)
2020-10-22 00:36:23 +00:00
Matthias Clasen
087c0078ca
menubutton: initial accessibility setup
...
Set roles, properties and relations according to the
ARIA authoring practices document.
2020-10-21 19:47:48 -04:00
Matthias Clasen
b9ae54c951
separator: Remove unnecessary code
...
gtk_widget_update_orientation already sets the
accessible property, no need to do it again.
2020-10-21 19:47:48 -04:00
Emmanuele Bassi
7ac6e25ffc
Use GtkApplication in the examples
...
Some people read the "Getting Started" section as a series of
incremental lessons, and having the examples go from GtkApplication to
the old style "init / spin the main loop" confuses them.
We should be using GtkApplication everywhere in our examples.
2020-10-21 22:44:53 +01:00
Matthias Clasen
d3089ebbc2
progressbar: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the progressbar role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 15:09:55 -04:00
Matthias Clasen
14a64c7372
levelbar: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the meter role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 15:04:34 -04:00
Matthias Clasen
ca9b06878d
switch: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the switch role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 14:55:13 -04:00
Matthias Clasen
8f100269ad
scale: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the slider role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree, which makes sense, since these are all
just internal gizmos.
2020-10-21 14:53:17 -04:00
Matthias Clasen
48bb9200d9
a11y: Treat PRESENTATION like NONE
...
This is what ARIA tells us to do. NONE is just another
name for PRESENTATION.
2020-10-21 14:40:34 -04:00
Matthias Clasen
d7794bf608
docs: Add some more to the migration guide
...
Expand the section on life-cycle handling with some
more details.
2020-10-21 14:30:17 -04:00
Matthias Clasen
3151906157
docs: Small corrections to the a11y overview
...
The section titles were mixed up wrt to the content
of the sections.
2020-10-21 14:23:10 -04:00
Matthias Clasen
6153efd02a
Document GTK_ACCESSIBLE_ROLE_NONE
...
We use it for a specific purpose now, so document it.
2020-10-21 14:21:12 -04:00
Matthias Clasen
b5b8f42a0c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3285
See merge request GNOME/gtk!2733
2020-10-21 18:09:42 +00:00
Matthias Clasen
043ffd38bc
text: React to text attribute changes in css
...
Recompute the layout when the css style change
affects text attributes. This matches what we do
in GtkLabel, and without this, changing the
font-features-setting css property in the Inspector
does not have immediate effect.
2020-10-21 13:46:58 -04:00
Carlos Garnacho
32b826e312
Merge branch 'wip/exalm/swipe4' into 'master'
...
gestureswipe: Count last event when calculating velocity
See merge request GNOME/gtk!2715
2020-10-21 16:20:58 +00:00
Alexander Mikhaylenko
700ca3b946
gestureswipe: Count last event when calculating velocity
...
The last event, matching lifting the finger/releasing the mouse button,
is important when there's a large delay between it and the previous events,
as in when performing a movement, stopping, then releasing fingers as
opposed to doing a swipe.
If this event is skipped, doing this will result in kinetic deceleration
matching the previous finger movement, while the expected behavior would
be no deceleration.
See also 5dc6194b98
for a similar fix in
GtkEventControllerScroll.
2020-10-21 20:59:15 +05:00
Emmanuele Bassi
e45dd771db
a11y: Emit ChildrenChanged for toplevel list changes
...
GtkAtSpiRoot is not a context, which means it needs to emit
ChildrenChanged events by itself whenever a toplevel is added to, or
removed from, the list of toplevels.
2020-10-21 15:37:57 +01:00
Emmanuele Bassi
698cbee1fb
a11y: Move ChildrenChanged emitter to ATSPI utilities
...
We are going to use it from GtkAtSpiRoot, which is not a
GtkAtSpiContext.
2020-10-21 15:18:23 +01:00
Emmanuele Bassi
80756322cd
a11y: Handle relations in UI files
...
A bit hacky: we skip parsing values that have a reference or
reference-list type, but we do not error out. Instead, we return a NULL
value, which we catch in the GtkBuildable interface implementation to
get the actual object, and construct a reference list value.
There's still some ickyness around the value type that can only be
solved by having an attribute and role taxonomy.
2020-10-21 14:48:49 +01:00
Emmanuele Bassi
f1e14c4858
a11y: Implement ChildrenChanged atspi.Event
2020-10-21 14:33:20 +01:00
Emmanuele Bassi
8d46bd1d7c
a11y: Notify of changes in the children list
2020-10-21 14:04:49 +01:00
Emmanuele Bassi
fbb08a30e2
a11y: Add child state change to GtkATContext
...
And the required private API in GtkAccessible to notify AT contexts of
changes in the children list.
2020-10-21 14:04:49 +01:00
Matthias Clasen
81371e7c79
columnview: Put overshoot underneath the headers
...
This matches what we do in GtkTreeView.
Fixes : #3285
2020-10-21 08:39:50 -04:00
Emmanuele Bassi
7702670d86
docs: Document the "accessibility" custom tag
2020-10-21 13:33:37 +01:00
Emmanuele Bassi
9e4316bf96
a11y: Add an "accessibility" section to the builder XML tree
...
Accessible attributes are not GObject properties. This means that we
need a custom parser for setting attributes in our UI description files.
The new section is defined as a sub-tree with the `<accessibility>`
element at its root, and elements for each type of accessible
attributes, i.e. properties, relations, and states:
```xml
<object class="..." id="...">
<accessibility>
<property name="label">The accessible label</property>
<state name="pressed">false</state>
<relation name="labelled-by">label1</relation>
</accessibility>
</object>
```
The name of the attribute is the enumeration value; the value is defined
by the WAI-ARIA specification.
2020-10-21 13:33:37 +01:00
Emmanuele Bassi
4ea2a6628f
a11y: Add parsing code for accessible values
...
We need to be able to go from a string representation of an accessible
value to its GtkAccessibleValue instance.
2020-10-21 13:33:37 +01:00
Matthias Clasen
39dfdac771
range: Hide internals from accessibility
...
The nameless, faceless gizmos inside a range do not
contribute to the accessible experience at all, lets
not add them to the tree. All the accessible functionality
is on the main widget (either a scale or a scrollbar).
2020-10-21 08:01:25 -04:00
Matthias Clasen
b7fa00e22d
Cosmetics
2020-10-21 08:01:25 -04:00
Matthias Clasen
3df0a333ad
frame: Set up accessible relations
...
Mark the child as labelled-by the label.
2020-10-21 08:01:25 -04:00
Matthias Clasen
8880e3bd2e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2729
2020-10-21 11:43:58 +00:00
Timm Bäder
0b5b908a74
Merge branch 'wip/exalm/nullable' into 'master'
...
widget: Add missing (nullable) on binding functions
See merge request GNOME/gtk!2730
2020-10-21 08:17:45 +00:00
Alexander Mikhaylenko
31a072497d
widget: Add missing (nullable) on binding functions
...
Even though they are marked as (skip), they are used in Vala and have wrong
types there atm.
2020-10-21 12:27:51 +05:00
Matthias Clasen
cbb6828657
docs: Document more accessible roles
...
Document that GtkText is skipped in accessibility.
2020-10-20 23:19:30 -04:00
Matthias Clasen
8e170217a1
Cosmetics
...
Typo fix.
2020-10-20 23:19:18 -04:00
Matthias Clasen
36d4a8090f
docs: Document more accessible roles
...
GtkColumnView and its various components use a lot
of accessible roles.
2020-10-20 23:09:11 -04:00
Matthias Clasen
341244203f
docs: Document more accessible roles
...
GtkListView and GtkGridView were missing this as well.
2020-10-20 22:53:30 -04:00
Matthias Clasen
2023914186
docs: Document accessible roles of some classes
...
GtkListBox and GtkFlowBox were missing this.
2020-10-20 22:51:11 -04:00
Matthias Clasen
ef9ec43469
a11y: Add some more tests
2020-10-20 22:44:24 -04:00
Matthias Clasen
67411701c6
inspector: Show accessible object path
...
Show the object path of the object on the a11y bus,
this is can be useful information. While we are here,
make sure that the Inspector does not throw criticals
when used with GTK_NO_A11Y=1.
2020-10-20 21:56:54 -04:00
Matthias Clasen
e20a3339bf
atsi: Fix emission of text selection changes
...
We were not emitting text-selection-changed and
text-caret-moved as expected.
2020-10-20 21:31:23 -04:00
Matthias Clasen
a8baee342c
a11y: Fix handling of LABELLED_BY relation
...
There were several places where we were confusing
GList and GSList and list->data and list->next, causing
a crash in the accessible name computation for buttons
with mnemonic labels.
2020-10-20 21:27:39 -04:00
Matthias Clasen
6a1cb3304b
docs: Mention subclassing and destroy in the migration guide
...
Mention changes regarding subclassing and life-cycle
handling in the migration guide.
2020-10-20 18:26:38 -04:00
Benjamin Otte
45400fe381
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
Closes #3280
See merge request GNOME/gtk!2725
2020-10-20 14:05:49 +00:00
Matthias Clasen
5504278b78
Merge branch 'matthiasc/for-master' into 'master'
...
Some more a11y tests
See merge request GNOME/gtk!2726
2020-10-20 05:57:45 +00:00
Matthias Clasen
93481e6c2e
a11y: Add tests for GtkFlowBox
...
Test that roles, states and properties are as expected.
2020-10-20 01:12:20 -04:00
Matthias Clasen
b9e9898212
a11y: Add tests for GtkListBox
...
Test that roles, states and properties are as expected.
2020-10-20 01:07:13 -04:00
Matthias Clasen
7c47b6907b
a11y: Add tests for GtkStack and GtkStackSwitcher
...
Test that the roles, states and relations are
as expected.
2020-10-20 00:46:07 -04:00
Matthias Clasen
b10d5ec8ff
a11y: Add a test for label properties
...
Now that we set the label property, we should test it too.
2020-10-20 00:25:39 -04:00
Benjamin Otte
8dad615f04
gtk: Remove unused header include
...
gtkcssnodeprivate.h was mainly used for repositioning CSS nodes in
gadgets, and gadgets are gone now.
2020-10-20 04:50:12 +02:00
Benjamin Otte
23e086089d
entry: Keep widget order
...
... instead of just ordering the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
9317a9f35c
flowbox: Keep widget order
...
... instead of just ordering the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
22100089c3
listbox: Reorder the widgets when sorting
...
... instead of just reordering the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
074d54ef5a
listitemwidget: Remove unnecessary code
...
gtk_widget_insert_after() reorders CSS nodes properly.
2020-10-20 04:50:12 +02:00
Benjamin Otte
ddd1b0958d
notebook: Remove unnecessary code
...
gtk_widget_insert_after() reorders CSS nodes properly.
Also fix page reordering code to actually reorder the widget instead of
just the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
d77902365d
box: Remove unnecessary code
...
gtk_widget_insert_after() reorders CSS nodes properly.
2020-10-20 04:50:12 +02:00
Benjamin Otte
d9b216e629
widget: Always update the CSS node
...
Anybody who keeps their own CSS nodes around or wants to order CSS nodes
different from widgets will from now on have to do it manually all the
time.
This is outdated behavior, nobody should be doing either of those two
things.
Also, the correct case is much more common, and not doing it
automatically was causing bugs.
Fixes #3280
2020-10-20 04:50:12 +02:00
Matthias Clasen
a7bd6b094a
Merge branch 'matthiasc/for-master' into 'master'
...
Some a11y docs and fixes
See merge request GNOME/gtk!2724
2020-10-20 01:45:17 +00:00
Matthias Clasen
eeae1b1ea7
a11y: Fix accessible tree inconsistency
...
The stack page objects were not properly integrated
in the accessible tree - they were appearing as parent
of the pages when navigating up, but not as children
of the stack when navigating down.
2020-10-19 21:15:44 -04:00
Matthias Clasen
0a71dc1bed
stack: Minor doc addition
2020-10-19 21:15:44 -04:00
Matthias Clasen
feb73a5ebb
docs: Flesh out a11y section
...
Add some advice for making custom widgets accessible.
2020-10-19 20:01:57 -04:00
Matthias Clasen
83d8ae2f30
Merge branch 'wip/chergert/fix-macos-surface-under-pointer' into 'master'
...
macos: fix discovery of surface under pointer
See merge request GNOME/gtk!2722
2020-10-19 21:26:47 +00:00
Emmanuele Bassi
51f5690ae3
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2720
2020-10-19 20:26:57 +00:00
Matthias Clasen
e58e6a0fbe
Merge branch 'a11y/editable' into 'master'
...
Improve the accessible support for editables
See merge request GNOME/gtk!2719
2020-10-19 20:16:21 +00:00
Christian Hergert
eb82b2a9ca
macos: fix discovery of surface under pointer
2020-10-19 12:35:41 -07:00
Matthias Clasen
dfc7d26275
a11y: Tweak name and description computation
...
Instead of falling back to the role nick for both,
fall back to the class name for the name, and to
the empty string for the description. This makes
labels show up in Accerciser the same way they
did in GTK 3, and seems more useful to me than
the alternative.
2020-10-19 14:58:34 -04:00
Matthias Clasen
77d1026c5a
atspi: Use name and description as provided
...
GtkATContext already does fallbacks to derive values
for these, so no need for the atspi implementation to
do its own fallback on top of that.
2020-10-19 14:57:43 -04:00
Matthias Clasen
08ae513064
label: Set the accessible label property
...
This will make label text show up in ATs again.
2020-10-19 14:29:19 -04:00
Emmanuele Bassi
f52c86ae21
docs: Add a section on a11y patterns
2020-10-19 18:39:40 +01:00
Emmanuele Bassi
03745a489c
docs: Start outlining a11y authoring practices
...
We should have documentation for application developers and widget
authors, so they can deal with the new accessibility API.
2020-10-19 18:37:30 +01:00
Matthias Clasen
63421b1876
a11y: Rename some methods
...
Our EditableText implementation works fine for any
editable, so don't name the functions in a way that
looks like they are only for entries.
2020-10-19 12:58:29 -04:00
Matthias Clasen
80e0e3fe4f
gtk-demo: Set an accessible role
...
Set the expected accessible role on the tagged entry
widget in the demo of the same name. Accessible tools
may decide to ignore widgets that have the wrong role,
so setting an appropriate role is important.
2020-10-19 12:56:50 -04:00
Matthias Clasen
ef46fe0e8e
Merge branch 'a11y/component' into 'master'
...
a11y: Implement Component
See merge request GNOME/gtk!2718
2020-10-19 16:54:45 +00:00
Emmanuele Bassi
7c7dabae8c
a11y: Rework accessible name/description computation
...
The ARIA spec determines the name and description of accessible elements
in a more complex way that simply mapping to a single property; instead,
it will chain up multiple definitions (if it finds them). For instance,
let's assume we have a button that saves a file selected from a file
selection widget; the widgets have the following attributes:
- the file selection widget has a "label" attribute set to the
selected file, e.g. "Final paper.pdf"
- the "download" button has a "label" attribute set to the
"Download" string
- the "download" button has a "labelled-by" attribute set to
reference the file selection widget
The ARIA spec says that the accessible name of the "Download" button
should be computed as "Download Final paper.pdf".
The algorithm defined in section 4.3 of the WAI-ARIA specification
applies to both accessible names (using the "label" and "labelled-by"
attributes), and to accessible descriptions (using the "description" and
"described-by" attributes).
2020-10-19 17:54:14 +01:00
Matthias Clasen
9f9e7dffef
atspi: Implement Text for more editables
...
Our Text implementation requires that we have
a GtkEditable with a delegate that is a GtkText
widget.
This change make the Text implementation work for
the custom widget in the tagged entry demo.
2020-10-19 12:44:50 -04:00
Goran Vidović
94729b4880
Update Croatian translation
...
(cherry picked from commit fab2558747
)
2020-10-19 16:37:36 +00:00
Matthias Clasen
3918dd4643
Add gtk_editable_get_delegate
...
We need access to the delegate in the a11y layer,
so we might as well make this function public.
2020-10-19 12:36:54 -04:00
Matthias Clasen
04a51837f7
atspi: Emit bounds-changed
...
This is using the new bounds_change vfunc in GtkATContext.
2020-10-19 12:19:55 -04:00
Matthias Clasen
75a0bef921
widget: Mark the size as changed when it changes
...
This notifies the AT context that the widgets size
has changed.
2020-10-19 12:19:55 -04:00
Matthias Clasen
d50ebd947c
a11y: Add bounds change api
...
Add a way for GTK to pass bounds change information
to the AT context.
2020-10-19 12:19:55 -04:00
Matthias Clasen
8e4f8a45a9
atspi: Implement Component
...
Implement the non-questionable parts of the Component interface
for accessibles which are widgets.
This does not include:
- global coordinates
- setters
- scrolling
- alpha, layers, zorder, and the like
2020-10-19 12:19:55 -04:00
Matthias Clasen
3ad03b1706
a11y: Add a separate vfunc for platform changes
...
The state_change vfunc is becoming unwieldy. Lets move
the platform changes to their own vfunc, as a start.
2020-10-19 12:09:08 -04:00
Matthias Clasen
dfe00c4ac4
atspi: Be more careful
...
We have non-widget accessibles now, so guard against
change notification being emitted on them.
2020-10-19 12:09:08 -04:00
Matthias Clasen
5bb656af4c
Cosmetics
...
Add some more fold markers.
2020-10-19 12:08:47 -04:00
Matthias Clasen
469b913cdf
Cosmetics
2020-10-19 12:00:53 -04:00
Matthias Clasen
9c1c8a554a
Cosmetics
2020-10-19 11:46:25 -04:00
Matthias Clasen
2359510b1f
Merge branch 'matthiasc/for-master' into 'master'
...
Various columnview fixes
Closes #3265 , #3272 , and #3276
See merge request GNOME/gtk!2717
2020-10-19 15:00:17 +00:00
Xavier Claessens
25a1c421b5
Merge branch 'msvc' into 'master'
...
gdkglcontext: Fix build with MSVC
Closes #3268
See merge request GNOME/gtk!2713
2020-10-19 13:46:54 +00:00
Matthias Clasen
ef308e5f17
Merge branch 'annotations_gtkaboutdialog' into 'master'
...
Add nullable return annotations in GtkAboutDialog
See merge request GNOME/gtk!2712
2020-10-19 13:46:32 +00:00
Sophie Herold
33f0809784
Add nullable return annotations in GtkAboutDialog
2020-10-19 13:46:32 +00:00
Matthias Clasen
81ee273e98
columnview: Make right-aligned content work
...
Make right-aligned content work in resized columns.
There is currently no way to make a title right-aligned,
but we can still make it work correctly. This is a follow
up to 7eb0ae39c5
.
Fixes : #3276
2020-10-19 09:39:07 -04:00
Matthias Clasen
f3fe1812aa
Adwaita: Put column separators on the left
...
When resizing columns, we clip a shrunk column
on the right, so the separator disappears in that
case unless we put it on the left side of the other
column.
2020-10-19 09:39:05 -04:00
Xavier Claessens
be8246a6cb
gdkglcontext: Fix build with MSVC
...
GLDEBUGPROC callback is defined with APIENTRY which is a windows
specific calling convention. That macro expands to nothing when building
on other platforms.
Fixes : #3268 .
2020-10-19 09:17:53 -04:00
Matthias Clasen
25d0fb4c76
columview: Make resize area a bit larger
...
This make column resizing feel less like a game
of hit-and-miss. Ultimatively, we should add an
alternative to this.
2020-10-19 08:31:37 -04:00
Matthias Clasen
98b66acbdd
columview: Implement double-click to reset headers
...
Implement the same behavior as GtkTreeView:
double-click on the header boundary resets the
header to its automatic width.
Fixes : #3272
2020-10-19 08:31:37 -04:00
Matthias Clasen
1976df1e54
columnview: Make resize cursors reliable
...
Ensure that the column resize cursor stays in place
for the duration of the resize drag. This is a bit
annoying, since the implicit grab can end up on the
header of a different column from the one we are
resizing, so just set the cursor on all column headers.
2020-10-19 08:30:22 -04:00
Matthias Clasen
39baf4fff4
columnview: Fix more issues with column resizing
...
Make it so that for overlapping resize rectangles (with
very narrow columns), we prefer the narrow column, so you
can regrow a column after shrinking it all the way.
Related: #3274
2020-10-19 08:30:05 -04:00
Matthias Clasen
a88e5a5f4e
columnview: Fix some issues with column resizing
...
Ensure that we place the resize rectangle at the visible
right edge of the column, not where the allocation ends
(we clip the header drawing, after all).
Related: #3274
2020-10-19 08:29:29 -04:00
Matthias Clasen
a39e519bed
inspector: Clear overlays on unroot
...
In dispose(), we can't access the root anymore,
since we're already unrooted.
Fixes : #3265
2020-10-17 13:11:58 -04:00
Emmanuele Bassi
e9eb385f25
Merge branch 'patch-1' into 'master'
...
Add some missing nullable return annotations
See merge request GNOME/gtk!2707
2020-10-17 14:08:29 +00:00
Xavier Claessens
a4aa6d79ad
meson: Use feature options for media and print backends
...
This gracefully disable ffmpeg, gstreamer, cups and cloudprint optional
dependencies when they are not available, while still giving full
control to distributors using -Dauto_features=enabled.
2020-10-17 09:54:47 -04:00
Xavier Claessens
ea3933b87a
meson: Make vulkan and xinerama optional deps default to 'auto'
...
It is nicer for contributors to have a build that works by default.
Distributors should be using -Dauto_features=enabled to get ride of
automagic options.
2020-10-17 09:54:47 -04:00
Xavier Claessens
6ae9f7e7c3
meson: Simplify xinerama dependency check
2020-10-17 09:54:47 -04:00
Xavier Claessens
efbbfb6547
meson: Simplify how cairo dependencies are checked
...
There is no reason to fallback to find_library for cairo and still rely
on pkg-config for all other dependencies, and just when using MSVC. When
building and pkg-config is not working it is preferable to fallback to a
subproject just like for all other dependencies.
Also add cairo.wrap now that meson support has been merged upstream.
2020-10-17 09:54:47 -04:00
Sophie Herold
cd0bef9390
Add some missing nullable return annotations
2020-10-17 15:32:36 +02:00
Matthias Clasen
5a79cc4d70
Merge branch 'wip/chergert/fix-macos-fps-calculation' into 'master'
...
macos: fix fps calculation for frame timings
See merge request GNOME/gtk!2705
2020-10-17 12:20:04 +00:00
Piotr Drąg
954855783a
Update POTFILES.in
2020-10-17 11:11:24 +02:00
Christian Hergert
7ae8ed82c9
macos: fix fps calculation for frame timings
...
We need to mark the timings as complete after adding the
presentation time so that we have a valid FPS for the overlay
widget and/or fishbowl demo.
2020-10-15 21:04:51 -07:00
Matthias Clasen
1021e12121
3.99.3
2020-10-15 23:03:03 -04:00
Matthias Clasen
5833e8afa6
Merge branch 'win32.modal' into 'master'
...
GDK/Win32: Fix modal window handling and window stacking (for GTK4)
See merge request GNOME/gtk!2675
2020-10-16 03:01:38 +00:00
Matthias Clasen
34625142f4
docs: Expand opacity docs
...
Explain the situation with popovers and opacity.
Fixes : #3246
2020-10-15 22:39:01 -04:00
Matthias Clasen
6cbf1d0379
Merge branch 'a11y-action-fixes' into 'master'
...
A11y action fixes
See merge request GNOME/gtk!2703
2020-10-16 02:19:08 +00:00
Chun-wei Fan
2cc650ced2
gdk/Win32: Fix mouse pointer capture
...
Call SetCapture() explcitly for the (new) modal window so that we make the
modal window respond to mouse input, and also call SetCapture() to the parent
of the transient window that we are destroying so that mouse input capture is
returned to the parent window.
This attempts to fix the following:
* Upon creating a new modal window, the new modal window does not receive
pointer input unless one switches to another program and back
* Upon closing a transient window, the parent window that activated the
transient window does not receive pointer input unless one switches to
another and back
2020-10-16 10:03:50 +08:00
Matthias Clasen
7165deb630
Merge branch 'fix-listbox-selection' into 'master'
...
Revert "listbox: Activate single-click rows if n_press >= 1"
Closes #3263
See merge request GNOME/gtk!2704
2020-10-16 02:03:16 +00:00
Руслан Ижбулатов
6a0c181886
GDK W32: Remove stacking functions
...
Stacking functions enforce non-native stacking behaviour that is
mostly unneeded, and doing so introduces bugs and complicates things.
2020-10-16 10:02:57 +08:00
Руслан Ижбулатов
89286af620
Revert "GDK W32: Use SWP_NOOWNERZORDER everywhere it can be applied"
...
This reverts commit fc2008f2
.
Turns out, we *don't* have code to maintain Z-order. Restacking
code is not doint that, it just enforces a few weird Z-order-related
behaviours.
2020-10-16 10:01:46 +08:00
Chun-wei Fan
bc142b9c43
GDK/Win32: Fix modal window handling
...
Make sure that we get the state of the modal window properly, and send out the
corresponding notification signals.
This will ensure that we do not try to activate windows that should have become
inactivated due to it opening modal windows and render the program unresponsive
because we are not activating the correct window that is due to receive user
input.
2020-10-16 09:56:42 +08:00
Matthias Clasen
8eb6e876bd
Revert "listbox: Activate single-click rows if n_press >= 1"
...
This reverts commit e669433cde
.
This broke selection in several listbox examples.
Fixes : #3263
2020-10-15 21:46:58 -04:00
Matthias Clasen
ab61b7b9ae
atspi: Properly filter out parent actions
...
We only want to show relevant, local actions for
widgets, but _gtk_widget_get_action_muxer() will
return the muxer of a parent widget (all the way
up to the toplevel), if the widget does not have
any actions of its own. To detect this situation,
compare what _gtk_widget_get_action_muxer() returns
for the parent widget, and act accordingly.
2020-10-15 21:32:11 -04:00
Matthias Clasen
3eae91255d
atspi: Fix a thinko in action filtering
...
get_action_at_index() was trying hard to find out
which actions are valid, only to then return the
invalid ones anyway.
2020-10-15 21:31:58 -04:00
Matthias Clasen
5bbacc647c
Merge branch 'a11y/atspi-action' into 'master'
...
A11y/atspi action
See merge request GNOME/gtk!2699
2020-10-16 00:13:23 +00:00
Emmanuele Bassi
cfb327974b
a11y: Add atspi.Action for GtkPasswordEntry
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
a83d3078c2
Allow toggling the password entry visibility programmatically
...
We are going to need a method for toggling the visibility from the
accessibility layer.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
f67345eb55
a11y: Add atspi.Action for GtkEntry
...
We need to handle the activation on the entry widget, as well as the
activation of the primary and secondary icons.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
c10bcf0a60
Add GtkEntry icon signals emitter
...
We need a (private) way to programmatically trigger the activation of
the entry's icons, so that we can call it from the accessibility layer.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
9ae08fc0f0
a11y: Add atspi.Action for GtkExpander
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
5f1128899c
a11y: De-duplicate some action code
...
The widgets with hard coded actions should share more code, instead of
copy-pasting it.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
e44f27a7ed
a11y: Special case buttons and switches
...
These widgets have specific actions.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
374bd21340
Initial ATSPI Action implementation for widget
...
Use the actions from the GtkActionMuxer of each widget to populate the
list of actions available.
2020-10-16 00:34:01 +01:00
Matthias Clasen
916ef485d1
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3245
See merge request GNOME/gtk!2702
2020-10-15 21:00:44 +00:00
Matthias Clasen
92585b75fa
Fix compiler warnings
2020-10-15 16:33:35 -04:00
Matthias Clasen
4bd2595421
actionmuxer: Make it possible to enumerate local actions
...
This will be useful for exposing actions via the
AT-SPI Actions interface.
Update all callers.
2020-10-15 16:32:55 -04:00
Matthias Clasen
aa4c0bf272
spinbutton: Hide the buttons from accessibility
...
The buttons here are not really buttons (the action
is not tied to the "clicked" signal), so triggering
the buttons via a11y does not have the expected effect.
And we expose the Value interface that ATs can use
to set the value.
2020-10-15 16:32:55 -04:00
Matthias Clasen
4e04c39609
emojicompletion: Avoid a memory overrun
...
Don't read beyond the beginning of the string.
Fixes : #3245
2020-10-15 16:32:55 -04:00
Matthias Clasen
0bd5a96d71
gtk-demo: Fix some issues with the multi view demo
...
The nested window was not modal, causing it to be
inoperable. And the nested views within were all
shrunk down to nothingness. Give them some width.
Fixes : #3257
2020-10-15 14:42:43 -04:00
Matthias Clasen
7d22616a0e
Merge branch 'a11y-list-view-selection-fixes' into 'master'
...
atspi: Add fold markers
See merge request GNOME/gtk!2701
2020-10-15 17:36:47 +00:00
Matthias Clasen
8a14f019d0
atspi: Add fold markers
...
This makes it much easier to navigate in these
multi-implementation files.
2020-10-15 13:14:56 -04:00
Matthias Clasen
329efee643
Merge branch 'a11y-list-view-selection-fixes' into 'master'
...
A11y list view selection fixes
See merge request GNOME/gtk!2700
2020-10-15 17:10:00 +00:00
Matthias Clasen
bf58b6f88c
Merge branch 'ebassi/for-master' into 'master'
...
GdkWayland API cleanups
Closes #3249
See merge request GNOME/gtk!2688
2020-10-15 16:55:19 +00:00
Matthias Clasen
8701e65635
atspi: Implement Selection more correctly
...
The Selection interface is defined in terms of child
positions, so we need to always translate from that
to model positions if we want to use the selection
model apis.
2020-10-15 12:46:52 -04:00
Matthias Clasen
5f22ad8848
Remove debug spew
2020-10-15 12:19:58 -04:00
Matthias Clasen
1d40f29776
wayland: Make gdk_wayland_device_pad_set_feedback private
...
It is not a generally useful api, and awkwardly named.
2020-10-15 12:00:00 -04:00
Matthias Clasen
6d1dcaa92a
docs: Explain the symbolic icon paintable situation
...
Add a paragraph to the migration guide that explains
how to properly render symbolic GtkIconPaintables.
Also mention this in the GtkIconPaintable docs.
There's a reason you can't spell 'paintable' without
'pain'...
2020-10-15 11:42:50 -04:00
Matthias Clasen
9c28ecb0da
Merge branch 'a11y/atspi' into 'master'
...
A11y/atspi
See merge request GNOME/gtk!2698
2020-10-15 14:59:24 +00:00
Matthias Clasen
2488d71a0a
Merge branch 'clipboard-emo' into 'master'
...
gtk-demo: Fix up image handling in the clipboard demo
Closes #3252
See merge request GNOME/gtk!2697
2020-10-15 14:50:54 +00:00
Matthias Clasen
5c8663e383
Merge branch 'wip/wayland-dont-respond-to-destroyed-surface-configure' into 'master'
...
wayland/surface: Clear has_uncommitted_ack_configure when hiding
Closes #3262
See merge request GNOME/gtk!2696
2020-10-15 14:25:55 +00:00
Matthias Clasen
4b36bceb26
Merge branch 'meson-epoxy-subproject' into 'master'
...
meson: Fix error when epoxy is a subproject on Windows
See merge request GNOME/gtk!2695
2020-10-15 13:41:47 +00:00
Matthias Clasen
8cf955731f
gtk-demo: Fix up image handling in the clipboard demo
...
Using GtkIconPaintable+GtkPicture is not good for symbolic
icons - they don't get properly colored that way. So change
things around to use the icon name if we have it.
Fixes : #3252
2020-10-15 09:19:17 -04:00
Jonas Ådahl
7dfb25f124
wayland/surface: Clear has_uncommitted_ack_configure when hiding
...
The 'has_uncommitted_ack_configure' state was added to make sure we're
responding to 'xdg_surface.configure' events with
'xdg_surface.ack_configure' requests, as is necessary according to spec.
What we didn't do was to clear this state when hiding, meaning that if
we hid the surface after a configure event, but before the frame
finished and we processed the 'has_uncommitted_ack_configure', we'd try
to acknowledge the surface configuration after having destroyed the
surface.
Closes : #3262
2020-10-15 14:56:06 +02:00
Matthias Clasen
8737692b2b
atspi: Implement Selection for list views
...
This implementation works for both GtkListView and
GtkGridView, and by extension, also for GtkColumnView
and GtkDropDown, since those just use a list view
internally.
2020-10-15 08:35:06 -04:00
Xavier Claessens
fe89fd2317
meson: Fix error when epoxy is a subproject on Windows
...
epoxy_dep cannot be used in a configure time check when it comes from a
subproject. Use variables set in pc file instead.
This requires https://github.com/anholt/libepoxy/pull/231 .
2020-10-15 08:01:16 -04:00
Matthias Clasen
c7bf33a3de
columnview: Set accessible roles
...
Use the TREE_GRID, ROW, COLUMN_HEADER and GRID_CELL roles
for the various widgets involved in a GtkColumnView. To
enable this, we subclass GtkListView for the internal
list in the column view.
2020-10-15 00:16:25 -04:00
Matthias Clasen
6d562b6176
listview: Set accessible roles
...
Use the LIST and LIST_ITEM roles for GtkListView
and its children. Use the GRID and GRID_CELL roles
for GtkGridView and its children.
2020-10-14 23:34:51 -04:00
Matthias Clasen
1bf21d3dba
Document accessible roles for stacks and notebooks
...
This was forgotten when I implemented the Tabs pattern.
2020-10-14 22:27:09 -04:00
Matthias Clasen
14640cec85
flowbox: Set accessible roles
...
Use the GRID and GRID_CELL roles for GtkFlowBox
and GtkFlowBoxChild.
2020-10-14 22:20:43 -04:00
Matthias Clasen
147868a30c
listbox: Set accessible roles
...
Use the LIST and LIST_ITEM roles for GtkListBox
and GtkListBoxRow.
2020-10-14 22:18:21 -04:00
Matthias Clasen
57ebc351a9
Merge branch 'wip/chergert/fix-macos-popup-events' into 'master'
...
macos: fix popup motion and button event delivery
See merge request GNOME/gtk!2694
2020-10-15 01:41:42 +00:00
Matthias Clasen
375bd5e691
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'
...
macos: fix crash when displaying a context menu
See merge request GNOME/gtk!2693
2020-10-15 01:41:06 +00:00
Matthias Clasen
f4f732694a
atspi: Add some docs
...
Add a comment that explains a few of the more subtle
points of the Atspi context tree contstruction.
2020-10-14 21:04:25 -04:00
Matthias Clasen
bf04beb711
atspi: Implement Selection for notebook tabs
...
This is a bit different from the way things were done
in GTK 3 - we follow what was done for GtkStackSwitcher,
and make the tab bar carry the GTK_ACCESSIBLE_TAB_LIST
role, and implement Selection there.
2020-10-14 21:04:25 -04:00
Matthias Clasen
08b586bb57
notebook: Set accessible roles and properties
...
Set up the necessary roles, relations and properties
for the tab patterns. This parallels what we have done
for GtkStackSwitcher, and implements the Tabs pattern
as described in the ARIA authoring guidelines.
2020-10-14 21:04:25 -04:00
Matthias Clasen
41d4c37563
atspi: Don't crash on unnamed stack pages
...
GtkNotebook creates unnamed stack pages, and we should
not crash when that happens.
2020-10-14 21:04:25 -04:00
Matthias Clasen
984e8ac5e3
gizmo: Add a way to set accessible role
...
This will be used for some of the gizmo used
inside GtkNotebook.
2020-10-14 21:04:25 -04:00
Matthias Clasen
512387afcc
atspi: Implement Selection for GtkStackSwitcher
2020-10-14 21:04:25 -04:00
Matthias Clasen
b39684b692
stackswitcher: Set up relations and states
...
Set up a CONTROLS relation between each tab button
and its page, and update the SELECTED property of
the buttons to match their active state.
2020-10-14 21:04:25 -04:00
Matthias Clasen
380488f829
stackswitcher: Use the tablist and tab roles
...
Set the tablist role on the stackswitcher itself, and
the tab role on the buttons. This is another step towards
implementing the tabs pattern for GtkStack.
2020-10-14 21:04:25 -04:00
Matthias Clasen
2370429752
accessible: Avoid realizing the context prematurely
...
platform change is called from gtk_widget_set_focusable
which is likely to be called early on in init(). We don't
want to create an AT context that early if we can help
it, e.g. since it makes it impossible to override the
accessible-role with a construct property.
2020-10-14 21:04:25 -04:00
Matthias Clasen
7c6c718e19
stack: Turn pages into accessibles
...
This requires some cleanup to remove assumptions
about accessibles being widgets in the backend,
and some code to navigate the tree with these
extra objects in between widgets.
The accessibles for stack pages have the role
GTK_ACCESSIBLE_ROLE_TAB_PANEL. This is the first
step towards implementing the tabs patterns
as described in the aria authoring guidelines
for GtkStack.
2020-10-14 21:04:17 -04:00
Christian Hergert
6e84c7c59e
macos: fix discover of surface under cursor
...
This was incorrectly reporting the toplevel surface instead of the
popup surface that was placed above it. This fixes event delivery
to popups for selecting menu items and more.
2020-10-14 16:59:38 -07:00
Christian Hergert
0af3d21573
macos: only emit popup-layout-changed after initial present
...
Otherwise we risk being re-entrant where GtkPopover will not have a
GdkPopupLayout causing other issues.
2020-10-14 16:28:44 -07:00
Christian Hergert
e089bba4f5
macos: ensure we have access to a GdkMonitor
2020-10-14 16:28:44 -07:00
Matthias Clasen
2dfced7edc
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'
...
macos: fix button release events outside of window during grabs
See merge request GNOME/gtk!2692
2020-10-14 23:04:03 +00:00
Christian Hergert
b462bc35c0
macos: allow pointer release event outside surface coords
...
This helps with grab situations so that we can end it when releasing
the pointer buttons outside of the window coordinates.
2020-10-14 15:45:50 -07:00
Christian Hergert
d700cfa2ef
macos: break grabs after sending release event
2020-10-14 15:45:50 -07:00
Christian Hergert
cdb2c1698c
macos: dont send crossing events during grab
...
Fixes an issue where we can't drag scrollbars or text selections while
outside of the application window.
2020-10-14 15:45:50 -07:00
Matthias Clasen
85394b04e0
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'
...
GTK4: fix macos device state query for surfaces
See merge request GNOME/gtk!2690
2020-10-14 19:10:11 +00:00
Matthias Clasen
a772d8fcac
Merge branch 'wip/baedert/for-master'
...
Leaving out the gboolean -> bool change.
2020-10-14 15:07:09 -04:00
Timm Bäder
f93784f9e7
pixbufutils: Pass calculated height value along
2020-10-14 15:06:13 -04:00
Timm Bäder
d695b15f1a
main: Make sure we don't leak axes
...
Mainly a change to appease the static analyzer
2020-10-14 15:06:13 -04:00
Timm Bäder
e1e53cd8cc
infobar: Remove unused include
2020-10-14 15:06:12 -04:00
Timm Bäder
211d669ae7
overlay: Remove empty finalize implementation
2020-10-14 15:06:12 -04:00
Timm Bäder
20bd8e56ee
gtk4-demo: Add missing margin-bottom
...
This was setting margin-end twice
2020-10-14 15:06:12 -04:00
Timm Bäder
df2d7c56c7
gtk4-demo: Remove connection to removed signal
2020-10-14 15:06:12 -04:00
Timm Bäder
8f24b7ad27
stacksidebar: Fold some functions into their only callers
2020-10-14 15:06:12 -04:00
Timm Bäder
61afb0984c
stacksidebar: Set GtkListBox:show-separators
...
Instead of doing this ourselves
2020-10-14 15:06:12 -04:00
Timm Bäder
93b12a8110
frame: Remove need_resize logic
...
gtk_widget_set_parent() will queue a resize anyway.
2020-10-14 15:06:12 -04:00
Timm Bäder
d9cc589339
windowcontrols: gtk_widget_get_root() can return NULL
2020-10-14 15:06:12 -04:00
Timm Bäder
557a363b4f
windowcontrols: decoration-layout is nullable
2020-10-14 15:06:12 -04:00
Timm Bäder
ae009b344f
stylecontext: Remove some unnused includes
2020-10-14 15:06:12 -04:00
Timm Bäder
78c343ba96
snapshot: Refactor some device code
...
Make a bit clearer what this does.
2020-10-14 15:06:12 -04:00
Timm Bäder
eca3eab96f
Remove unneeded gtkstylecontext.h includes
2020-10-14 15:06:12 -04:00
Timm Bäder
2bcef7f030
stylecontext: Remove render_insertion_cursor()
...
This is unused and there already is a snapshot alternative.
2020-10-14 15:06:12 -04:00
Timm Bäder
18c4bdad6f
widget: Remove gtk_widget_list_devices() from private header
2020-10-14 15:06:12 -04:00
Timm Bäder
f20795471c
window: Remove unused struct member
2020-10-14 15:06:12 -04:00
Timm Bäder
ec8f329332
widget: Slightly update opacity docs
2020-10-14 15:06:12 -04:00
Timm Bäder
07fb33c033
gl renderer: Fix private function name
...
It's a GskGLRenderer, not a GskGLRender
2020-10-14 15:06:12 -04:00
Timm Bäder
1fe7043be4
gl renderer: Add more scale_x/scale_y code
...
We really need all of this to be aware of both dimensions of course...
2020-10-14 15:06:12 -04:00
Timm Bäder
0e6014f2f6
gl renderer: Remove two unused uniforms
2020-10-14 15:06:12 -04:00
Timm Bäder
0a4d442849
gl renderer: return empty texture for too small blurred nodes
2020-10-14 15:06:12 -04:00
Timm Bäder
5f9fa13c65
gl renderer: Use op builder to render flipped texture
...
Otherwise, we don't know about the uniform state
2020-10-14 15:06:12 -04:00
Timm Bäder
da0abfce3a
showrendernode: Plug GOptionContext memory leak
2020-10-14 15:06:12 -04:00
Timm Bäder
161b171004
gl renderer: Remove unused parameter
2020-10-14 15:06:12 -04:00
Timm Bäder
4eee6e732b
filechooserwidget: Cosmetics
2020-10-14 15:06:12 -04:00
Timm Bäder
958e4be86d
testfilechooser: Stop listening to ::selection-changed
...
Doesn't exist anymore.
2020-10-14 15:06:12 -04:00
Timm Bäder
eb345cd033
gl renderer: Use nearest filtering for textures in render_texture()
...
Makes the output in the node editor a bit more bearable.
2020-10-14 15:06:12 -04:00
Timm Bäder
ef7c5747c4
build: Only add -Wcast-align for gcc
...
Either we or clang needs to get its shit together about this warning.
But using it during development with clang just makes actually usable
warnings get lost in a flood of -Wcast-align warnings.
2020-10-14 15:06:12 -04:00
Timm Bäder
f456438051
vulkan: Remove double initialization
...
Clang said:
../gsk/vulkan/gskvulkanrenderpass.c:250:5: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
.render.node = node
^~~~~~~~~~~~~~~~~~~
../gsk/vulkan/gskvulkanrenderpass.c:249:13: note: previous initialization is here
.type = GSK_VULKAN_OP_FALLBACK,
^~~~~~~~~~~~~~~~~~~~~~
2020-10-14 15:06:12 -04:00
Timm Bäder
4735c27e69
gl renderer: Avoid some code duplication
2020-10-14 15:06:12 -04:00
Timm Bäder
44f10c5861
gl renderer: Flip texture in render_texture()
2020-10-14 15:06:12 -04:00
Timm Bäder
44d1e81ae9
glsl: Add a comment
2020-10-14 15:06:12 -04:00
Timm Bäder
c5909d4dc4
gtkbuilder: Remove pointless function prototype
2020-10-14 15:06:12 -04:00
Timm Bäder
9698cd67a1
gdkgl: Remove flipping when downloading GL texture
...
This fix is correct and fixes:
1) GL textures being upside down in the inspector. They are getting
downloaded because they've been created in a different GL context
2) GL textures being upside down in the cairo renderer (same reason)
However, it breaks the testsuite. We do the flipping via the projection
matrix, but most of the shaders don't care about that.
2020-10-14 15:06:12 -04:00
Timm Bäder
d4efb5b738
gdkgl: Stop getting the clip region from cairo
...
Unused
2020-10-14 15:06:12 -04:00
Timm Bäder
ddcff9eb0f
gl renderer: simplify ->render() implementation a bit
...
We already use self->scale_factor when initialized whole_surface,
so set self->scale_factor first.
2020-10-14 15:06:12 -04:00
Timm Bäder
9fe21b7181
shaderbuilder: Print error message after source code
...
My terminal scrolls down, so showing the error message last makes sense.
2020-10-14 15:06:12 -04:00
Timm Bäder
7bf858b9d0
gl renderer: Add a helper to setup projection matrix
2020-10-14 15:06:12 -04:00
Timm Bäder
bc034d1190
gl renderer: Ignore rendering if accumulated opacity is too small
2020-10-14 15:06:12 -04:00
Timm Bäder
904772c719
gdkgl: Rename function
...
This returns the name of the shader type.
2020-10-14 15:06:12 -04:00
Timm Bäder
7222a0901d
unblurred outset shadow shader: Use premultiply()
2020-10-14 15:06:12 -04:00
Timm Bäder
a0bb248bb3
gl renderer: Use premultiply() in inset shadow shader`
2020-10-14 15:06:12 -04:00
Timm Bäder
0dc0b03d6f
glarea demo: Add min size to gl area
2020-10-14 15:06:12 -04:00
Timm Bäder
9f574a596f
gdkgl: Remove unused cairo_get_matrix() call
2020-10-14 15:06:12 -04:00
Timm Bäder
4b8f3e9b92
colorscale: Refactor creating the hue texture
...
Make this a bit shorter and don't call gtk_hsv_to_rgb in the inner
loop as that is unnecessary.
2020-10-14 15:06:12 -04:00
Timm Bäder
769b15c29b
colorplane: Remove (un)realize handlers
...
Creating the texture in realize() is unnecessary these days, since we
can just rely on size_allocate to do that.
2020-10-14 15:06:12 -04:00
Timm Bäder
8e9a810045
colorutils: Refactor hsv_to_rgb and fold into only caller
2020-10-14 15:06:12 -04:00
Timm Bäder
663ae67935
colorplane: Refactor create_texture()
...
Create a R8G8B8 texture here so we don't waste memory and do work for
an alpha channel we don't care about.
2020-10-14 15:06:12 -04:00
Timm Bäder
76e4002226
colorutils: Remove unused macro
2020-10-14 15:06:12 -04:00
Timm Bäder
ae71fe3739
colorplane: Whitespace
2020-10-14 15:06:12 -04:00
Emmanuele Bassi
66ce0cbec0
Generate introspection for GdkWayland API
...
Like we do for GdkX11. We can't use all of the public C API, but we can
expose enough type information to allow non-C developers to actually
check if they are running the Wayland GDK backend or not—plus some
additional Wayland-specific API.
2020-10-14 15:06:12 -04:00
Emmanuele Bassi
fe871f9d46
Add type annotations for GdkWayland API
...
The GdkWayland API takes generic GDK types and performs a run time
check, which means we need to properly annotate the actual expected
type in order to have methods recognised as such.
2020-10-14 15:06:12 -04:00
Emmanuele Bassi
40e4f3758e
Skip GdkWayland symbols that use wayland-client types
...
The wayland-client API does not have introspection annotations, so we
can't use these types anyway.
2020-10-14 15:06:12 -04:00
Aurimas Černius
2fb1f4a747
Updated Lithuanian translation
2020-10-14 15:06:12 -04:00
Christian Hergert
fb02c99868
macos: port gtk to GDK_WINDOWING_MACOS
...
For the various uses of GDK_WINDOWING_QUARTZ, we need to use
alternatives from GDK_WINDOWING_MACOS.
Some minor loss of functionality is here, such as icons sent with
application menus. That can certainly be added back at a future
point.
2020-10-14 15:06:12 -04:00
Christian Hergert
036b56a43b
gtk: use GDK_WINDOWING_MACOS in gentypefuncs.py
2020-10-14 15:06:12 -04:00
Christian Hergert
9279c2cbd1
gdk: remove quartz subdirectory from backends
2020-10-14 15:06:12 -04:00
Christian Hergert
aed279ed4e
macos: add key equivalent helper
...
This is needed by quartz code in gtk/.
2020-10-14 15:06:12 -04:00
Christian Hergert
cc2e69cbd8
macos: remove workaround for scroll delta
...
This gets handled differently in gtk/ and so we shouldn't translate it here.
2020-10-14 15:06:12 -04:00
Christian Hergert
ff279d03b2
macos: track various changes in GDK
2020-10-14 15:06:12 -04:00
Christian Hergert
1519b40ffa
macos: lookup NSEvent by translated GdkEvent
...
This will be needed by the quartz imcontext.
2020-10-14 15:06:12 -04:00
Christian Hergert
28d2e608f9
macos: move input method names to private header
2020-10-14 15:06:12 -04:00
Piotr Drąg
c753f8f30b
Update Polish translation
2020-10-14 15:05:46 -04:00
Marek Černocký
58769467cf
Updated Czech translation
2020-10-14 15:05:46 -04:00
Matthias Clasen
8a361f901d
gtk-demo: Keep undisplayable resources out of view
...
No point in showing an apologetic tab for a blob of binary data.
gtk4-demo shows the resources under /DEMONAME/ for each demo,
so move the data to /DEMONAME_data/.
2020-10-14 15:05:46 -04:00
Matthias Clasen
9b26660095
Send focus events to the root
...
We are not propagating focus change events, and that is the only
place where we are listening for focus change events. If GtkWindow
does not see focus-in events for its popovers, we end up with
inadvertendly inactive windows.
Fixes : #3240
2020-10-14 15:05:46 -04:00
Matthias Clasen
8dce92e82b
window: Be more careful when looking for focus
...
When passing focus up to a parent, make sure the
newly chosen focus widget actually accepts the focus.
2020-10-14 15:05:46 -04:00
Matthias Clasen
2d927d0ee0
build: Require sysprof 3.38.0
...
We use sysprof_collector_request_counters, which
was introduced in sysprof 3.38.0.
2020-10-14 15:05:46 -04:00
Matthias Clasen
2273e27808
gtk-demo: Ellipsize columns in the characters demo
...
some of the columns have uneven widths, causing them
to bounce around as you scroll. Ellipsize them and
give them a fixed with.
2020-10-14 15:05:46 -04:00
Matthias Clasen
2bdc8c7d9e
docs: Add more details to the migration guide
...
Add some details about GdkSurface and GtkWindow api changes.
Fixes : #3242
2020-10-14 15:05:45 -04:00
Christian Hergert
9f01d4fe44
macos: fix coordinates and state when querying device
...
When querying a device, we need to ensure we are providing coordinates
in the coordinate system of the surface. Further, we need to actually
provide the button and keyboard state.
This fixes some issues related to dragging scrollbars and selecting list
box rows more reliably.
2020-10-14 11:34:44 -07:00
Christian Hergert
d5b5410b8f
macos: use simple monotonic for event serial
2020-10-14 11:34:44 -07:00
Christian Hergert
d6abc125ad
macos: fix compiler warnings
2020-10-14 11:34:44 -07:00
Matthias Clasen
2142c6c086
docs: Fix a copy-paste error
2020-10-14 08:23:06 -04:00
Emmanuele Bassi
9377192102
Correctly annotate gdk_wayland_seat_get_wl_seat()
...
We expect a `GdkWaylandSeat` as the instance parameter.
2020-10-14 11:57:06 +01:00
Emmanuele Bassi
da007ac97b
Add a public header for GdkWaylandSeat
...
We have public API requiring it as a type.
2020-10-14 11:55:34 +01:00
Jakub Steiner
974ce500d6
Merge branch 'wip/jimmac/sidebar-hover-selected-focus' into 'master'
...
Adwaita: selected:hover and focus:selected:hover states
Closes #3251
See merge request GNOME/gtk!2686
2020-10-14 07:36:06 +00:00
Matthias Clasen
b818b34143
Cosmetics
...
Fix a few copy-paste errors.
2020-10-13 21:27:56 -04:00
Matthias Clasen
32d8db103a
Cosmetics
...
Avoid typo-prone repetition of the full interface names.
We have them in the introspection data already.
2020-10-13 18:58:25 -04:00
Matthias Clasen
9955d900db
dropdown: Use the combox accessible role
...
Its really just a combobox with another name.
2020-10-13 18:31:53 -04:00
Matthias Clasen
e3620bdc22
combobox: Use the combobox accessible role
...
Makes sense.
2020-10-13 17:53:39 -04:00
Matthias Clasen
b15328e0d6
atspi: Implement Selection for GtkFlowBox
...
This is a copy of the listbox implementation.
2020-10-13 17:24:06 -04:00
Matthias Clasen
2664c29454
flowbox: Update accessible state for children
...
Set the SELECTED state to reflect whether the selected
is selected, unselected, or unselectable. This is
enough to make selection changes appear in Accerciser.
While we are at it, also set the multi-selectable
property for the flowbox itself.
2020-10-13 17:24:06 -04:00
Matthias Clasen
db97f99359
atspi: Implement Selection for GtkComboBox
...
This doesn't really work in Accerciser. But then,
neither does the GTK 3 implementation from which
this is copied.
2020-10-13 17:24:06 -04:00
Matthias Clasen
caeea0e368
Remove excessively spammy debug messages
...
Non need to announce the same things for every context
we create, and the path is not really that interesting.
without knowing what it belongs to. I would suggest to
make it visible in the inspector instead, so you can
look it up for the widgets you are interested in.
2020-10-13 17:24:06 -04:00
Matthias Clasen
d0753f645e
Fix compiler warnings
2020-10-13 17:24:06 -04:00
Matthias Clasen
81e107885c
Remove some unused code
2020-10-13 17:24:06 -04:00
Matthias Clasen
8f4bc4a65d
atspi: Fix a variant parser oversight
...
When you pass a variant, the format needs an @.
GVariant is not your friend.
2020-10-13 17:24:06 -04:00
Matthias Clasen
08f57d5c3d
atspi: Implement Selection for listbox
...
Implement the selection interface for GtkListBox.
This also includes a convenience api for context
addresses: gtk_at_spi_context_to_ref.
2020-10-13 17:24:06 -04:00
Matthias Clasen
3cc9ac406d
listbox: Update accessible state for rows
...
Set the SELECTED state to reflect whether the row
is selected, unselected, or unselectable. This is
enough to make selection changes appear in Accerciser.
While we are at it, also set the multi-selectable
property for the listbox itself.
2020-10-13 17:24:06 -04:00
Jakub Steiner
f1e9f853de
Adwaita: selected:hover and focus:selected:hover states
...
- getting pretty deep, but visually seems to make sense. Selected row hovers
increase contrast.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3251
2020-10-13 21:27:17 +02:00
Matthias Clasen
18b6c4e69d
Merge branch 'wip/carlosg/for-master' into 'master'
...
Cascade-close popovers by default
Closes #3200
See merge request GNOME/gtk!2685
2020-10-13 19:25:59 +00:00
Matthias Clasen
ccbacb5cce
Fix the build
...
I forgot a few casts in a02c50e72f
.
2020-10-13 11:23:13 -04:00
Carlos Garnacho
a939203e6e
gtkmodelbutton: Drop special case to close GtkPopoverMenu
...
With ::cascade-popdown in place, this special case is not necessary
anymore.
2020-10-13 16:55:53 +02:00
Carlos Garnacho
3ba60b06fe
gtkpopover: Remove GtkPopoverMenu special case
...
Now that there's ::cascade-popdown, we don't need to treat
GtkPopoverMenu especially here.
2020-10-13 16:55:53 +02:00
Carlos Garnacho
024d832d94
gtkpopover: Add cascade-popdown property/functions
...
And honor it in gtk_popover_popdown(). By default, a GtkPopover
pops down automatically if a child popover was closed, if this
property is FALSE, the popover will remain opened.
2020-10-13 16:55:53 +02:00
Matthias Clasen
b909455154
atspi: Fix up the role for password entries
...
We use to set the the 'password text' role for entries with
visibility = FALSE. Nowadays, we have a separate class for
password entries, so fix up the role mapping based on that.
2020-10-13 10:52:43 -04:00
Matthias Clasen
bf0f3a82cf
atspi: Make text change notification work
...
Make text change notification work for editables, by connecting
to the ::insert-text and ::delete-text signals on the wrapped
GtkText widget, and for GtkTextView by connecting to the
corresponding GtkTextBuffer signals.
This code is more or less directly copied from GtkTextViewAccessible
and GtkEntryAccessible in GTK 3.
2020-10-13 09:44:04 -04:00
Matthias Clasen
a02c50e72f
text: Make editable signals work again
...
Since the big editable reorg, GtkText was not emitting
::insert-text and ::delete-text, as is expected of
editables. We want to use those signals for a11y
change notification, so make them work again.
2020-10-13 00:49:10 -04:00
Matthias Clasen
81440675af
atspi: Set placeholder-text attribute
...
This is how GTK3 passes placeholder-text to orca,
and it works - orca reads it.
2020-10-12 23:31:03 -04:00
Matthias Clasen
3af56f5216
atspi: Implement EditableText interface for the entry wrappers
...
Drop the EditableText implementation for GtkText,
and implement it for all the wrapper widgets instead.
2020-10-12 22:07:18 -04:00
Matthias Clasen
63dd0405c7
accessible: Add some docs
...
Explain briefly how a11y works for entry wrappers
(since I won't remember a few months from now).
2020-10-12 21:58:49 -04:00
Matthias Clasen
b7ac660f37
atspi: Implement Text interface for the entry wrappers
...
Drop the Text implementation for GtkText, and implement
it for all the wrapper widgets instead.
2020-10-12 21:45:48 -04:00
Matthias Clasen
76b87272a6
spinbutton: Implement GtkAccessible
...
This copies what was done for GtkEntry: get
the focused state from the GtkText within.
We also add a private getter for the text widget,
which was missing here.
2020-10-12 21:45:48 -04:00
Matthias Clasen
852c72fa28
passwordentry: Implement GtkAccessible
...
This copies what was done for GtkEntry: get
the focused state from the GtkText within.
2020-10-12 21:45:48 -04:00
Matthias Clasen
f796d02fea
searchentry: Implement GtkAccessible
...
This copies what was done for GtkEntry: get
the focused state from the GtkText within.
2020-10-12 21:45:48 -04:00
Matthias Clasen
8faf1f64ee
entry: Implement GtkAccessible
...
Override the get_platform_state vfunc to get
the focused state from the GtkText widget within.
2020-10-12 21:45:48 -04:00
Matthias Clasen
8182fab4d9
text: Ignore text widgets for a11y
...
We want to implement the Text interface on the
wrapper entries.
2020-10-12 21:45:48 -04:00
Matthias Clasen
d0d7848cf2
atspi: Use gtk_accessible_get_platform_state
2020-10-12 21:45:48 -04:00
Matthias Clasen
ade9e4b82a
accessible: Add gtk_accessible_get_platform_state
...
As a companion to go with the platform_change api,
add a gtk_accessible_get_platform_state() function
that can be used by backends to get the platform
state.
This is in preparation for making entries inherit
their focus states from the text widget within.
2020-10-12 21:45:41 -04:00
Matthias Clasen
663934b2dc
atspi: Use gtk_accessible_should_present
...
Replace explicit visibility check by this
more general method of determining whether
an accessible should be presented to the
a11y layer.
2020-10-12 21:43:17 -04:00
Matthias Clasen
d9adc1b5aa
accessible: Add a way to hide accessibles
...
Similar to gtk_widget_should_layout(), add a
gtk_accessible_should_present() function that backends can
use to determine whether an accessible should be presented
or not.
Ways to make a widget not presented in a11y:
- hide the widget
- set its role to NONE
- make it have a NULL AT context
We will use this in future to hide the GtkText inside
an entry, since the Text implementation will be done
by the wrapper.
2020-10-12 21:43:17 -04:00
Matthias Clasen
3bfb32e699
Cosmetics
2020-10-12 21:43:17 -04:00
Matthias Clasen
5eb482ebaa
atspi: Treat all entries the same for collecting state
...
We are determining editable state based on the
accessible role (although we could make it platform
state now), so cover all the roles that we use for
entry wrappers.
2020-10-12 21:43:17 -04:00
Matthias Clasen
61474b5a94
atspi: Fix collecting states
...
This is somewhat embarrassing.
2020-10-12 21:42:51 -04:00
Matthias Clasen
8f63443393
Fix the build
2020-10-12 21:37:09 -04:00
Matthias Clasen
dd650ff90e
atspi: D-Bus methods return tuples
...
I've learned this the hard way: When returning a
value from a D-Bus call, the variant construct must
*always* be g_variant_new ("(...)"...
2020-10-12 15:50:36 -04:00
Matthias Clasen
101cbe690e
Don't unref a floating variant
...
It gets consumed somewhere along the way.
2020-10-12 15:10:40 -04:00
Matthias Clasen
62747eb243
atspi: Unregister objects on the bus
...
When a widget is going away, we need to remove
the context from the bus, or else ATs might have
the idea to call methods on them, leading to badness.
2020-10-12 15:10:40 -04:00
Matthias Clasen
d432cbb02b
atspi: Emit property changes for focus
...
With this orca, actually speaks \o/. Sadly, it only
says 'gtk modelbutton widget' so far, but its a start.
2020-10-12 15:10:40 -04:00
Matthias Clasen
45e82adf87
atspi: Cosmetics
...
Use simple wrappers instead of opencoding bit twiddling
all over the place.
2020-10-12 15:10:40 -04:00
Matthias Clasen
a2d220edfa
widget: Notify a11y of focus changes
...
This is using the new 'platform changes' mechanism
to tell the a11y backends when focus changes.
2020-10-12 15:10:40 -04:00
Matthias Clasen
b5ee73d299
a11y: Pass on platform changes
...
Add an enum for 'platform changes' to the at context
change notification mechanism. This will let us pass
along things that ARIA considers 'platform state' such
as focus or editability. The difference between the
platform state and other ARIA states is that we don't
keep the platform state separately in the at context
- backends are expected to just query the widgets.
This is just about avoiding notify listeners for
change notification.
2020-10-12 15:10:40 -04:00
Matthias Clasen
578c8b5068
atspi: Be more careful about indexes
...
Don't return a number for IndexInParent when we
don't have one.
2020-10-12 15:10:40 -04:00
Matthias Clasen
f9ee23825e
atspi: Set some more atspi states
...
Pass on more of the states that are represented
as properties in aria: modal, multi-line, orientation.
2020-10-12 15:10:40 -04:00
Matthias Clasen
35f70d5a99
Pass orientation property to accessible
...
We should set the accessible properties we have,
where they make sense. So set orientation, if the
widget is orientable.
2020-10-12 15:10:40 -04:00
Matthias Clasen
54f1eb4c04
wip: Emit StateChanged signals
...
This is not fully baked, but it is enough to make accerciser
notice when a text entry goes from editable to not editable.
2020-10-12 15:10:40 -04:00
Matthias Clasen
66a81f1187
atspi: Derive readonly state from aria properties
...
We can use the read-only property, together with the
accessible role, to determine whether to set editable
and read-only states for at-spi. This lets us avoid
directly poking at the widgets.
2020-10-12 15:10:40 -04:00
Matthias Clasen
2a5af4e1d6
text: Set the readonly accessible property
...
This mirrors what we already do for GtkTextView.
2020-10-12 15:10:40 -04:00
Matthias Clasen
d37b0357b3
atspi: Set editable state
...
ATs look at not just the implemented interfaces, but
also the states to decide what to do. It turns out that
the EditableText interface is only used by accerciser
if the editable state is set. So set it.
2020-10-12 15:10:40 -04:00
Matthias Clasen
aea25cbbe5
atspi: Implement EditableText interface
...
Implement EditableText for GtkText and GtkTextView.
2020-10-12 15:10:40 -04:00
Matthias Clasen
a72a7d4aeb
atspi: Break out the Value implementation
...
This isn't necessarily very big, but it keeps
the widget checks out of gtkatspicontext.c, and
it is a nice pattern.
2020-10-12 15:10:40 -04:00
Matthias Clasen
d38182bb5d
atspi: Break out the Text implementations
...
Move the implementation of the Text interface
to its own source file, and split it up along
widget lines, to avoid it becoming too messy.
2020-10-12 15:10:40 -04:00
Matthias Clasen
f22edccb2a
scalebutton: Set accessible value properties
...
This is what we did in GTK 3.
2020-10-12 15:10:40 -04:00
Matthias Clasen
dc9fee6185
paned: Set accessible value properties
...
This is what we did in GTK 3.
2020-10-12 15:10:40 -04:00
Matthias Clasen
776b4aee0c
Simplify GetInterfaces handling
...
It is error prone to keep the same conditions in sync
in two places. Instead, just assemble the list of interfaces
as we register objects, and use when GetInterfaces is called.
2020-10-12 15:10:40 -04:00
Matthias Clasen
d37782c533
atspi: Implement Value for more widgets
...
Apply the Value implementation to the widgets where
we had one in GTK 3: GtkLevelBar, GtkRange, GtkScaleButton,
GtkSpinButton, GtkPaned, GtkProgressBar. To make these
work, the widgets need to set the accessible value properties.
2020-10-12 15:10:40 -04:00
Matthias Clasen
8c3e5124c2
atspi: Implement Value interface for ranges
2020-10-12 15:10:40 -04:00
Matthias Clasen
190059dca1
atspi: Implement Text interface for text views
...
With this, all relevant widgets support the
Text interface.
2020-10-12 15:10:40 -04:00
Matthias Clasen
925ef1f90f
atspi: Add textview utilities
...
These are very similar to the pango utilities,
and are copying code from the textview accessible
implementation in GTK 3.
2020-10-12 15:10:40 -04:00
Matthias Clasen
ba63daa1d2
atspi: Export more pango utils
...
We are going to reuse some of the code that does
the pango -> atspi attribute conversion for text
tags.
2020-10-12 15:10:40 -04:00
Matthias Clasen
5b076fee12
atspi: Implement text for GtkText widgets too
...
There is some open question here whether the interface
should be implemented on the outer or the inner widget
of the entry-text pairs. For now, our hand is forced,
since only GtkText provides access to the layout that
we need for implementing many of the interface methods.
2020-10-12 15:10:40 -04:00
Matthias Clasen
b80272a7e7
atspi: Implement Text interface for labels
...
This is a not-quite-complete implementation of the
Text interface for GtkLabel. The missing parts are
anything around extents and positions, as well as
the ScrollSubstring apis.
2020-10-12 15:10:40 -04:00
Matthias Clasen
7c8a16812e
atspi: Add pango utilities
...
This code is more or less a direct copy of what
we had in gtkpango.c in 3.x.
2020-10-12 15:10:40 -04:00
Matthias Clasen
ddb72accc0
atspicontext: Fix GetIndexInParent for toplevels
...
For toplevels, we need to return the index in the
list of toplevels, since that is what GtkAtspiRoot
is using.
2020-10-12 15:10:40 -04:00
Matthias Clasen
824ab7e4ed
atcontext: labelled-by has a reference list
...
This is unclear - our docs state that all the
relations have value type reference, but in fact
they all have value type reference list.
2020-10-12 15:10:40 -04:00
Matthias Clasen
3a867e26d0
atspicontext: Implement GetRelationSet
...
This translates relations as far as the match.
I'm not sure yet what we can do about the fact that
atspi expects relations to be bidirectional (ie have
label-for *and* labelled-by) while aria has only one
direction.
2020-10-12 15:10:40 -04:00
Matthias Clasen
e269cb7a81
atspiroot: Stub out GetRelationSet
...
This needs to be fully implemented, for now sending
an empty relation set back prevents accerciser from
getting hung up.
2020-10-12 15:10:40 -04:00
Matthias Clasen
0ae2ae7944
atspi: Add the AtspiRelationType enum
...
This is what we need to map the aria relation
types to.
2020-10-12 15:10:40 -04:00
Matthias Clasen
5db6c4b038
Move atspi enums to gtkatspiprivate.h
2020-10-12 15:10:40 -04:00
Matthias Clasen
db6bd018ca
Add a GetInterfaces method
...
It turns out that accerciser depends on this undocumented
method that is not in the xml at all, otherwise interface
sections in the accerciser ui never get enabled.
2020-10-12 15:10:40 -04:00
Matthias Clasen
9d43e5bd59
Don't pass NULL to g_variant_new_string
...
That does not work.
2020-10-12 15:10:40 -04:00
Matthias Clasen
edfc55ae89
atspi utils: Fix an oversight
...
gtk_accessible_role_to_atspi_role must always return
an atspi role. The fallback was returning an aria
role.
2020-10-12 15:10:40 -04:00
Matthias Clasen
d6b64b5e29
Fixup: Add a forgotten #pragma once
2020-10-12 15:10:40 -04:00
Emmanuele Bassi
13aa053f6b
Rename libgtk_only symbol in GdkWaylandToplevel
...
All public non-exported symbols in GDK can be used by GTK.
2020-10-12 16:49:10 +01:00
Emmanuele Bassi
4f316f3249
docs: Remove private GdkWayland API from the reference
2020-10-12 16:44:36 +01:00
Emmanuele Bassi
38304fc138
Hide gdk_wayland_display_prefers_ssd()
...
The function is not exported, so it should not be in a public header.
2020-10-12 16:44:05 +01:00
Emmanuele Bassi
da6c0f3ecb
Move private GdkSurface Wayland API into its own header
...
This allows us to hide private API from installed headers,
documentation, and introspection.
2020-10-12 16:40:19 +01:00
Emmanuele Bassi
9ce790032d
a11y: Convenience API for referencing ATSPI root node
...
We turn the root node into a reference fairly often, so it's worth it to
have a utility function that does this for us.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
35163bd7cc
a11y: Add utility function for null refs
...
ATSPI was written for CORBA, which allows passing around "nil"
as valid object references.
2020-10-12 16:19:32 +01:00
Matthias Clasen
9d0952bd7f
atspicontext: Implement GetState
...
Translate the aria states to at-spi's interpretation
of atk states.
2020-10-12 16:19:32 +01:00
Matthias Clasen
e189ccc8ed
atspiroot: Fix GetState implementation
...
When the GetState signature says 'au', it actually
means a bitset that is sent as a pair of 32bit integers.
2020-10-12 16:19:32 +01:00
Matthias Clasen
762fbf34fc
atspiroot: Implement GetIndexInParent
...
Just for good measure
2020-10-12 16:19:32 +01:00
Matthias Clasen
9f73638d43
atspicontext: Implement GetIndexInParent
...
This is needed for ATs to take our tree seriously.
2020-10-12 16:19:32 +01:00
Matthias Clasen
057b447137
atspicontext: Implement more accessible api
...
Implement GetChildAtIndex, GetChildren and ChildCount.
2020-10-12 16:19:32 +01:00
Matthias Clasen
78690845b1
atspiroot: Implement GetChildren
...
No surprises here.
2020-10-12 16:19:32 +01:00
Matthias Clasen
2ea338a8cf
atspiroot: Don't leak references
...
The reffing getter trap, lurking behind g_list_model_get_item().
2020-10-12 16:19:32 +01:00
Matthias Clasen
e2f3039663
atspiroot: Implement GetLocale
2020-10-12 16:19:32 +01:00
Matthias Clasen
8f20133769
atspicontext: Print out the a11y bus address
...
Make our debug spew useful: Having the bus address
makes it easy to jump on the a11y bus to look around
with dbus tools.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
55b1fbd0f3
a11y: Localise the role name of the root node
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
b57f1588df
a11y: Register the Accessible interface on all AtSpiContext instances
...
This is not a complement implementation.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
60acdb9cad
a11y: Implement more ATSPI methods on the root node
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
07759b158a
a11y: Add method to extract desktop data
...
We are going to need the desktop name and path to populate the parent
property of AtSpiContexts associated to top level widgets.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
9511c8273a
a11y: Validate the DBus context path
...
UUIDs use dashes to separate the various blocks; unfortunately, this
results in an invalid DBus object path. Replace the dashes with an
underscore.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
b85b1f5b51
a11y: Turn accessible roles to string
...
Add a simple utility function to turn GtkAccessibleRole values into the
appropriate string, including localization.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
716024d882
a11y: Convert GTK roles to ATSPI ones
...
There's not a precise, 1:1 mapping between the newer ARIA roles and the
older ATSPI ones. We make do with what we have.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
21482e8264
a11y: Compute the label for a GtkATContext
...
The ARIA spec defines the mechanism for determining the name of an
accessible element—see §4.3 of the WAI-ARIA spec.
We follow the specification as much as it makes sense for GTK to do
so:
1. if the element is hidden, return an empty string
1. if the element has a labelled-by relation set, retrieve the
label of the related element
2. if the element has a label property set, use the value of
the property
3. if neither labelled-by nor label attributes are set, we use
the role to compute the name:
- for a `range` role, we return the contents of the value of
the `value-text` or `value-now` properties
- for any other role, we return a textual representation of
the GtkAccessibleRole enumeration value
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
88113956a3
tests: Use the test ATContext for every test
...
Otherwise we're going to need a full desktop session in order to run the
test suite.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
e6c5d57ffe
a11y: Return the ATSPI role for the root element
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
d7ebf18723
a11y: Add AT-SPI cache object
...
Right now, the cache is unused, and we still need to implement the
serialisation method and emit the signals.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
658d910967
a11y: Ignore widgets during destruction
...
There's no point in creating a GtkATContext when a widget is getting
destroyed.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
bd43e9cfc5
a11y: Register the accessible root object
...
When we create the first AT-SPI context we also need to register the
accessible root on the accessibility bus. The accessible root object is
the main entry point of an accessible application, and it holds the
global state to present to the ATs that connect to the bus.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
8c18480092
a11y: Add a display to GtkATContext
...
Since we need to check at run time what kind of AT context to use, we
need a hook into the whole GDK backend machinery. The display connection
seems to be the best choice, in this case, as it allows us to determine
whether we're running on an X11 or Wayland system, and thus whether we
should create a GtkAtSpiContext.
This requires some surgery to fix the GtkATContext creation function, in
order to include a GdkDisplay instance.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
8f19bb0832
a11y: Add dummy AT-SPI context
...
Does not do anything, at the moment, but it's going to get filled out
soon.
The backend is selected depending on the platform being compiled in;
since we're using AT-SPI on X11 and Wayland, and we don't have other
accessibility implementations, we currently don't care about run time
selection, but we're going to have to deal with that.
2020-10-12 16:19:31 +01:00
Emmanuele Bassi
c50916d27b
a11y: Add the AT-SPI DBus descriptions
...
And generate the code for the DBus interfaces.
We don't want the full object manager experience, here, because we're
going to have a single object responding to various interfaces and
remote method calls. For this reason, we're not using the gnome module
in Meson to call gdbus-codegen for us: we need to use the interface info
command line arguments, and those are not available from Meson.
2020-10-12 16:19:31 +01:00
Emmanuele Bassi
4b60e7470a
Use test AT context with installed tests
...
Otherwise we're going to need an AT-SPI service on the session, and the
accessibility bus.
2020-10-12 16:19:31 +01:00
Matthias Clasen
77d4729483
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2683
2020-10-12 14:39:39 +00:00
Emmanuele Bassi
daac36ea4c
Generate introspection for GdkWayland API
...
Like we do for GdkX11. We can't use all of the public C API, but we can
expose enough type information to allow non-C developers to actually
check if they are running the Wayland GDK backend or not—plus some
additional Wayland-specific API.
2020-10-12 14:07:26 +01:00
Emmanuele Bassi
f83ee2ab6a
Add type annotations for GdkWayland API
...
The GdkWayland API takes generic GDK types and performs a run time
check, which means we need to properly annotate the actual expected
type in order to have methods recognised as such.
2020-10-12 14:07:26 +01:00
Emmanuele Bassi
33e84edf0c
Skip GdkWayland symbols that use wayland-client types
...
The wayland-client API does not have introspection annotations, so we
can't use these types anyway.
2020-10-12 14:07:26 +01:00
Aurimas Černius
08fb8c1c2a
Updated Lithuanian translation
2020-10-11 17:25:45 +03:00
Matthias Clasen
035e303f83
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'
...
various build fixes for GDK/GTK on macos
See merge request GNOME/gtk!2680
2020-10-10 11:55:01 +00:00
Christian Hergert
07bb07abbe
macos: port gtk to GDK_WINDOWING_MACOS
...
For the various uses of GDK_WINDOWING_QUARTZ, we need to use
alternatives from GDK_WINDOWING_MACOS.
Some minor loss of functionality is here, such as icons sent with
application menus. That can certainly be added back at a future
point.
2020-10-09 20:08:23 -07:00
Christian Hergert
41101673c3
gtk: use GDK_WINDOWING_MACOS in gentypefuncs.py
2020-10-09 20:05:20 -07:00
Christian Hergert
97f03edae4
gdk: remove quartz subdirectory from backends
2020-10-09 20:04:27 -07:00
Christian Hergert
d8ba916586
macos: add key equivalent helper
...
This is needed by quartz code in gtk/.
2020-10-09 20:03:52 -07:00
Christian Hergert
3f519e4d9b
macos: remove workaround for scroll delta
...
This gets handled differently in gtk/ and so we shouldn't translate it here.
2020-10-09 20:02:38 -07:00
Christian Hergert
58f9413464
macos: track various changes in GDK
2020-10-09 20:02:18 -07:00
Christian Hergert
59cdd7ae69
macos: lookup NSEvent by translated GdkEvent
...
This will be needed by the quartz imcontext.
2020-10-09 19:59:21 -07:00
Christian Hergert
a30adfe1e0
macos: move input method names to private header
2020-10-09 19:56:21 -07:00
Christian Hergert
6706623731
demo: fix out of bounds array index usage
2020-10-09 19:55:25 -07:00