Commit Graph

1106 Commits

Author SHA1 Message Date
Carlos Garnacho
21d0e30903 testsuite: Fix gestures tests for the legacy controller
Let it create one with the right propagation phase, so the event propagation
chain stays the same.
2018-10-15 17:39:04 +02:00
Carlos Garnacho
bb0e964f56 testsuite: Fix gestures test
Was broken by the removal of the default GtkEventControllerLegacy.
2018-10-15 17:39:04 +02:00
Chun-wei Fan
cebf5ed46c testsuite/gtk/filterlistmodel.c: Avoid GCCism
Pointer arithmetic on gpointers (void *) is a GCCism, so avoid that by
being more explicit with things.
2018-10-09 16:26:36 +08:00
Chun-wei Fan
1ca906008e testsuite/gtk/[flatten|sort]listmodel.c: Avoid VLA usage
Visual Studio is unlikely to support VLAs at any point, so avoid using
them and use g_newa() instead.
2018-10-09 16:26:21 +08:00
Timm Bäder
26302cada5 Update expected node files
We don't technically hide the arrow nodes anymore.
2018-09-24 21:05:07 +02:00
Simon McVittie
a0d83bdfa7 testsuite: Install accessibility-dump executable alongside tests
The installed-tests want to run this.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-09-19 09:41:49 +01:00
Simon McVittie
fa8190328d testsuite: Fix installed-test metadata for autotestkeywords
The executable is called autotestkeywords, so we shouldn't try to run
an executable named keywords. Also rename the metadata file to match.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-09-19 09:40:37 +01: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
5bf009a203 cssrbtree: Fix a crasher
After removing elements, there were a few cases where the tree wasn't
properly balanced which could further down violate assumptions about the
layout.

Attached is the original testcase that triggered it. I didn't bother
simplifying it.
2018-09-19 04:31:29 +02:00
Benjamin Otte
545c5f18b2 testsuite: Disable some tests for older glib 2018-09-17 04:30:28 +02:00
Benjamin Otte
5571217218 testsuite: Add tests for GtkSortListModel 2018-09-17 03:57:37 +02:00
Benjamin Otte
b6acc31d44 GtkMapListModel: add 2018-09-16 18:50:17 +02:00
Benjamin Otte
6d0fe46cba propertylookuplistmodel: Add
This model just takes an object and a property name and recursively
looks it up. In particular, I want it for:

widget, widget.parent, widget.parent.parent, ...
2018-09-16 18:50:17 +02:00
Benjamin Otte
2237009983 testsuite: Disable some tests with older glib
Fixes CI.
2018-09-16 18:50:17 +02:00
Benjamin Otte
32ec7dec61 gtk: Add GtkFlattenListModel
We can flatten lists of lists into lists now!
2018-09-16 18:50:17 +02:00
Benjamin Otte
4b5fb5ec79 treelistmodel: Refactor to add GtkTreeListRow
This patch does multiple things:

1. Add a custom persistent per-row object.
2. Move all per-row API to that object. This means notifications are now
   possible.
3. Add a "passthrough" construct-only property to the TreeListModel that
   influences if the model returns these new object or passes through
   the ones from the model.

This greatly simplifies the code needed to be written for widgetry,
because one can just connect the per-row object to the expanders that
expand and collapse rows.

As an added power feature, these objects can also be passed through
further models (like filter models).

It also adds kind of a hack to Adwaita to make the test look neat.
2018-09-16 18:50:17 +02:00
Benjamin Otte
4f70f72349 gtk: Add GtkFilterListModel
This is a GListModel implementation that filters the given source model.
2018-09-16 18:50:17 +02:00
Benjamin Otte
573c63973a gtk: Add GtkTreeListModel
This is a GListModel implementation with a neat API that can be used to
implement trees inside GtkListBox.
2018-09-16 18:50:17 +02:00
Matthias Clasen
099b967885 Don't fail the build if c++ isn't found
The intention of this check was to skip the keyword
test if no c++ compiler is found. But the meson
docs say that add_languages() will abort unless we
pass required: false.
2018-08-18 02:14:56 +00:00
Benjamin Otte
50d5666db0 container: Remove focus chains
They're prectically unused.

