Commit Graph

63184 Commits

Author SHA1 Message Date
Matthias Clasen
c5b2bbf01b inspector: Use tabular numbers in the fps overlay
It is a lot more readable if it doesn't constantly jitter.
2020-05-15 21:30:14 -04:00
Matthias Clasen
f4d3d8e27c Merge branch 'better-ci-reports' into 'master'
ci: Add the backend to the reports

See merge request GNOME/gtk!1911
2020-05-16 00:52:56 +00:00
Matthias Clasen
4f6fa87f00 Merge branch 'wip/carlosg/tablet-disconnects-master' into 'master'
gdk/wayland: Handle disorderly tablet/pad disconnects

See merge request GNOME/gtk!1910
2020-05-15 23:50:54 +00:00
Matthias Clasen
01bd6cfd17 ci: Add the backend to the reports
We want the test names in the junit xml to be
unique across all the tests in a job, so we need
to include the backend in the test name.

And we also want to see the used backend in
the html report.
2020-05-15 19:49:18 -04:00
Carlos Garnacho
000487c36c gdk/wayland: Handle disorderly tablet/pad disconnects
If the tablet gets removed/freed while there are pad events in flight,
we leave a dangling pointer from the pad to the tablet, which may
lead to invalid reads/writes when handling the pad event(s).
2020-05-15 23:40:18 +02:00
Matthias Clasen
5870f1c90a Merge branch 'headless-seatless' into 'master'
gtk: Handle seatless displays

See merge request GNOME/gtk!1905
2020-05-15 21:13:01 +00:00
Matthias Clasen
30ef48143f ci: Ignore Broadway failures
These need some more work, so ignore them for now,
to get the initial multi-backend testsuite into
production.
2020-05-15 15:24:04 -04:00
Matthias Clasen
0232218100 displayclose: Quietly skip if no X available 2020-05-15 14:58:58 -04:00
Matthias Clasen
31cf894092 ci: Run tests with different backends
Run the testsuite under x11, wayland and broadway
in the fedora-x86_64 job. This requires us to use
the v17 image which includes weston.
2020-05-15 14:11:53 -04:00
Matthias Clasen
509db01319 tests: Centralize our test setup a bit
Put all of the constant environment into the
toplevel meson.build file, to reduce repetition
and copy-paste errors.
2020-05-15 14:11:53 -04:00
Matthias Clasen
ff4552c842 testsuite: Add test setups for backends
Add test setups that set the GDK_BACKEND and
TEST_OUTPUT_SUBDIR environment variables.

This lets use run
meson test --setup x11 --suite reftest
meson test --setup wayland --suite reftest
and the output will be nicely separated.

We still need to do compositor / display server
setup from the outside.
2020-05-15 14:11:53 -04:00
Matthias Clasen
c22af88235 tests: Allow setting a subdir for output
meson seems somewhat weak when it comes to handling
test output. We need to get the output from different
test runs into different locations, and the only
way to communicate from a test setup with the actual
test code seems the environment, so use that.

Make all tests that produce output in files respect
a TEST_OUTPUT_SUBDIR environment variable which specifies
the name of a subdirectory to use. This is combined
with the existing --output argument, which specifies
a per-test location.

Affected tests are reftests, css performance tests
and gsk compare tests.
2020-05-15 14:11:53 -04:00
Matthias Clasen
6719616c36 ci: Fix a typo in the run-docker.sh script 2020-05-15 14:11:53 -04:00
Matthias Clasen
18c7284817 ci: Add weston and weston-libs to the fedora image
We want to run tests under Wayland, using weston
as the compositor. The weston-libs package contains
the headless backend for weston.
2020-05-15 14:11:53 -04:00
Matthias Clasen
8912a6eb75 gtk: Handle seatless displays
If you run weston with the headless backend, you get a Wayland
display with no seat, which is just fine by the protocol.

