Commit Graph

1531 Commits

Author SHA1 Message Date
Matthias Clasen
a8e04ee81d Merge branch 'matthiasc/for-master' into 'master'
More reftest fixes

See merge request GNOME/gtk!1765
2020-04-26 14:30:10 +00:00
Matthias Clasen
fa2a8ac1bb reftests: Remove window-show-contents-on-map from xfails
This test passes now.
2020-04-26 09:18:54 -04:00
Matthias Clasen
56565b12d8 reftests: Fix the window-show-contents-on-map test
Despite the name, the test was not in fact showing
contents on map anymore, since widgets are visible
by default. Setting visible to FALSE makes the test
work as expected again.
2020-04-26 09:16:25 -04:00
Matthias Clasen
7f1e82d1bc Merge branch 'wip/exalm/titlebuttons' into 'master'
GtkWindowControls + GtkHeaderBar cleanups

See merge request GNOME/gtk!1755
2020-04-26 13:09:35 +00:00
Matthias Clasen
99d7130da3 reftests: Remove background-image-multiple from xfails
It no longer fails.
2020-04-25 13:26:14 -04:00
Matthias Clasen
ac3e604bb6 reftests: Use transform syntax
This is supposed to fix the background-image-multiple
reftest, but it doesn't. There's an actual bug here.
2020-04-25 12:47:17 -04:00
Matthias Clasen
1d86a89ccf testsuite: Take textview-border-windows out of xfails
The textview-border-window reftest passes now, so
take it out of the xfails.
2020-04-24 18:35:22 -04:00
Matthias Clasen
c192038027 reftests: Avoid text caret from interfering
We are comparing a transparent label to a transparent
text view, so need to make sure the caret does not show
up in the text view to ruin the comparison.
2020-04-24 18:33:57 -04:00
Matthias Clasen
894e1d0885 testsuite: Take border-color-transparent out of xfails
The border-color-transparent reftest passes now, so
take it out of the xfails.
2020-04-24 15:20:58 -04:00
Matthias Clasen
c8d4a48c03 reftests: Avoid theme influence
Reset to defaults in background-color-transparent,
to avoid theme influence in the results.
2020-04-24 15:19:24 -04:00
Matthias Clasen
7ce964a455 reftests: Avoid decorations
Window decorations always cause trouble between ci
and local test runs, so turn them off for the
background-color-transparent reftest.
2020-04-24 15:18:02 -04:00
Alexander Mikhaylenko
197fe80857 testsuite: Fix swapped params in notify test
The expected and counted params are swapped in literally every call, so
swapping the params to match them.
2020-04-24 23:54:07 +05:00
Matthias Clasen
96f9f9585f reftests: Stop using shadow-type 2020-04-17 11:06:16 -04:00
Matthias Clasen
12d5fdd457 menubutton: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
df1816a29c button: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
285aa226e5 scrolledwindow: Drop shadow-type
We were only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Emmanuele Bassi
f28aa1ba02 Restructure the GdkEvent type hierarchy
GdkEvent has been a "I-can't-believe-this-is-not-OOP" type for ages,
using a union of sub-types. This has always been problematic when it
comes to implementing accessor functions: either you get generic API
that takes a GdkEvent and uses a massive switch() to determine which
event types have the data you're looking for; or you create namespaced
accessors, but break language bindings horribly, as boxed types cannot
have derived types.

The recent conversion of GskRenderNode (which had similar issues) to
GTypeInstance, and the fact that GdkEvent is now a completely opaque
type, provide us with the chance of moving GdkEvent to GTypeInstance,
and have sub-types for GdkEvent.

The change from boxed type to GTypeInstance is pretty small, all things
considered, but ends up cascading to a larger commit, as we still have
backends and code in GTK trying to access GdkEvent structures directly.
Additionally, the naming of the public getter functions requires
renaming all the data structures to conform to the namespace/type-name
pattern.
2020-04-16 19:54:02 +01:00
Matthias Clasen
5095e87bb7 testsuite: Add some checks for focus states
This is some opportunistic checking in a test that
is really about focus chains, but better than nothing.
2020-04-16 12:31:17 -04:00
Matthias Clasen
e3dba28666 Merge branch 'arnaudb/better-substitution' into 'master'
Fix some gtk-builder-tool substitutions.

