Commit Graph

230 Commits

Author SHA1 Message Date
Benjamin Otte
866bc13557 reftests: Fix statusbar-remove-all test 2019-03-29 09:56:52 +01:00
Benjamin Otte
3c44f83909 Fix textview-margins reftest
Draw something, otherwise the test will timeout
2019-03-29 09:56:52 +01:00
Benjamin Otte
9ca5495380 reftests: Fix inherit-and-initial test
Run gtk-builder-tool --3to4 over it. As the test cares about the
"initial" and "inherit" CSS keywords, the actual widgets aren't that
important. It's just important to have many of them.
2019-03-29 09:56:52 +01:00
Benjamin Otte
822791d8a9 reftests: Remove info-bar-message-types test
- The test doesn't properly test infobars. An infobar is not a box.

- Infobar message types aren't styled anymore.
2019-03-29 09:56:52 +01:00
Benjamin Otte
f070872b36 reftests: Fix notebook-tab-position test
The tab-fill child property is gone, don't use it.
2019-03-29 09:56:52 +01:00
Benjamin Otte
f3e47ee92e reftests: Fix icon-style-basics test
Add a type-func to the GThemedIcon and GEmeblemedIcon usages so
GtkBuilder finds them.
2019-03-29 09:56:52 +01:00
Benjamin Otte
e612b55bd4 reftests: Fix css-match-name test
- Replace GtkImage::pixbuf with GtkImage::paintable
- Use a GtkPicture so the sizing is correct
2019-03-29 09:56:52 +01:00
Benjamin Otte
6d38f1dcb5 reftests: Fix css-match-type test
- Replace GtkImage::pixbuf with GtkImage::paintable
- Use a GtkPicture so the sizing is correct
2019-03-29 09:56:52 +01:00
Benjamin Otte
d4df5211f3 reftests: Fix border-image-excess-size.ui test
The old reftests drew an opaque image, the new image is transparent.

This test drew the reference image as black and the test as transparent
black, and those are now different.
2019-03-29 09:56:52 +01:00
Benjamin Otte
2e67c2eb8f reftests: Delete removed tests from testdata 2019-03-29 09:56:52 +01:00
Benjamin Otte
47d4b06eca reftests: Fix css-currentcolor-alpha.ui test
The test did not draw anything, which fails now.
2019-03-29 09:56:52 +01:00
Benjamin Otte
5ddce32e1a reftests: Fix css-match-class test
- Replace GtkImage::pixbuf with GtkImage::paintable
- Use a GtkPicture so the sizing is correct
2019-03-29 09:56:52 +01:00
Benjamin Otte
8846f28369 reftests: Fix background-size-zero test
We were drawing nothing, causing a timeout.
2019-03-29 09:56:52 +01:00
Benjamin Otte
62d0bd7153 reftests: Fix nth-child test
Box children no longer have a "position" child property.
2019-03-29 09:56:52 +01:00
Benjamin Otte
d5175526f9 reftests: Fix treeview-fixed-height test
Convert -gtk-gradient() to linear-gradient in the CSS.
2019-03-29 09:56:52 +01:00
Benjamin Otte
7935f9d3b8 reftests: Actually build a module
Reftests are expecting a module called libreftest.so, so don't build a
static libgtkreftest.a but what they expect.
2019-03-29 09:56:52 +01:00
Benjamin Otte
7cc5e51a92 reftests: Fix actionbar test
Boxes have no pack-type anymore.
2019-03-29 09:56:52 +01:00
Benjamin Otte
8542ac2c42 reftests: Fix window-height-for-width test
The dialog's vbox internal child is now called content_area
2019-03-29 09:56:52 +01:00
Benjamin Otte
b3eddbb45d reftests: Fix grid-spacing1 test 2019-03-29 09:56:52 +01:00
Benjamin Otte
e3dbf8d524 reftests: Fix unresolvable.ui test
- Make sure we draw something
- Don't use -gtk-gradient() but linear-gradient instead
2019-03-29 09:56:52 +01:00
Benjamin Otte
d3be32f8ea reftest: Be more careful about snapshotting
Instead of waiting for the first invalidate-contents signal, wait until
we get a render node. This will break spectacularly for reftests not
drawing anything at all, but we just hope that won't happen.
2019-03-29 09:56:52 +01:00
Benjamin Otte
0c81ea2f28 reftests: Make meson run every test separately
This way, we don't get an abort once the first test gets a warning.

We also can use meson test to run individual tests.