Widgets who want to influcence the focus chain behavior should implement
GtkWidgetClass::focus and deal with focus there.
2018-07-31 22:34:27 +02:00
Carlos Garnacho
1570c41efa testsuite: Update window test to use gestures when interactive 2018-07-30 13:14:12 +02:00
Matthias Clasen
b6d990af25 tests: Update a11y tests
Some things changed.
2018-07-27 14:23:20 -04:00
Matthias Clasen
766e2b1e63 testsuite: Update the list of used icons
We use some more now...
2018-07-27 13:37:00 -04:00
Matthias Clasen
32de29bb68 testsuite: Sort icon names
This is easier to keep track of.
2018-07-27 07:12:23 -04:00
Benjamin Otte
5d9d73b090 testsuite: Fix DragContext => Drag renaming 2018-07-24 20:55:45 +02:00
Matthias Clasen
1d72e3e193 Drop builtin icon test
We don't have these icons anymore.
2018-07-22 17:16:20 +00:00
Matthias Clasen
806c659efe Drop unused old icons
We don't need to ship the deprecated old stock-id named
icons and the drag cursors - we don't use them from resources
anyway.
2018-07-20 08:06:07 -04:00
Matthias Clasen
14f86ae24d testsuite: Add emoji icon names
We check for all icon names that are used in gtk.
2018-07-19 17:48:06 -04:00
Daniel Boles
ca94ff10ce testsuite/gtk/defaultvalue: Actually build...& fix
It looks like this got dropped during the move from autotools and never
restored. I can see why, since making it work wasn't a hugely fun task!

Notes on some less then obvious details:
 * PlacesSidebar is private now and didn't seem to be to be particularly
   easy to adapt to, so this moves to checking for it by name, not TYPE.
   I couldn't find a (fast) better way; if you know how, please clean up
 * added 2 casts to avoid warnings from the new type-propagating ref()
 * GdkClipboard and GdkContentProvider need some properties dodged
 * GtkToolItemGroup is gone
 * fixed indentation and used TypeName:property-name syntax in a print()
2018-06-29 20:05:21 +01:00
Daniel Boles
8aa4b5150e notify test: Remove more nonexistent properties 2018-06-27 17:17:05 +01:00
Timm Bäder
ecaa16c367 notify test: Remove some non-existant properties 2018-06-27 18:03:23 +02:00
Timm Bäder
2f8284a386 testsuite: Remove a GtkColorButton special case
The comment above explains neatly why subclassing GtkButton for
GtkColorButton was a bad idea. Nowadays it's a GtkWidget subclass
containing a GtkButton so let's remove the special case here.
2018-06-27 18:03:23 +02:00
Timm Bäder
73cad1e784 Remove some GtkRecentChooserMenu references
Doesn't exist anymore.
2018-06-27 18:03:23 +02:00
Benjamin Otte
0c76264953 reftests: Fix compilation
FOREIGN surfaces are gone.
2018-06-26 00:53:39 +02:00
Timm Bäder
33e113d607 testsuite: Print tested property name in notify test 2018-06-20 20:47:17 +02:00
Benjamin Otte
f247d268d4 dnd: Add GdkDrop base class for GdkDragContext
The ultimate goal of this patch series is to split GdkDragContext into
GdkDrop + GdkDrag classes for the destination and source side of a dnd
operation.

The refactoring is meant to work something like this:
1. Introduce GdkDrop as a base class
2. Make all drop related code (like GdkEvent) use GdkDrop instead of
   GdkDragContext. Move/duplicate APIs to allow that.
3. Port all drop contexts in the backends from GdkDragContext to GdkDrop
4. Delete all APIs in GdkDragContext that aren't needed anymore.
5. Make GdkDragContext no longer a GdkDrop subclass
6. Rename GdkDragContext to GdkDrag
2018-06-18 23:49:19 +02:00
Timm Bäder
fffb3161bc notebook: Stop reversing tabs based on text direction 2018-06-18 17:35:02 +02:00
Timm Bäder
01d4538223 box: Don't reorder children based on text direction
Make :first-child always be the first child, i.e. the leftest one in LTR
and the rightest one in RTL.
2018-06-18 17:35:02 +02:00
Timm Bäder
da27627696 paned: Don't reorder css nodes based on text direction 2018-06-18 17:35:02 +02:00
Philippe Normand
2f181df1cf gtkmain: Add gtk_get_main_thread()
This utility function can be useful to know which thread was initialized for
GTK+.
2018-06-08 18:41:54 +01:00
Philippe Normand
542ad4fdc5 gtkmain: Add gtk_is_initialized()
This utility function can be useful to check whether GTK+ was already
initialized or not.
2018-06-08 18:39:38 +01:00
Benjamin Otte
7e574fa98c gdk: Get rid of gdk_event_free()
Events are objects, so use g_object_unref().
2018-05-29 21:53:44 +02:00
Timm Bäder
5c339f2844 Add basic searchbar set_key_capture_widget tests
Make sure we're correctly resetting the internal key capture widget
pointer when the widget goes away.
2018-05-19 10:18:50 +02:00
Benjamin Otte
34d1ebc562 dnd: Make "formats" a construct-only property
... and hide the member variable inside the DragContextPrivate.
2018-05-07 18:55:09 +02:00
Matthias Clasen
1dcb76bc26 Merge branch 'wip/carlosg/controller' into 'master'
carlosg/controller