See merge request GNOME/gtk!1675
2020-04-12 22:53:54 +00:00
Arnaud Bonatti
e76dee07c5 Fix tests for margin-left and margin-right. 2020-04-12 19:28:33 +02:00
Arnaud Bonatti
a7218da202 Fix tests for hexpand and vexpand. 2020-04-12 19:28:29 +02:00
Arnaud Bonatti
ed362fcc5b Fix --3to4 tests for margin substitution. 2020-04-12 19:28:29 +02:00
Matthias Clasen
7233a70d47 reftest: get backtraces
In the hope of making ci-only failures less of a black hole,
add a backtrace to the messsage for criticals.

This could eventually go into GLib (pass backtrace symbols along
as a log field for criticals), but for now this will do.
2020-04-12 11:44:13 -04:00
Matthias Clasen
b09b2dd2cd testsuite: Make actions test order-independent
We only want to check that the actions are what we
expect, not that they are registered in a particular
order.
2020-04-11 10:07:31 -04:00
Matthias Clasen
394ea32e93 Use gtk_widget_add/remove_css_class more
Replace most uses of gtk_style_context_add/remove_class
by the new APIs. The only remaining uses of the old API
are in save/restore situations.
2020-04-10 12:09:57 -04:00
Matthias Clasen
822c2aba36 scalebutton: Don't derive from GtkButton
Make GtkScaleButton a widget that has a toggle button
as a child, just like all the other button widgets now.
The immediate benefit of this arrangement is to avoid
the "double focus" problem when we pop up the popup.

Update accessible, demos and tests to match.
2020-04-09 20:43:45 -04:00
Matthias Clasen
35ba24d2e8 Update a11y test results 2020-04-09 18:26:10 -04:00
Matthias Clasen
b9a76ddd75 Fix the tools tests to not set can-focus 2020-04-09 17:50:29 -04:00
Matthias Clasen
038190c5a8 Disable focus-chain test that depends on the environment
The color editor shows a color picker button only if it
finds a suitable implementation, which it does not in ci.
So disable the focus-chain test for page 3.
2020-04-09 17:50:29 -04:00
Matthias Clasen
99eed078bd Remove focusable-container tests
Like the previous commit, these tests were relying
on setting :can-focus to make an unsuspecting container
focusable, which does not work anymore.
2020-04-09 17:50:29 -04:00
Matthias Clasen
6720552afd Remove the focus test
This test was expecting to make existing widgets like
GtkBox focusable by setting :can-focus. That just doesn't
work anymore.

The focus chain testing that is done here is already
better covered by test-focus-chain, so lets just remove this.
2020-04-09 17:50:29 -04:00
Matthias Clasen
6f01508aa8 Fix up focus chain result
The notebook grab_focus change in the previous commit made
backwards tabbing work as expected, and thereby changed the
output of one of the focus-chain tests.
2020-04-09 17:50:29 -04:00
Matthias Clasen
9416856420 testsuite: Stop setting :has-focus
This is not necessary, whenever we want to set the initial
focus in a ui file, we can set GtkWindow:focus-widget.
2020-04-09 17:50:29 -04:00
Matthias Clasen
4fe8c037c7 reftests: Stop using can-focus 2020-04-09 17:50:29 -04:00
Matthias Clasen
b1afe5ff23 a11y tests: Stop using can-focus 2020-04-09 17:50:29 -04:00
Matthias Clasen
bbd4fb8798 testsuite: Stop using can-focus 2020-04-09 17:50:29 -04:00
Matthias Clasen
ff8217db40 Add more focus chain tests
Test page 2 and 3 of widget-factory as well, and try other directions.
2020-04-09 17:50:28 -04:00
Matthias Clasen
a3861bf9a0 Fix running focus-chain tests in ci
The widget-factory ui files require geettings
(for the color chooser), so set GSETTINGS_SCHEMA_DIR.
2020-04-09 17:50:28 -04:00
Matthias Clasen
c03b7e4d45 reftests: Comment out a test that fails only in ci
Fixing such only-in-ci failures is just too hard,
unfortunately.
2020-04-06 16:32:03 -04:00
Matthias Clasen
c297d45b8a gtk: Stop using modifier intents
Reviewing the existing settings, the only backend with
some differences in the modifier intent settings is OS X,
and we would rather have that implemented by interpreting
the existing modifiers in the appropriate way.

                X11      Wayland  Win32    OS X