Unfortunately, only ~60% of tests pass.
2019-03-29 09:56:52 +01:00
Benjamin Otte
c564a349e5 testsuite: Make reftests work again
Well, the testrunner works again, the tests don't all succeed.

So exclude them from CI.
2019-03-29 09:56:52 +01:00
Benjamin Otte
42d580dc07 reftests: Remove image-recording-surface test
It's no longer possible to set surfaces on a GtkImage, so we don't need
to test that setting a recording surface works.
2019-03-29 09:56:52 +01:00
Matthias Clasen
700183e5b6 Convert ui files
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-28 16:37:21 -04:00
Matthias Clasen
396deb44fa Convert ui files
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-27 21:48:12 -04:00
Matthias Clasen
7ac250dea7 Convert all ui files
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-27 13:36:24 -04:00
Matthias Clasen
883d5d8584 box: Remove the position child property
The position child property is problematic, since it
requires us to emit notification for all children when
inserting a child early in the list of children.

Remove the property from all ui files.
2019-01-23 19:30:47 -05:00
Simon McVittie
d19cba429d reftests: Fix path to installed-tests in .test metadata
The installed-tests are now namespaced as gtk-4.0 to avoid colliding
with GTK+ 3, but these files weren't updated.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-09-19 09:37:06 +01:00
Benjamin Otte
0c76264953 reftests: Fix compilation
FOREIGN surfaces are gone.
2018-06-26 00:53:39 +02:00
Benjamin Otte
4a513b7800 reftests: Port from gtk_widget_draw() to snapshots 2018-04-05 14:56:39 +02:00
Alexander Larsson
63e060a21d GtkWidget: Start renaming widget->window
This is an automated change doing these command:

git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface
git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface
git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface
git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface
git sed -f g gtk_widget_set_window gtk_widget_set_surface
git sed -f g gtk_widget_get_window gtk_widget_get_surface
git sed -f g gtk_widget_register_window gtk_widget_register_surface
git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface

git checkout NEWS*
2018-03-20 15:21:12 +01:00
Alexander Larsson
9a7e721181 GdkSurface: Rename various functions and variables
This is an automatic rename of various things related
to the window->surface rename.

Public symbols changed by this is:
 GDK_MODE_WINDOW
 gdk_device_get_window_at_position
 gdk_device_get_window_at_position_double
 gdk_device_get_last_event_window
 gdk_display_get_monitor_at_window
 gdk_drag_context_get_source_window
 gdk_drag_context_get_dest_window
 gdk_drag_context_get_drag_window
 gdk_draw_context_get_window
 gdk_drawing_context_get_window
 gdk_gl_context_get_window
 gdk_synthesize_window_state
 gdk_surface_get_window_type
 gdk_x11_display_set_window_scale
 gsk_renderer_new_for_window
 gsk_renderer_get_window
 gtk_text_view_buffer_to_window_coords
 gtk_tree_view_convert_widget_to_bin_window_coords
 gtk_tree_view_convert_tree_to_bin_window_coords

The commands that generated this are:

git sed -f g "GDK window" "GDK surface"
git sed -f g window_impl surface_impl
(cd gdk; git sed -f g impl_window impl_surface)
git sed -f g WINDOW_IMPL SURFACE_IMPL
git sed -f g GDK_MODE_WINDOW GDK_MODE_SURFACE
git sed -f g gdk_draw_context_get_window gdk_draw_context_get_surface
git sed -f g gdk_drawing_context_get_window gdk_drawing_context_get_surface
git sed -f g gdk_gl_context_get_window gdk_gl_context_get_surface
git sed -f g gsk_renderer_get_window gsk_renderer_get_surface
git sed -f g gsk_renderer_new_for_window gsk_renderer_new_for_surface

(cd gdk; git sed -f g window_type surface_type)
git sed -f g gdk_surface_get_window_type gdk_surface_get_surface_type

git sed -f g window_at_position surface_at_position
git sed -f g event_window event_surface
git sed -f g window_coord surface_coord
git sed -f g window_state surface_state
git sed -f g window_cursor surface_cursor
git sed -f g window_scale surface_scale
git sed -f g window_events surface_events
git sed -f g monitor_at_window monitor_at_surface
git sed -f g window_under_pointer surface_under_pointer
(cd gdk; git sed -f g for_window for_surface)
git sed -f g window_anchor surface_anchor
git sed -f g WINDOW_IS_TOPLEVEL SURFACE_IS_TOPLEVEL
git sed -f g native_window native_surface
git sed -f g source_window source_surface
git sed -f g dest_window dest_surface
git sed -f g drag_window drag_surface
git sed -f g input_window input_surface