See merge request GNOME/gtk!131
2018-05-01 12:35:53 +00:00
Benjamin Otte
4aaeb7de19 dnd: Make GdkDragContext::device a (construct-only) property
Also remove gdk_drag_context_set_device() and insist on backends using
the property.
2018-04-27 14:32:28 +02:00
Benjamin Otte
4ddc94b293 multipressgesture: Port to new API model 2018-04-26 17:59:42 +02:00
Benjamin Otte
703d5340f1 rotategesture: Port to new API model 2018-04-26 17:59:41 +02:00
Benjamin Otte
48fc18c37b gdk: Get rid of GdkDrawingContext
All information is kept in GdkDrawContext these days, so use that one.
2018-04-24 23:16:58 +02:00
Emmanuele Bassi
e36adbac04 tests: Update the expected a11y dump results
Keep in sync with the current tree.

The changes are mostly caused by updates in the internal hierarchy of
composite widgets, and the fact that the order in which the widget tree
is traversed is not exactly stable.
2018-04-14 16:14:36 +01:00
Emmanuele Bassi
7bd5f8f69c tests: Split out the accessibility dump tests
Instead of having a single massive test running through the a11y
directory, we can split off each individual file into its own unit.

Having individual units has several advantages:

 - units are executed in parallel
 - it's easier to identify the failing units
 - logs for failed units are easier to read
2018-04-14 16:14:10 +01:00
Timm Bäder
d7af16c8e4 gl renderer: Render everyhing according to MV scale
And not the surface's scale factor. This way the magnifier works.
2018-04-11 15:31:22 +02:00
Matthias Clasen
8d396991db testsuite: Don't use ::key-press-event
We don't need it here.
2018-04-05 19:26:53 +02:00
Benjamin Otte
4a513b7800 reftests: Port from gtk_widget_draw() to snapshots 2018-04-05 14:56:39 +02:00
Chun-wei Fan
bca4a78f07 testsuite/gsk/test-render-nodes.c: Avoid VLA usage
Just #define N as 5, instead of using a const int, which is not enough
to justify that as non-VLA usage.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-04-02 19:14:55 +08:00
Benjamin Otte
5415d05359 tests: Remove references to long-deleted property 2018-03-26 18:16:36 +02:00
Benjamin Otte
e84c6acc4f rendernode: Remove renderer argument
It's not needed to create Cairo nodes anymore.
2018-03-24 21:57:20 +01:00
Alexander Larsson
695d141f32 Merge branch 'rename-window-to-surface' into 'master'
Rename window to surface

See merge request GNOME/gtk!72
2018-03-20 16:16:57 +00: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
3dce0dcca7 GdkSurface: Rename lots of stuff from window->surface
Mostly these are internal things, but the major public change is
that event.window is now event.surface.
2018-03-20 15:14:10 +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
Samuel Thibault
bd986f9534 gtkbuilder: add accessibility role declaration
This allows to override the role declared to the atk stack.  For
instance,

<accessibility>
  <role type="static"/>
</accessibility>

allows to tell the accessibility stack that a label is just a message in
a message box.

Fixes #109
2018-03-19 18:07:06 +01:00
Benjamin Otte
abc9b944f9 testsuite: Update C++ keywords test to GTK 3.0.0 2018-03-18 19:20:46 +01:00
Benjamin Otte
d54ca3c74f gdk: Add GDK_MEMORY_DEFAULT
This is the default memory format.

I added it because it is way better than including a private header and
using GDK_MEMORY_CAIRO_FORMAT_ARGB32.
2018-03-18 05:57:07 +01:00
Matthias Clasen
454814c6b4 Merge branch 'css-image-scaled' into 'master'
Css image scaled