gdk_display_get_default_seat() returns NULL in this case. Various
widgets assume that we always have a seat with a keyboard and a
pointer, since that is what X guarantees. Make things survive
without that, so we can run the testsuite under a headless
Wayland compositor.
2020-05-15 14:11:53 -04:00
Matthias Clasen
9b7a73268e docs: Clarify gdk_display_get_default_seat() docs
This function can return %NULL if the display
does not have a seat. Document that.
2020-05-15 14:11:53 -04:00
Timm Bäder
d4d9644409 Merge branch 'wip/tintou/set_css_classes_array' into 'master'
widget: Add array annotation to set_css_classes

See merge request GNOME/gtk!1907
2020-05-15 11:19:05 +00:00
Corentin Noël
80473ccd69 widget: Add array annotation to set_css_classes
It expects a NULL-terminated array so annotate it.
2020-05-15 12:01:56 +02:00
Jakub Steiner
b51a5446ba Merge branch 'wip/jimmac/tabs-again-focus' into 'master'
Adwaita: notebook tab focus tweak

Closes #2721

See merge request GNOME/gtk!1906
2020-05-15 08:17:58 +00:00
Jakub Steiner
d7e6fbf8a2 Adwaita: notebook tab focus tweak
Finally fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2721
2020-05-15 09:34:57 +02:00
Matthias Clasen
acae90cc6e Merge branch 'tests-cleanup' into 'master'
Tests cleanup

See merge request GNOME/gtk!1904
2020-05-15 01:38:38 +00:00
Matthias Clasen
dcfb4690c3 tests: Drop testdnd3
This has been integrated in gtk4-demo as the
DND example.

See #2738
2020-05-14 20:32:53 -04:00
Matthias Clasen
9e8d845a61 tests: Rename testheaderbar2 to testheaderbar
There is only one headerbar test now.
2020-05-14 20:15:59 -04:00
Matthias Clasen
1e2b5a9c19 tests: Consolidate all headerbar tests
No need to have several binaries for this.

See #2738
2020-05-14 20:15:31 -04:00
Matthias Clasen
4079b782d6 tests: Drop testorientable
Not really that interesting, and it only
tests a single case of orientable, a box.

See #2738
2020-05-14 19:48:08 -04:00
Matthias Clasen
dca142d5d2 tests: Drop testemblems
We no longer support emblems on icons.

See #2738
2020-05-14 19:44:54 -04:00
Matthias Clasen
52c630d994 tests: Drop testgiconpixbuf
More a pixbuf test, and we don't support
emblems anymore.

See #2738
2020-05-14 19:44:08 -04:00
Matthias Clasen
aadd9ae201 tests: Drop testbuttons
This does not really add much. We have plenty
of different button styles in our demos and
tests.

See #2738
2020-05-14 19:44:05 -04:00
Matthias Clasen
3df0f95ee3 Merge branch 'wip/exalm/kinetic_scrolling' into 'master'
eventcontrollerscroll: Fix the history push condition

See merge request GNOME/gtk!1902
2020-05-14 22:40:54 +00:00
Alexander Mikhaylenko
5dc6194b98 eventcontrollerscroll: Fix the history push condition
Once upon a time, there was a function called gdk_event_get_scroll_deltas().
It returned %TRUE when an event had scroll deltas and that was used as the
condition to decide whether to push scroll deltas to the scroll history,
even when the both deltas are 0 for the stop event at the end of scrolling.

When GtkScrolledWindow kinetic scrolling code was adapted for
GtkEventControllerScroll, it was replaced with a (dx != 0 && dy != 0)
check. This prevented the stop event from getting into the history, and
instead allowed non-smooth scrolling to affect the history as they have
synthetic deltas with one of the values being -1 or 1 and the other on 0.

Instead, check the direction as we already have it as a local variable.
2020-05-15 01:32:04 +05:00
Jakub Steiner
c025a569a9 Merge branch 'wip/jimmac/focus-tabs' into 'master'
Adwaita: don't focus outline tabs with mouse

Closes #2721

See merge request GNOME/gtk!1901
2020-05-14 17:35:10 +00:00
Jakub Steiner
dd61c248c1 Adwaita: don't focus outline tabs with mouse
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2721
2020-05-14 18:50:47 +02:00
Matthias Clasen
a6c1aef78b Merge branch 'wip/exalm/headerbar-migration' into 'master'
docs: Mention GtkHeaderBar title and subtitle changes in migration guide

