Commit Graph

63374 Commits

Author SHA1 Message Date
Benjamin Otte
9a30019268 display: Remove the monitor signals
Applications can listen to GdkDisplay:monitors::items-changed if they
want to track monitor changes.
2020-05-17 07:10:34 +02:00
Benjamin Otte
972276436f x11: Directly notify surfaces of monitor changes
Do not use signals.
2020-05-17 07:10:34 +02:00
Benjamin Otte
e81a1db48c monitor: Add gdk_monitor_set_geometry()
Make it replace gdk_monitor_set_size() and gdk_monitor_set_position()
which used to be called in pairs anyway.
2020-05-17 07:10:34 +02:00
Benjamin Otte
33a4442988 x11: Remove unused change tracking
Change tracking now works automatically via GdkMonitor.
2020-05-17 05:14:24 +02:00
Matthias Clasen
3035bf1e39 widget-factory: Cosmetics
Add a frame around the white background in the background
selection dialog. Otherwise, it is not really visible.
2020-05-16 21:54:14 -04:00
Benjamin Otte
14bf58ec5d x11: Remove XDamage dependency
It's not used.
2020-05-17 02:14:58 +02:00
Matthias Clasen
a2a3aab94d Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

Closes #2601

See merge request GNOME/gtk!1918
2020-05-16 23:35:51 +00:00
Emmanuele Bassi
7ff9a3f3a0 ci: Allow using "latest" as the image version
Just like the documentation says.
2020-05-17 00:32:22 +01:00
Emmanuele Bassi
8070bac06c ci: Use extends instead of YAML anchors
The `extends` keyword is more readable than YAML's weird anchor syntax,
and we don't have too many anchors in our job definitions anyway.
2020-05-17 00:30:07 +01:00
Benjamin Otte
d4731a4ab4 x11: Remove gdk_x11_register_standard_event_type()
It's not used anymore since GdkX11Display::xevent exists.
2020-05-17 01:02:17 +02:00
Benjamin Otte
0c6266fd1a surface: Remove gdk_surface_is_viewable()
It returns the same value as gdk_surface_get_mapped(), so use that
instead.
2020-05-17 00:41:44 +02:00
Timm Bäder
5b0e91844b popover: Fix input shape rendering
Once again, calling gtk_widget_get_allocation() is wrong.

Fixes #2601
2020-05-16 22:34:38 +02:00
Timm Bäder
c4363e2706 showrendernode: Set widget overflow 2020-05-16 22:04:00 +02:00
Timm Bäder
ccaacfc8c3 texthandle: Remove min-width/height handling
We do that automatically for all widgets.
2020-05-16 22:04:00 +02:00
Timm Bäder
2e9d772e66 natives: Use GtkCssBoxes in get_surface_transform 2020-05-16 22:04:00 +02:00
Timm Bäder
bac6e79614 native: Add documenation for get_surface_transform 2020-05-16 22:03:58 +02:00
Timm Bäder
2fd86ef80c popover: Return correct values from get_surface_transform()
We do not (yet) care about the box shadow here, so it's sufficient to
return the css values.
2020-05-16 22:03:58 +02:00
Timm Bäder
f9370d7e83 main: Translate coordinates from surface to native before picking
gtk_widget_pick() needs them to be in @self coordinates.
2020-05-16 22:03:55 +02:00
Matthias Clasen
bc75965053 Merge branch 'matthiasc/for-master' into 'master'
broadway: Be careful about destroyed surfaces

See merge request GNOME/gtk!1917
2020-05-16 18:27:19 +00:00
Matthias Clasen
77107f70c4 broadway: Be careful about destroyed surfaces
Just because we take a ref on a surface does not
guarantee that it is still usable a second later.
Check if its been destroyed in the meantime.

This is breaking the template tests in ci, since
there is no client behind the Broadway server.
2020-05-16 13:47:18 -04:00
Matthias Clasen
b41aeabbec Merge branch 'matthiasc/for-master' into 'master'
broadway: Don't create overlarge images

See merge request GNOME/gtk!1916
2020-05-16 17:01:30 +00:00
Matthias Clasen
c0ae36e943 broadway: Create slave devices
The assumption is that the source device in events
is a slave device, so create pointer and keyboard
devices and use them in events.

This fixes the seat test on Broadway.
2020-05-16 12:27:22 -04:00
Matthias Clasen
5851415fca broadway: Don't create overlarge images
Respect that cairo won't create image surfaces larger
than 32767 x 32767.

This makes the one reftest pass that specifically checks
this condition, treeview-crash-too-wide.
2020-05-16 11:27:21 -04:00
Matthias Clasen
36b4b39619 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!1915
2020-05-16 15:03:10 +00:00
Yuri Chornoivan
d7bf3605b9 Update Ukrainian translation 2020-05-16 14:52:15 +00:00
Matthias Clasen
15211556df Merge branch 'broadway-surface-destroy' into 'master'
Broadway surface destroy

See merge request GNOME/gtk!1914
2020-05-16 14:16:52 +00:00
Matthias Clasen
13f8583934 ci: Don't run opengl renderer tests on Broadway
The test setup mechanism in meson is not flexible
enough to let us run different suites depending
on setup, so just pass in explicitly which suites
we want to skip, depending on the backend.
2020-05-16 10:14:10 -04:00
Matthias Clasen
350110ad9d testsuite: Add a gsk-compare-broadway suite
We have a Broadway renderer, might as well spell
that out in the tests, and make the suite exclude the
3d tests it can't handle.
2020-05-16 10:14:10 -04:00
Matthias Clasen
d771aa6fee testsuite: Destroy surfaces
If we don't destroy the surface, it leaks.

GDK backends keep an extra reference on the
surface for the external resources associated
with it, and only drop it in destroy().
2020-05-16 09:12:18 -04:00
Matthias Clasen
4acb56d8c5 broadway: Keep an reference on surfaces
GDK backends are expected to keep a references on
their surfaces as long as they are associated with
external resources, and drop it in destroy().

This showed up as criticals in the shortcuts test
which manually creates and destroys surfaces.
2020-05-16 09:12:07 -04:00
Matthias Clasen
afaa9810d1 Merge branch 'matthiasc/for-master' into 'master'
inspector: Use tabular numbers in the fps overlay

See merge request GNOME/gtk!1912
2020-05-16 11:21:00 +00:00
Piotr Drąg
6aa68fcfee Update POTFILES.in and POTFILES.skip 2020-05-16 12:37:01 +02:00
Timm Bäder
b2b2070415 Implement diff() for color matrix nodes
This way we don't redraw color matrix nodes all the time.
2020-05-16 08:22:55 +02:00
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