Commit Graph

74201 Commits

Author SHA1 Message Date
Matthias Clasen
f339cc276c gtk: Stop using gtk_widget_show/hide
gtk_widget_set_visible and gtk_window_present
are better alternatives, and calling gtk_widget_show
on newly created widgets is no longer necessary
anyway.
2022-11-28 14:34:55 -05:00
Matthias Clasen
90c986e493 Merge branch 'wip/corey/spi-logging' into 'main'
atspicontext: Log failure to connect to a11y

See merge request GNOME/gtk!5270
2022-11-28 01:29:10 +00:00
Matthias Clasen
ed6798e94c Merge branch 'work/zzag/wl-output-release' into 'main'
gdk/wayland: Prefer wl_output_release() over wl_output_destroy()

See merge request GNOME/gtk!5243
2022-11-27 22:21:29 +00:00
Corey Berla
16fd72e606 atspicontext: Log failure to connect to a11y
GTK depends on the a11y infrastructure to be in place unless GTK_A11Y is
set to none.  It appears that despite that, users attempt to
get around the a11y requirement without setting GTK_A11Y.
This can cause, amongst other issues, performance problems
with gtk applications.  Log failure to connect to the a11y
bus.
2022-11-27 14:13:13 -08:00
Matthias Clasen
3dae22efdb Merge branch 'fix-keymap-notify' into 'main'
Don't emit ::notify from a getter

See merge request GNOME/gtk!5267
2022-11-27 19:04:13 +00:00
Matthias Clasen
fe56f3413a Don't emit ::notify from a getter
GdkX11Keymap ddetermines the direction of the
keymap on demand, and was emitting notify::direction
2022-11-26 21:53:33 -05:00
Matthias Clasen
3b9eba6d9a Merge branch 'wip/corey/demo-file-dialog' into 'main'
gtk-demo: Application demo use open_finish()

See merge request GNOME/gtk!5264
2022-11-26 18:11:41 +00:00
Corey Berla
586c3c3cbd gtk-demo: Application demo use open_finish() 2022-11-26 18:11:40 +00:00
Matthias Clasen
b5644c2596 Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Cosmetics

See merge request GNOME/gtk!5265
2022-11-26 13:15:28 +00:00
Matthias Clasen
e5cf55bdb4 gtk-demo: Cosmetics 2022-11-26 06:40:47 -05:00
Matthias Clasen
79a2e31635 Merge branch 'bilelmoussaoui/g-i' into 'main'
g-i: Add missing since annotation

See merge request GNOME/gtk!5259
2022-11-25 14:43:19 +00:00
Matthias Clasen
56dfc6c5ba Merge branch 'wip/smcv/xfail' into 'main'
testsuite: Avoid using should_fail

See merge request GNOME/gtk!5248
2022-11-25 14:40:33 +00:00
Bilal Elmoussaoui
5ede8dd1eb g-i: Add missing since annotation 2022-11-25 10:16:37 +00:00
Matthias Clasen
4fdeec118a Merge branch 'dialog-improvements' into 'main'
gtk-demo: Test cancellation support for file dialog

See merge request GNOME/gtk!5257
2022-11-25 03:48:04 +00:00
Matthias Clasen
e73f0f6974 file dialog: Handle Escape better
Closing the dialog by hitting Escape should
have the same effect as clicking the cancel
button. Make it so.
2022-11-24 10:29:43 -05:00
Matthias Clasen
ff14c51950 color dialog: Handle Escape better
Closing the dialog by hitting Escape should
have the same effect as clicking the cancel
button. Make it so.
2022-11-24 10:29:03 -05:00
Matthias Clasen
4fa53bd041 gtk-demo: Test cancellation support for file dialog
Add a timeout that closes the file dialog after
20 seconds, to test programmatic cancellation.
2022-11-24 10:26:43 -05:00
Simon McVittie
94b57a967c testsuite: Don't create .test files for flaky or failing tests
These tests can be run manually, but are not suitable for use as an
acceptance test, so let's not make frameworks like Debian's autopkgtest
run these when they run ginsttest-runner in the most obvious way.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-11-24 13:46:33 +00:00
Simon McVittie
957dd49ef7 testsuite: Use separate setups for unstable tests instead of should_fail
There are two possible interpretations of "expected failure": either
the test *must* fail (exactly the inverse of an ordinary test, with
success becoming failure and failure becoming success), or the test
*may* fail (with success intended, but failure possible in some
environments). Autotools had the second interpretation, which seems
more useful in practice, but Meson has the first.