git checkout NEWS* po-properties po docs/reference/gtk/migrating-3to4.xml
2018-03-20 12:05:26 +01:00
Alexander Larsson
391727bd0d GdkWindow -> GdkSurface initial type rename
This renames the GdkWindow class and related classes (impl, backend
subclasses) to surface. Additionally it renames related types:
GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType,
GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge

This is an automatic conversion using the below commands:

git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass

git sed -f g GdkWindow GdkSurface
git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing
git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING
git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2"
git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE
git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo

git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE"
git sed -f g "broadway_window" "broadway_surface"
git sed -f g "BroadwayWindow" "BroadwaySurface"
git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE"
git sed -f g "wayland_window" "wayland_surface"
git sed -f g "WaylandWindow" "WaylandSurface"
git sed -f g "X11_WINDOW" "X11_SURFACE"
git sed -f g "x11_window" "x11_surface"
git sed -f g "X11Window" "X11Surface"
git sed -f g "WIN32_WINDOW" "WIN32_SURFACE"
git sed -f g "win32_window" "win32_surface"
git sed -f g "Win32Window" "Win32Surface"
git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE"
git sed -f g "quartz_window" "quartz_surface"
git sed -f g "QuartzWindow" "QuartzSurface"

git checkout NEWS* po-properties
2018-03-20 11:40:08 +01:00
Christoph Reiter
1253e7bfcb tests: Make GSETTINGS_SCHEMA_DIR point to the compiled schemas in the build dir
With autotools the schemas were compiled into each test suite directory
and the tests set GSETTINGS_SCHEMA_DIR to the test build directory.

With meson's gnome.compile_schemas() we can not define a target directory
so just make sure it is built in the gtk directory and set GSETTINGS_SCHEMA_DIR
to the gtk build directory when running the tests.

This makes the gtk+:gtk suite pass when no gtk is installed on the system.
2018-02-17 09:48:12 +01:00
Matthias Clasen
2301d8d90b enums: Change GtkIconSize values
The new values are the ones we intend to keep. The old ones had
duplicated meanings and nobody knew which one to take.
2017-11-15 14:22:17 -05:00
Benjamin Otte
9151e0b9f5 stylecontext: Port to use display instead of screen 2017-10-31 03:05:54 +01:00
Matthias Clasen
b350db58e0 testsuite: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Benjamin Otte
9ec22d6652 reftests: Always wait for rendering to settle
We wait for a few 100ms for rendering to settle in various WMs. So far
we only did that for windows that were controlled by the WM (aka
toplevels).

With modern compositing gnome-shell however, this now also applies to
override-redirect windows, so we now wait there, too.

This makes the reftests a lot slower, but they now actually work when
running make check in gnome-shell.
2017-08-02 11:34:57 +01:00
Benjamin Otte
64b7308328 reftests: Remove event box usage 2017-08-02 11:34:57 +01:00
Chun-wei Fan
171ff43340 tests: Include system headers appropriately
Don't include unistd.h on Windows, and include the appropriate headers on
Windows as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-07-21 23:36:03 +08:00
Emmanuele Bassi
29bc0b1911 meson: Use libexecdir option 2017-05-10 11:37:40 +01:00
Tim-Philipp Müller
b95a5678f4 meson: testsuite: reftests: add build defs, but needs more work
Not sure how these are supposed to work yet, we can specify
arguments for running the tests uninstalled as well with test(),
if that helps in any way.
2017-05-03 15:10:55 +01:00
Timm Bäder
57b8a136bf reftests: Remove reference to deleted files 2017-04-25 20:55:56 +02:00
Timm Bäder
db4b1d28f5 label: Remove angle property 2017-04-25 20:30:37 +02:00
Timm Bäder
c92b7d4224 box: Remove fill child property
GtkWidget:halign and GtkWidget:valign are sufficient
2017-04-25 20:30:37 +02:00
Matthias Clasen
99ae996a71 reftests: Remove a test using -gtk-gradient
No longer available.
2017-03-31 14:04:59 -04:00
Benjamin Otte
e5e5beafa5 cssimage: Fallback images have no aspect ratio
The aspect ratio for fallback image was incorrectly set to 1.

Reftest is included.
2017-01-13 03:38:36 +01:00
Benjamin Otte
a06b1ea1ba cssimage: Scale images to contain, not cover
Images with just an aspect ratio, but without a size, should be scaled
to be fully visible in the given area.
But we scaled them to completely cover the given area, which made them
partially invisible.

Reftest included.
2017-01-13 03:38:36 +01:00