See merge request GNOME/gtk!1900
2020-05-14 15:37:16 +00:00
Alexander Mikhaylenko
9f761feb93 docs: Mention GtkHeaderBar title and subtitle changes in migration guide 2020-05-14 19:51:19 +05:00
Matthias Clasen
38f09ac38e Merge branch 'x11-dnd-fix' into 'master'
Fix dnd on X11

See merge request GNOME/gtk!1899
2020-05-14 13:10:54 +00:00
Alexander Larsson
fed071ca96 GdkX11DragSurface: set visible state and invalidate on present
Without this we won't actually draw the surface.
2020-05-14 14:33:57 +02:00
Daniel Mustieles
4629f206c5 Updated Spanish translation 2020-05-14 12:04:27 +02:00
Daniel Mustieles
aba6371ea5 Updated Spanish translation 2020-05-14 12:00:33 +02:00
Alexander Larsson
bca4af360d X11 dnd: Calculate relative coords right in events
GdkSurface.x/y is mostly 0, we need to look atht GdkX11Surface->abs_x/y.
2020-05-14 11:46:33 +02:00
Alexander Larsson
32f58e6c0b gtk-demo/dnd: Fix up drag_cancel
This needs to return a boolean, also it should not call end because
that will be called anyway by Gtk+ after cancel, and this was causing
warnings due to the opacity being unset with no dragged widget set.
2020-05-14 10:45:38 +02:00
Alexander Larsson
4ce65f019e GtkDragSource: Pass return value of drag-cancel into drag_end()
This is needed to work as the docs say (don't play fallback cancel animation
if cancel returned TRUE to signal the drop already happened).
2020-05-14 10:44:07 +02:00
Alexander Larsson
707229ce17 gtk-demo/dnd: Use gtk_popover_set_child(), not gtk_box_append 2020-05-14 10:13:05 +02:00
Alexander Larsson
e702d42597 x11 drag: Fix mapped error
In the gtk-demo drag-and-drop demo i can't drag anything, all I get
is:

(gtk4-demo:358993): Gdk-CRITICAL **: 09:36:19.617: Surface 0x7e1bb0 has not been mapped in GdkSeatGrabPrepareFunc

This is because GdkX11Drag.ipc_surface is not considered mapped, even
though we called gdk_x11_surface_show() on it, because the
GDK_SURFACE_STATE_WITHDRAWN flag is still set.

I added calls to gdk_synthesize_surface_state() to match what
e.g. show_popup() and gdk_x11_toplevel_present() does.
2020-05-14 09:54:34 +02:00
Matthias Clasen
64db8be7d5 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!1897
2020-05-14 05:47:26 +00:00
Matthias Clasen
7eaa10dd8e gtk-demo: Fix a problem with the dnd demo
When I move this into gtk-demo, I broke the hack
that ensures the GtkColorSwatch type is registered.
Bring it back.
2020-05-14 01:16:56 -04:00
Matthias Clasen
102e7d0838 widget-factory: Ensure we have some backgrounds
The flowbox demo is otherwise less than useful,
if /usr/share/gnome/backgrounds isn't present.

At the same time, give the scale in the listbox
some function.
2020-05-14 00:28:03 -04:00
Matthias Clasen
9f4e7b1249 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!1896
2020-05-14 03:28:08 +00:00
Matthias Clasen
378cca75ea Add a test for a flowbox crash 2020-05-13 21:47:11 -04:00
Matthias Clasen
69ab403d78 flowbox: Avoid an assertion in snapshot()
The api contract for size_allocate() vfuncs is
that they must allocate all the children that are
going to be snapshotted in snapshot(). The flowbox
size_allocate() was just bailing out when the children
request a size of 0x0, leading to an assertion in
snapshot() vfunc later. Just allocate all children
a size of 0x0 in this case.
2020-05-13 21:47:11 -04:00
Matthias Clasen
33011ccdff flowbox: Avoid a crash in measure()
When the children request a height of zero, the
flowbox measure() function was happily dividing
by that zero, leading to badness.
2020-05-13 21:47:11 -04:00