See merge request GNOME/gtk!62
2018-03-15 23:58:40 +00:00
Matthias Clasen
55d35dd13e Update the expected results in the testsuite
the -gtk-scaled() change in the previous commit makes it so
that we now print out the scale factors. Update the expected
output of affected tests to take that into account.
2018-03-15 13:38:41 -04:00
Timm Bäder
65e3dda065 testsuite: Add more gl renderer tests 2018-03-15 12:58:51 +01:00
Timm Bäder
f82b3fdb90 gl tests: Update clipped cross fade output 2018-03-15 12:41:11 +01:00
Timm Bäder
d66bfb1a9a testsuite: Add a GL gradient test 2018-03-15 11:15:35 +01:00
Timm Bäder
8b800fa775 testsuite: Simplify GL test definition 2018-03-14 17:28:41 +01:00
Timm Bäder
d978d4af59 testsuite: Add a GL tests for clipped rounded clipped nodes 2018-03-14 17:28:41 +01:00
Benjamin Otte
e5813b3ae7 texture: Export gdk_memory_texture_new() and GdkMemoryFormat
Also add tests for all these newfangled formats.
2018-03-12 17:21:45 +01:00
Timm Bäder
1596c61003 testsuite: Remove GL text test case
This was just testing that text nodes do alpha correctly, but the test
even breaks if the default font is different from the one that was used
to create the reference image, so drop it for now.
2018-03-04 19:12:04 +01:00
Benjamin Otte
4ac3f916d0 css: Parse hex colors with alpha value
The CSS color spec version 4 introduces this, support has hit Safari,
Chrome and Firefox, so this looks like a feature that's here to stay.

https://drafts.csswg.org/css-color/#hex-notation
2018-03-02 02:00:24 +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
8891967f2b gtk testsuite: Stop using gtk_widget_show_now
If this is a problem, it needs to be handled explicitly.
2018-02-04 23:23:15 +01:00
Matthias Clasen
4ad658f91e a11y testsuite: Stop using gtk_widget_show_now
On non-windows, this doesn't do anything anyway.
2018-02-04 23:23:15 +01:00
Benjamin Otte
cf030e9ffc rbtree: Privatize header
According to meson it's the only private header that doesn't conform to
the *private.h naming.

Fix that.
2018-02-03 16:24:13 +01:00
Emmanuele Bassi
334acbfc39 Replace gdk_threads_add_idle* with g_idle_add()
The main GDK thread lock is not portable and deprecated.

The only reason why gdk_threads_add_idle() and
gdk_threads_add_idle_full() exist is to allow invoking a callback with
the GDK lock held, in case 3rd party libraries still use the deprecated
gdk_threads_enter()/gdk_threads_leave() API.

Since we're removing the GDK lock, and we're releasing a new major API,
such code cannot exist any more; this means we can use the GLib API for
installing idle callbacks.

https://bugzilla.gnome.org/show_bug.cgi?id=793124
2018-02-03 12:06:58 +01:00
Benjamin Otte
55874470ff gtk: Remove GtkRecentChooser
It's not used any more, recent files are only used by the filtchooser
and that one uses GtkRecentManager directly.
2018-02-02 23:01:31 +01:00
Timm Bäder
228b35c111 gl: Add test case for clipped cross fade nodes 2018-01-27 12:19:22 +01:00
Timm Bäder
6806c28b1e gsk: Add test case for last commit 2018-01-23 21:46:31 +01:00
Matthias Clasen
f942d6f53c Add a test for ::row-changed vs node refs
Test that filter models propagate ::row-changed if there is
an external reference on the node, and not otherwise. This
is showing up in buggy icon view behaviour, where the icon
view is not redrawing if the content changes in a model that
is below a filter model.
2018-01-19 23:29:13 +03:00
Timm Bäder
87bdfbb02c testsuite: Add another gl renderer test case 2018-01-19 14:59:31 +01:00
Matthias Clasen
e2f3b9b1cc tree model sort: Fix set_sort_column
We were failing to change the sort order for the
default sort column in some cases. Fix that, and
add a testcase for this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=792459