primary         ctrl     ctrl     ctrl     mod2
mnemonic        alt      alt      alt      alt
context menu    -        -        -        ctrl
extend sel      shift    shift    shift    shift
modify sel      ctrl     ctrl     ctrl     mod2
no text         alt|ctrl alt|ctrl alt|ctrl mod2|ctrl
shift group     varies   -        -        alt

GTK now uses the following modifiers:

primary         ctrl
mnemonic        alt
extend sel      shift
modify sel      ctrl
no text         alt|ctrl

The context menu and shift group intents were not used
in GTK at all.

Update tests to no longer expect <Primary> to roundtrip
through the accelerator parsing and formatting code.
2020-04-06 16:32:03 -04:00
Matthias Clasen
0a96a483c6 gdk: Redo key events
Add all of the keyboard translation results in the key event,
so we can translate the keyboard state at the time the event
is created, and avoid doing state translation at match time.

We actually need to carry two sets of translation results,
since we ignore CapsLock when matching accelerators, in
gdk_event_matches().

At the same time, drop the scancode field - it is only ever
set on win32, and is basically unused in GTK.

Update all callers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
b02db72e17 Rename GDK_MOD1_MASK to GDK_ALT_MASK
We've hardcoded Mod1 = Alt for a long time, there is
no need to keep the confusing naming around anymore.
2020-04-06 01:40:49 -04:00
Matthias Clasen
6eaadba008 testsuite: Stop using keymap apis 2020-04-06 01:40:49 -04:00
Matthias Clasen
e8330c5eec Add gdk_event_matches
Move the elaborate key event matching code from
GtkShortcutTrigger to GdkEvent, which greatly reduces
the amount of keymap api use outside of GDK.
2020-04-05 23:37:13 -04:00
Matthias Clasen
8991275fbd colorbutton: Fix focus
The colorbutton contains a button which contains a colorswatch.
We want the focus to go straight to the button, nowhere else,
so mark the swatch as !can-focus.

Adapt tests to match.
2020-04-04 00:28:45 -04:00
Matthias Clasen
e43eb951d6 Merge branch 'scrollbar-a11y' into 'master'
Add GtkScrollbarAccessible

See merge request GNOME/gtk!1623
2020-04-04 04:03:40 +00:00
Matthias Clasen
6b292af6ac testsuite: Add tests for parsing shortcut actions 2020-04-03 22:42:00 -04:00
Matthias Clasen
339d3e41b0 Add GtkScrollbarAccessible
When GtkScrollbar stopped being a GtkRange,
GtkRangeAccessible stopped working for scrollbars.

Update a11y tests to match.
2020-04-03 15:20:27 -04:00
Matthias Clasen
d662512c44 testsuite: Add a big focus chain testcase 2020-04-03 11:35:34 -04:00
Matthias Clasen
324af2f701 testsuite: Try harder to record a full focus chain
It is hard to avoid widgets with the same name in a
large ui file - try harder to record a full focus chain
before decide that we've wrapped, by including the widget
address in the comparison. Note that we don't include
the addresses in the generated output, since that would
make expected output vary from run to run.
2020-04-03 11:35:26 -04:00