Instead of using should_fail, we can put the tests in one of two new
suites: "flaky" is intended for tests that succeed or fail unpredictably
according to the test environment or chance, while "failing" is for
tests that ought to succeed but currently never do as a result of a
bug or missing functionality. With a sufficiently new version of Meson,
the flaky and failing tests are not run by default, but can be requested
by running a setup that does not exclude them, with a command like:

    meson test --setup=x11_unstable --suite=flaky --suite=failing

As a bonus, now that we're setting up setups and their excluded suites
programmatically, the gsk-compare-broadway tests are also excluded by
default when running the test setup for a non-broadway backend.

When running the tests in CI, --suite=gtk overrides the default
exclude_suites, so we have to specify --no-suite=flaky and
--no-suite=failing explicitly.

This arrangement is inspired by GNOME/glib!2987, which was contributed
by Marco Trevisan.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-11-24 13:46:33 +00:00
Matthias Clasen
5e534306e4 Merge branch 'deprecate-infobar' into 'main'
Deprecate GtkInfoBar

See merge request GNOME/gtk!5246
2022-11-24 03:43:11 +00:00
Matthias Clasen
d3fbe80510 Merge branch 'wip/carlosg/gsk-clipping' into 'main'
gsk: Extend the blur radius for outset shadow extents

See merge request GNOME/gtk!5247
2022-11-23 22:38:49 +00:00
Vlad Zahorodnii
433734de21 gdk/wayland: Improve readability of wl_output binding code
Provide OUTPUT_VERSION macro to indicate the implemented version of
wl_output in gtk rather than use a magical number.
2022-11-23 22:53:00 +02:00
Carlos Garnacho
b9448b06b4 gsk: Extend the blur radius for outset shadow extents
By dividing the blur radius to obtain the clip radius, we may end up
with halved values that result in an overshunk clip mask. Extend this
so that we ensure to cover the last pixel.

Fixes artifacts seen with the cairo renderer in X11 when resizing
windows horizontally, a black 1px high line would be seen in the
top of the window due to these outset bounds being used in clipping.

More mysteriously, also seems to fix resize lag in the GL renderer
(also X11), if e.g. the bottom-right corner of a window is resized
diagonally in bottom-left -> top-right direction, or
bottom-right -> top-left.

Related: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2175#note_1599335
2022-11-23 19:27:49 +01:00
Matthias Clasen
942f8d4b4b Deprecate GtkInfoBar
This widget has a dialog-like API, which is something
we want to get rid of in GTK 5, and libadwaita has
a replacement with AdwBanner incoming.
2022-11-23 13:00:09 -05:00
Carlos Garnacho
35744d87a2 gsk: Also ceil() top side when converting graphene to cairo rectangles
The outset border for all sides is ceil()ed, except for the top side.
Most often values are already nicely rounded here, but this seems an
oversight.
2022-11-23 18:56:45 +01:00
Vlad Zahorodnii
261bcd40bd gdk/wayland: Prefer wl_output_release() over wl_output_destroy()
By using wl_output_release(), GDK lets the compositor to clean up the
output global more nicely.

For example, currently, most compositors remove the global and then
destroy it later after N seconds expire. With this, the compositor could
experiment with destroying the output global once all its resources are
destroyed.
2022-11-22 14:12:22 +02:00
Matthias Clasen
200f31f285 Merge branch 'work/zzag/wl-output-cleanup' into 'main'
gdk/wayland: Destroy zxdg_output_v1 upon GdkWaylandMonitor destruction

See merge request GNOME/gtk!5242
2022-11-22 12:01:43 +00:00
Vlad Zahorodnii
1d94aefe2b gdk/wayland: Clear GdkWaylandMonitor::output using g_clear_pointer()
Use g_clear_pointer() to make tear down code consistent.
2022-11-22 11:23:08 +02:00
Vlad Zahorodnii
e82e7823a8 gdk/wayland: Destroy zxdg_output_v1 upon GdkWaylandMonitor destruction
It prevents potentially leaking memory.
2022-11-22 11:18:32 +02:00
Matthias Clasen
0de172f03d Merge branch 'file-filter-properties' into 'main'
filefilter: Add properties for the criteria

See merge request GNOME/gtk!5241
2022-11-22 04:00:40 +00:00
Matthias Clasen
d34ac99916 filefilter: Add properties for the criteria
Add construct-only properties for patterns,
suffixes and mime-types. This provides an
alternative way to specify these in ui files.