Add a testcase for the previous fix
2018-01-16 18:17:54 -05:00
Matthias Clasen
33ec75944f Fix the icontheme test
We rely on log messages here. Since logging is per-display
now, we need to set a display on our custom icontheme object
to get the expected log messages.
2018-01-16 15:42:28 -05:00
Matthias Clasen
0c1ac9add4 testsuite: Stop using ::button-press-event
We can use the generic ::event signal instead.
2018-01-16 14:14:10 -05:00
Timm Bäder
22c0a77ac5 tests: Update gl outset shadow tests
The results are slightly different for these now.
2018-01-15 10:57:25 +01:00
Matthias Clasen
9a3b61ec9d Drop GtkPlacesSidebar from public API
This is a bit of filechooser internals that gets shared with
nautilus, which is fine, but it shouldn't be part of our
public API. There are no other users than nautilus.
2018-01-08 14:38:55 -05:00
Timm Bäder
af6adb5bc0 gl renderer: Add test case for last commit 2018-01-04 12:20:27 +01:00
Matthias Clasen
ab256384b8 testsuite: Drop commented out and useless code
These two uses of ::delete-event were pointless.
2018-01-02 18:14:13 -05:00
Timm Bäder
767df913d1 testsuite: Move gl renderer nodes files into their own directory
Otherwise, they get picked up by the other node tests.
2017-12-28 16:48:35 +01:00
Timm Bäder
e1c120623b tests: Fix the unblurred gl renderer output images
Some of these were wrong or empty.
2017-12-28 16:48:35 +01:00
Timm Bäder
8312ee0ebe testsuite: Add selected gl renderer test node files 2017-12-28 16:48:35 +01:00
Matthias Clasen
3f012f6d01 Try again to make the a11y tests pass 2017-12-27 07:08:17 -05:00
Matthias Clasen
ed6992867e Fix the a11y tests 2017-12-26 23:16:18 -05:00
Matthias Clasen
90b016ef73 Fix the textbuffer test
The test was assuming that gtk_text_buffer_paste_clipboard is
synchronous, which is no longer the case.
2017-12-26 23:15:30 -05:00
Matthias Clasen
7be6d18f27 Fix objects-finalize test
This test needs similar fixes to the notify test to
pass a display to GDK objects when instantiating them.
2017-12-26 20:11:09 -05:00
Matthias Clasen
1b6750c1f1 Fix notify test
We need to pass a display when creating more GDK objects now.
2017-12-26 20:06:06 -05:00
Timm Bäder
e05b0ae9a4 test-render-nodes: Add transformed clip nodes test 2017-12-21 19:12:30 +01:00
Timm Bäder
4aa3f51016 test-render-nodes: Add color matrix test 2017-12-21 18:25:52 +01:00
Timm Bäder
8c8583d04f test-render-nodes: Print a warning if we didn't generate anything 2017-12-21 18:25:52 +01:00
Timm Bäder
04742f320e build: Remove unused variable 2017-12-21 18:25:52 +01:00
Matthias Clasen
e92c0e85ec Replace gdk_keymap_get_for_display by gdk_display_get_keymap
Replace all uses of the old function by the new one.
No functional change.
2017-12-15 07:44:58 -05:00
Matthias Clasen
fd85ff0c7a Drop gdk_keymap_get_default()
It is better to use the explicit keymap getter - the
default display may not even use the current gdk backend.
2017-12-14 23:57:54 -05:00
Matthias Clasen
54a6273191 Drop gdk_atom_intern
Atoms are just interned strings now, so we can just
use g_intern_string.
2017-12-13 23:39:03 -05:00
Timm Bäder
484e453780 Fix a few overlooked casts
glib warns about these now.
2017-12-09 13:14:00 +01:00
Timm Bäder
1c9e3af482 css node tests: Update expected output 2017-12-08 21:09:03 +01:00
Benjamin Otte
2d5c82b4ec gtk: Remove GtkClipboard 2017-12-03 05:46:49 +01:00
Benjamin Otte
f53848c360 textview: Redo clipboard handling
Instead of using GtkClipboard and handling everything ourselves, we now
put GtkTextBuffer into the GdkClipboard and register (de)serializers for
text/plain.
2017-12-03 05:46:48 +01:00
Matthias Clasen
0b39631464 textview: Replace pixbufs by textures
This affects a few apis, such as gtk_text_iter_get_pixbuf,
gtk_text_buffer_insert_pixbuf and GtkTextBuffer::insert-pixbuf,
which have all been replaced by texture equivalents.

Update all callers.
2017-11-29 23:22:13 -05:00
Benjamin Otte
138abdbc47 a11y: Remove AtkStreamableContent implementation
That is some old code that still uses IOChannels, and the only
pseudouser is at-spi-atk's commented out code that is still using
CORBA types.

So get rid of it now before I need to start adapting it to the new
clipboard.
2017-11-29 23:03:33 -05:00
Benjamin Otte
9a6ec4e959 contentformats: Rename GtkTargetList
It's now called GdkContentsFormat
2017-11-20 23:12:33 +01:00
Benjamin Otte
c863ac0f90 dnd: Remove GtkTargetEntry and GtkTargetFlags
warning: We don't do any same-app checks anymore so you currently can
copy local data into external apps.

This will be fixed later.
2017-11-20 23:12:33 +01:00
Matthias Clasen
95876cbc9c Remove gdk/gdkx.h
It was just a kludge.
2017-11-16 23:00:01 -05:00
Benjamin Otte
3f5178dc21 selection: Remove the info uint
Instead of allowing people to pass a uint user-data, insist on them
comparing mime types.

The user data was a uint instead of a pointer anyway, so uniqueness
could not be guaranteed and it caused more issues than it was worth.
And that's ignoring the fact that it basically wasn't used.
2017-11-16 22:59:43 +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
3da65ff233 scalebutton: Remove icon size 2017-11-15 14:22:16 -05:00
Benjamin Otte
a7754a14b5 toolbar: Remove icon sizes 2017-11-15 14:22:16 -05:00
Benjamin Otte
7efc5a1558 clipboard: Consistently use GtkTargetList
Some code was using GtkTargetList, some used GtkTargetEntry and some
GtkTargetPair.
2017-11-15 19:07:16 +01:00
Benjamin Otte
13ca03efb1 cellrendererpixbuf: Remove stock-detail property
GTK3 didn't use that property already...
2017-11-14 18:37:38 -05:00
Benjamin Otte
ed1b6a9bed gdkwindow: Remove event_mask arguments from constructors 2017-11-13 23:41:38 +01:00
Benjamin Otte
b3f69c130e testsuite: Update expected results for scale changes 2017-11-05 06:58:05 +01:00
Benjamin Otte
8900024697 testsuite: Unrealize renderers before unreffing
This is now necessary, because the GL renderer crashes if we don't
enforce it.
2017-11-05 06:55:01 +01:00
Benjamin Otte
e2996732b9 testsuite: Remove cursor tests
Cursors always exist now, it does not make sense to test that their
creation fails anymore.
2017-11-04 00:07:13 +01:00
Benjamin Otte
e294f71555 x11: Redo cursor handling completely
Instead of creating a GdkX11Cursor, create GdkCursors. Cache the XCursor
in a hash table instead.

Also, make use of the new fallback mechanism for fallback code: Make
sure to provide cursors for the names that are guaranteed to exist, but
do not do bad attempts at displaying texture surfaces.
Black/White/transparent is not a replacement for those.
2017-11-04 00:07:13 +01:00
Benjamin Otte
ca3c23662c GskTexture => GdkTexture
We want this thing to replace GdkPixbuf, so it has to live in GDK.
2017-11-04 00:07:13 +01:00
Benjamin Otte
b4ad1a5618 testsuite: Remove unused test using long-gone API 2017-11-01 18:18:24 +01:00
Benjamin Otte
e60da87a94 testsuite: Update for screen => display property changes 2017-10-31 19:00:56 +01:00
Benjamin Otte
07164e098a window: Turn gtk_window_set_screen() into gtk_window_set_display()
And have a priv->display instead of a priv->screen.

Includes turning gtk_menu_set_screen() into gtk_menu_set_display(),
because that function just forwards to its window.
2017-10-31 08:25:37 +01:00
Benjamin Otte
9151e0b9f5 stylecontext: Port to use display instead of screen 2017-10-31 03:05:54 +01:00
Chun-wei Fan
5b9177f53b testsuite/gsk/test-render-nodes.c: Include <stdlib.h>
This is so that the compiler won't complain about our use of exit()

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-10-25 00:50:21 +08:00
Timm Bäder
9f1716edaa testsuite: Disable vulkan tests when vulkan isn't available
They are always going to fail in that case anyway.
2017-10-23 08:02:57 +02:00
Matthias Clasen
243bd4f0c8 gsk: Tweak cairo node apis
Rename the surface getter to peek, following other render
node getters, and make the surface-based constructor private,
since it is not something we want to encourage.