Related: #5350
2022-11-21 22:44:03 -05:00
Matthias Clasen
055f3e5d97 Merge branch 'color-picker-portal' into 'main'
colorpicker: Always try the portal first

See merge request GNOME/gtk!5240
2022-11-21 19:46:17 +00:00
Matthias Clasen
205b718fe5 colorpicker: Always try the portal first
It does not hurt., and going forward, we want to
prefer portals.
2022-11-21 14:26:29 -05:00
Matthias Clasen
01ae136a4c Merge branch 'bilelmoussaoui/g-i' into 'main'
g-i: add missing array annotation to AlertDialog.set_buttons

See merge request GNOME/gtk!5234
2022-11-21 10:49:05 +00:00
Matthias Clasen
74806ed324 Merge branch 'fix-upside-down-labels' into 'main'
gsk: Avoid a crash with negative scales

See merge request GNOME/gtk!5236
2022-11-21 10:48:29 +00:00
Matthias Clasen
83839cb219 Merge branch 'drop-buildable-get-id' into 'main'
builder: Stop using GtkBuildable.get_id

See merge request GNOME/gtk!5239
2022-11-21 10:35:16 +00:00
Matthias Clasen
f22db024a8 Merge branch 'stringlist-prop' into 'main'
stringlist: Add a construct-only strings property

See merge request GNOME/gtk!5238
2022-11-21 10:34:54 +00:00
Matthias Clasen
e357ff6055 Drop gtk_widget_buildable_parser_finished
No need to have this no-op implementation.
This was the only implementation of this vfunc
in GTK.
2022-11-20 14:36:35 -05:00
Matthias Clasen
92edd4c476 builder: Stop using GtkBuildable.get_id
Drop the only implementation of this vfunc,
and stop using it. It isn't needed, and the
only implementation did the same thing GtkBuilder
does anyway.
2022-11-20 14:35:36 -05:00
Matthias Clasen
f0aefe2f7f stringlist: Add a construct-only strings property
This enables creating string lists in ui files
without using custom markup.

Related: #5350
2022-11-20 14:07:45 -05:00
Matthias Clasen
8f24072354 Merge branch 'center-box-props' into 'main'
centerbox: Add properties for child widgets

See merge request GNOME/gtk!5237
2022-11-20 18:25:12 +00:00
Matthias Clasen
8dc89ba3d8 centerbox: Add properties for child widgets
This provides and alternative to add children
in ui files.

Related: #5350
2022-11-20 12:54:31 -05:00
Matthias Clasen
b441c684ab gsk: Avoid a crash with negative scales
Don't crash when both scale_x and scale_y are -1.

A test is included.
2022-11-20 12:13:02 -05:00
Bilal Elmoussaoui
97d76417fa g-i: add missing array annotation to AlertDialog.(s|g)et_buttons 2022-11-19 14:33:19 +01:00
Matthias Clasen
ab530b9e5a Merge branch 'builder-parse-attributes' into 'main'
builder: Parse PangoAttrList values

See merge request GNOME/gtk!5228
2022-11-19 02:49:23 +00:00
Matthias Clasen
21a69e7107 Merge branch 'wip/carlosg/osk-activation' into 'main'
gtktext: Claim gesture more selectively

Closes #5351

See merge request GNOME/gtk!5230
2022-11-18 19:33:55 +00:00
Matthias Clasen
d45155364e Merge branch 'kjellahl/menubar' into 'main'
gtk_popover_menu_bar_set_menu_model(): Accept model == NULL

See merge request GNOME/gtk!5232
2022-11-18 19:33:37 +00:00
Matthias Clasen
4a71957c1f Merge branch 'shorter-im-context-ids' into 'main'
immmodule: Warn if GTK_IM_MODULE is bad

See merge request GNOME/gtk!5229
2022-11-18 19:33:17 +00:00
Matthias Clasen
e53c9e4832 Merge branch 'wayland-foreign-v2' into 'main'
wayland: Also support the v2 of the importer

See merge request GNOME/gtk!5231
2022-11-18 18:00:42 +00:00
Matthias Clasen
b3821b19b5 wayland: Also support the v2 of the importer
Commit 0ba8e16e14 added support for the export
part of zxdg_foreign_v2, but neglected that the importer
has a v2 as well. Support it.
2022-11-18 12:10:56 -05:00