Update all callers.
2017-10-20 13:54:01 +02:00
Matthias Clasen
82e33823a9 Add a test for opacity render nodes
This test currently fails with the Vulkan renderer, despite
having its own reference image.
2017-10-18 23:45:43 +02:00
Matthias Clasen
a2aa128178 Fix tools test 2017-10-18 18:52:06 +02:00
Matthias Clasen
c54294e2e1 Add a forgotten file 2017-10-18 18:52:06 +02:00
Matthias Clasen
2f96592e80 Use the cairo renderer for gtk tests for now
We haven't tracked down yet why the window size tests
fail with Vulkan, so use cairo for now.
2017-10-18 17:30:20 +02:00
Matthias Clasen
4a22704d82 Fix test environments 2017-10-18 17:30:20 +02:00
Matthias Clasen
f8f94ab329 Install tools tests
At the same time, update the expected test output to match
the current tools output, and write diff and ref files in /tmp.
2017-10-18 17:30:20 +02:00
Matthias Clasen
896316a9d1 Install gtk tests
Some of these currently fail on my system.
2017-10-18 17:30:20 +02:00
Matthias Clasen
090832c6fa redo the gdk installed tests 2017-10-18 17:30:20 +02:00
Matthias Clasen
b7098a0ebc testsuite: be a bit more verbose
This may help tracking down some failures.
2017-10-18 17:30:20 +02:00
Matthias Clasen
389307eb2c Install separate render node test for cairo and vulkan
The vulkan test currently fails.
2017-10-18 17:30:20 +02:00
Matthias Clasen
fb22f84059 testsuite: don't write into installed locations
Save the output of the render node tests in /tmp.
2017-10-18 17:30:20 +02:00
Matthias Clasen
4c64509b28 Install gdk tests
This was missing so far
2017-10-18 17:30:20 +02:00
Matthias Clasen
b0b0095cf8 Test suite cosmetics
Reshuffle things a bit more, sort the test files into subdirectories,
and shorten their names.
2017-10-18 17:30:20 +02:00
Matthias Clasen
68503c3e13 Add some backend-specific reference images for render nodes 2017-10-18 17:30:20 +02:00
Matthias Clasen
e9d47e9516 Run the gsk tests for both cairo and vulkan
The vulkan tests fail currently.
2017-10-18 17:30:20 +02:00
Matthias Clasen
abe7d8a846 More testsuite cosmetics
Unify the test naming some more.
2017-10-18 17:30:20 +02:00
Matthias Clasen
3166dc45e8 Fix the a11y test 2017-10-18 17:30:20 +02:00
Matthias Clasen
cd87b02103 Update expected output of statusbar a11y test 2017-10-18 17:30:20 +02:00
Matthias Clasen
50c8221058 testsuite: Add missing files 2017-10-18 17:30:20 +02:00
Matthias Clasen
2a71a4382a testsuite: Use the cairo renderer for now 2017-10-18 17:30:20 +02:00
Matthias Clasen
8b63b180d3 Distribute all test files 2017-10-18 17:30:20 +02:00
Matthias Clasen
91497348bf Update all css parser tests
I have not tracked down in detail where all these changes originate,
this commit just gets things back to working again.
2017-10-18 17:30:20 +02:00
Matthias Clasen
6b2eafe1bb Drop widget style property test 2017-10-18 17:30:20 +02:00
Matthias Clasen
5824d8b5ee Stop testing deprecated css features 2017-10-18 17:30:20 +02:00
Carlos Garnacho
06b21b4bec testsuite: Make all gesture test touches happen in the middle of the window
The event coordinates are (so far) irrelevant to what we are testing here,
just make all events happen in the middle of the window in order to ensure
all widgets receive it. More importantly, avoid using fixed pixel distances,
since we don't get guarantees about window sizes.

Fixes the gestures testsuite on X11.
2017-10-12 18:32:27 +02:00
Timm Bäder
54ed2d1e63 testsuite: Updated expected GtkSwitch nodes
The slider comes last now.
2017-10-12 16:09:31 +02:00
Carlos Garnacho
40a2b91a6c testsuite: Update gestures test to pointer emulation removal
Now all widgets are mandated to handle the real thing, which means no
pointer events are emulated for the pointer emulating touch. The output
of these tests relied on this fact, so update to the tests handling real
touch events.
2017-10-12 14:47:15 +02:00
Carlos Garnacho
ff31bdd334 testsuite: Fix gesture test inconsistencies due to legacy event handling
Legacy GtkWidget vmethods are now handled on an event controller, which
due to being the very first controller added to every widget, runs in
a different order than the previously hardcoded.

Probably testing legacy events is not really futurible, specially after
we stop installing this legacy controller by default. I'll leave the
choice to remove these specific tests for later though.
2017-10-12 14:47:15 +02:00
Matthias Clasen
cb19bbba0c Update the css style test
The new font-variant support affected the output here.
2017-10-12 17:23:35 +08:00
Matthias Clasen
18519a7ca0 Make css node and style tests run
Just like the previous commit, we need to set G_TEST_SRCDIR.
2017-10-12 16:06:03 +08:00
Matthias Clasen
37f1d180c3 Make css parser tests run
We need to set G_TEST_SRCDIR and friends for this to do anything.
Setting it reveals that a bunch of the tests are broken.
2017-10-12 15:58:05 +08:00
Matthias Clasen
9ea8235cc7 Update some a11y tests 2017-10-11 20:09:21 -05:00
Matthias Clasen
f09b5a8953 Fix a typo 2017-10-11 19:59:07 -05:00
Matthias Clasen
eb71cd195a testsuite: cosmetics
Put all tests in a suite, and order them in a nicer way.
This makes the test output look better.
2017-10-11 19:33:43 -05:00
Matthias Clasen
a4deb7e7b4 Reshuffle the css tests a bit 2017-10-10 00:18:21 -04:00
Matthias Clasen
8c41365437 Reshuffle the a11y tests a bit 2017-10-10 00:16:31 -04:00
Matthias Clasen
a45e497fdf Install css api test again 2017-10-09 23:35:19 -04:00
Matthias Clasen
a2ee124d99 Install css style tests again
Reinstate the installed tests for css style.
2017-10-09 23:32:13 -04:00
Matthias Clasen
6c294e6804 Install css parser tests again
Reinstate the installed tests for the css parser.
2017-10-09 23:29:10 -04:00
Matthias Clasen
e5aa2021a0 Install css node tests again
Reinstate the installed tests for css nodes.
2017-10-09 23:24:23 -04:00
Matthias Clasen
49ab093f26 Add a transform node reftest 2017-10-08 23:19:35 -04:00
Matthias Clasen
4db1a7541a Add another cross-fade reftest 2017-10-08 22:45:05 -04:00
Matthias Clasen
e3f5a8bd47 Regenerate blendmodes reftest 2017-10-08 21:13:43 -04:00
Matthias Clasen
cd4892c50a Stop using gsk_cairo_node_new_for_surface
Best to avoid handling the surface ourselves.
2017-10-08 20:05:16 -04:00
Matthias Clasen
6e5ded8492 Add another blendmodes reftest
This tests all blendmodes. Again, the Vulkan renderer fails.
2017-10-08 19:58:09 -04:00
Matthias Clasen
87aaa5685b Add a cross-fade node ref test
The Vulkan renderer doesn't pass this one either, currently.
2017-10-08 14:36:35 -04:00
Matthias Clasen
eacdeec29e Add a blendmode node reftest
The Vulkan renderer doesn't pass this, currently.
2017-10-08 14:29:27 -04:00
Matthias Clasen
8dc48d0322 Expand the repeat node test
Still not exhaustive, but enough to find some issues.
2017-10-08 13:50:41 -04:00
Matthias Clasen
1fe4e12356 Add a repeat node test 2017-10-08 12:23:18 -04:00
Matthias Clasen
df549c4e9f Add a basic cairo node test 2017-10-08 12:21:45 -04:00
Matthias Clasen
95f29de710 Allow backend-specific reference images
This is not ideal, but lets us deal with differences for now.
2017-10-08 12:21:36 -04:00
Matthias Clasen
8beb78149d Start reftests for gsk
Add a framework similar to what we have for gtk reftests
that lets us drop in a function to generate render nodes,
and compare reference output.
2017-10-02 00:21:56 -04:00
Timm Bäder
c8c39af454 testsuite: Add test case for previous commit
This previously led to a loop in the child widgets.
2017-09-29 12:16:06 +02:00
Timm Bäder
18837248a6 build: Add widgetorder unit test to build system 2017-09-29 12:10:42 +02:00
Debarshi Ray
60cee7339f GtkBuilder: Enforce "class" as a mandatory attribute for <object>
https://bugzilla.gnome.org/show_bug.cgi?id=786931
2017-09-25 15:26:34 +02:00
Matthias Clasen
b350db58e0 testsuite: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Chun-wei Fan
60297b9fc7 testsuite: Fix builder test on Windows/MSVC
Visual Studio does not support things like -Wl,export-dynamic, so we
need to export those symbols by using __declspec(dllexport).  So, we
decorate these with macros which we define accordingly for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=785210
2017-09-15 21:41:15 +08:00
Debarshi Ray
fd9aec27fc GtkBuilder: Prefer "type-func" over "class" when looking for the GType
https://bugzilla.gnome.org/show_bug.cgi?id=786932
2017-08-29 15:41:01 +02:00
Timm Bäder
4fbe313cbc build: Remove wrong kwargs from a11y test()s
test() does not take install: or install_dir: kwargs.
2017-08-15 14:56:13 +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
77c9ef1b7b testsuite: Don't use GtkEventBox in gestures test 2017-08-02 16:58:17 +01:00
Benjamin Otte
b6efd89225 testsuite: Remove GtkEventBox from a11y test 2017-08-02 16:47:39 +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
Benjamin Otte
bb238894dc testuite: Remove EventBox from builder test 2017-08-02 11:34:57 +01:00