Commit Graph

38466 Commits

Author SHA1 Message Date
Carlos Garnacho
524e28a13c tests: Add multitouch gesture tests
So far, gesture behavior on lack/excess of touchpoints is tested, as well
as sequence hand-in between gestures in these situations.
2014-06-04 13:54:41 +02:00
Carlos Garnacho
cb059bfc1b widget: Set GDK_BUTTON1_MASK on emulated pointer events
The touch_event handler was missing those when emulating pointer events
for the widgets that get GDK_TOUCH_MASK set, but have no specialized
touch handlers.
2014-06-04 13:44:56 +02:00
Matthias Clasen
7a0642743d Fix up internal function naming
Even if you believe this functionality belongs into gdk, it
is not ok to name internal functions in gtkwindow.c gdk_window...
2014-06-04 06:38:20 -04:00
Matthias Clasen
872fbfacd3 Split GtkWindowGroup into its own file
gtkwindow.c is too big and too messy. This is a small step
towards making it better.
2014-06-04 06:24:05 -04:00
Matthias Clasen
d467850af0 Shorten test paths 2014-06-03 14:22:55 -04:00
Matthias Clasen
c11b7e44a0 label-sizing reftest: Hardcode ltr
This reftest doesn't work in rtl.
2014-06-03 12:28:06 -04:00
Matthias Clasen
ac59f0ac08 reftests: Add a way to hardcode text direction
Some tests don't work in rtl, so add a way to hardcode
the expected text direction. This is in preparation for
running reftests in an rtl locale.
2014-06-03 12:28:06 -04:00
Carlos Garnacho
94f573d8a4 tests: Add tests for grab interaction with gestures
The behavior of gestures that are kept outside/inside a grab is tested,
to ensure the former are cancelled and the latter remain unchanged.
2014-06-03 16:13:25 +02:00
Carlos Garnacho
25f5da5018 widget: Ensure all gestures outside a grab scope are cancelled
This code is a product of early stages in the gestures branch, where
capturing would have an effect outside grab boundaries. But this isn't
really the case, so every gesture outside the grab scope must be reset
to avoid keeping stale data.
2014-06-03 16:13:25 +02:00
Carlos Garnacho
93f72985bf tests: Add gesture tests for early/late sequence claiming
This tests both a sequence being claimed early to be then denied
(and handled deeper in propagation chain), and a sequence being
claimed late in the capture phase (and thus being cancelled deeper
in the propagation chain)
2014-06-03 16:13:25 +02:00
Carlos Garnacho
fd1a566d46 tests: Inform of gesture updates during recognition
May be useful to find out which gestures are still being triggered
by a sequence.
2014-06-03 16:13:25 +02:00
Carlos Garnacho
fe7215e369 testsuite: Prepare gestures testsuite for mouse/touch events
state is preserved for mouse emulation, and up to 10 touchpoints for touch
emulation.
2014-06-03 15:59:03 +02:00
Carlos Garnacho
26ced6abad widget: Only deny a sequence if it was previously claimed
Before this change, a sequence being claimed deep in the event propagation
chain would make the sequence go denied on every ancestor, regardless of
previous state.

To make things more consistent, only deny the sequence if it was previously
claimed, so the behavior is the same for gesture groups within the widget
than for those outside the widget.

The gestures testsuite has been updated to reflect this new behavior.
2014-06-03 15:59:03 +02:00
Carlos Garnacho
c773859c99 gesture: Ensure late gestures handling the sequence get the group state
It might happen that a gesture claims a sequence before any other gesture
in its group even handled a single event from that sequence. In that case,
ensure the state is set accordingly right when the sequence is handled in
those.

The "group" gesture testcase has been updated to observe this behavior.
2014-06-03 15:59:03 +02:00
Matthias Clasen
f6cf7fee73 inspector: Parse custom css with a delay
The CSS editor was feeling a little sluggish, because it was
reparsing and reapplying the CSS on every keystroke. Add a small
delay, to make this feel smoother.
2014-06-03 09:44:28 -04:00
Benjamin Otte
45dbd84ff3 reftests: Use "all" property in inherit-and-inital test 2014-06-03 14:35:00 +02:00
Chun-wei Fan
61b9bcf1d5 MSVC Projects: "Generate" the gtk-inspector Projects
Like the GDK and GTK portions, use autotools scripts to generate the
complete projects for gtk-inspector as sources there seem to change from
time to time.

It might be so that this, like the a11y sources, will be referenced from
the main Makefile.am of GTK directly, but just do this so that the
projects can build properly.
2014-06-03 17:03:40 +08:00
Chun-wei Fan
dd4bc9fd09 gdk/Makefile.am: Fix MSVC Project Generation
We need to account for the sources that moved to gdk/deprecated/, so the
slashes must be converted here.
2014-06-03 17:00:02 +08:00
Chun-wei Fan
ddc3f8eae7 MSVC Builds: Update the gtk-demo Projects
Add the gestures demo sources into the build, so that the build will
complete properly.
2014-06-03 16:55:46 +08:00
Chun-wei Fan
48533b7b60 Update Visual Studio Solution Files
Remove all references to the gtka11y projects as they are all built
together with the GTK DLL.

https://bugzilla.gnome.org/show_bug.cgi?id=730615
2014-06-03 16:46:53 +08:00
Matthias Clasen
42945f0d74 Run reftests repeatedly
Install test files that run the reftests in the
Adwaita:dark and HighConstrast themes. It works,
so why not.
2014-06-02 22:46:23 -04:00
Matthias Clasen
7f8d0552f0 Drop debug spew from installed tests
This is no longer needed, we found the problem.
2014-06-02 22:37:29 -04:00
Matthias Clasen
5bebbb06fa Add an expander reftest
This test check that resizing the window when expanding
the expander yields the same end result as having the
expander expanded to begin with. The test uses the inhibit
mechanism introduced in the previous commit.
2014-06-02 22:36:01 -04:00
Matthias Clasen
b86f5a4086 Add a way to delay snapshots in reftests
This adds an inhibit api that code from the reftest module
can use to delay the taking of the snapshot. Also refactor
the code in gtk-reftest to use the inhibit mechanism for
its own delaying of the snapshot until after the first
expose.
2014-06-02 22:35:59 -04:00
Matthias Clasen
16c89eb5f7 Forgotten file 2014-06-02 21:43:04 -04:00
Matthias Clasen
94c065d647 Add a reftest for flipping icons
Taking advantage of our new direction flipping ability.
2014-06-02 21:41:32 -04:00
Carlos Garnacho
3c0ebf65cf window: Only check for the event widget if clicked on the "content" region
Every button press/release event reaching the the multipress gesture in GtkWindow
and happening in the "title" region must be handled, regardless of the event widget.
Children there wanting the event(s) for themselves are (and were always) expected
to stop event propagation.

So the only place to check for the event widget's "window-dragging" style property
is the "content" region, which matches the pre-gestures behavior.

This fixes some issues with sequences being mistakenly claimed (and events not
propagated further) on situations it shouldn't.
2014-06-02 18:38:25 +02:00
Carlos Garnacho
00656ed10b window: Handle manually bubbled events
The multipress gesture must react to either direct events on the
GtkWindow (special cased through _gtk_widget_check_handle_wm_event),
or bubbled events from child widgets. Ensure bubbled events go
through the gesture, those are fed manually to make sure events are
only handled once, in either one or other place. The implicit grab
will ensure that doesn't change mid-action.
2014-06-02 18:38:25 +02:00
Carlos Garnacho
7f33706c12 window: Refactor _gtk_window_check_handle_wm_event()
Separate the event widget check from event handling
2014-06-02 18:38:25 +02:00
Carlos Garnacho
e1c425a24d treeview: Ensure the event is consumed on ::row-activate
Otherwise the event is possibly handled, but still propagated further anyway.
Ensure the event is consumed by claiming the current sequence on the
GtkGestureMultiPress::pressed handler.
2014-06-02 18:38:25 +02:00
Carlos Garnacho
541ed65a51 treeview: restrict the multipress gesture to GDK_BUTTON_PRIMARY
::row-activated only used to be triggered by GDK_BUTTON_PRIMARY, so make
the multipress gesture handling this now to be only triggered by that same
button.

https://bugzilla.gnome.org/show_bug.cgi?id=731020
2014-06-01 21:57:15 +02:00
Matthias Clasen
a3cd0ee7d8 Revert "Use minimum/natural size semantics"
This reverts commit 6d53c2339f.

https://bugzilla.gnome.org/show_bug.cgi?id=731054 showed some
major regressions caused by this commit.
2014-06-01 10:20:08 -04:00
Matthias Clasen
73ff6a8e0f Revert "Better resize of expandable columns"
This reverts commit 0050d469b5.

Conflicts:
	gtk/gtktreeview.c
2014-06-01 10:19:14 -04:00
Matthias Clasen
fd62353e25 Avoid another revert conflict
Moving this bit up a few lines lets the following revert apply
cleanly.
2014-06-01 10:18:38 -04:00
Matthias Clasen
210453b79e Revert "treeview: Remove unneeded checks"
This reverts commit a158a2aa48.

The commit conflicts with a later revert, so move it out of the way.
2014-06-01 10:17:59 -04:00
Matthias Clasen
97930a774b Add more gestures tests
Some of these sequences look wrong/questionable to me.
2014-05-31 18:46:43 -04:00
Matthias Clasen
bdf81a7c70 gestures test: make more readable 2014-05-31 12:54:36 -04:00
Matthias Clasen
4298e88f48 gestures: Add a test for grouping
I'm not entirely convinced the test produces the expected
outcome, here.
2014-05-31 12:48:14 -04:00
Matthias Clasen
1c24b288b0 Expand gesture tests a big more
Print out sequence state changes, and cancellation, and verify that
claiming a gestures causes the expected state changes.
2014-05-31 12:26:15 -04:00
Carlos Garnacho
995b6d1fd4 textview: Only trigger drag gesture on GDK_BUTTON_PRIMARY
This gesture was only meant to react on GDK_BUTTON_PRIMARY (either
through real pointer events, or implicitly assumed from touch events),
as it used to behave before gestures. Otherwise the gtk_drag_begin*()
call assumes being triggered by button 1, and the drag misbehaves
because that button isn't really in the state mask.

https://bugzilla.gnome.org/show_bug.cgi?id=731016
2014-05-31 15:11:05 +02:00
Piotr Drąg
fc1e274b89 Updated POTFILES.skip 2014-05-31 15:08:21 +02:00
Benjamin Otte
86267fd9bd gtk-reftest: Add GMODULE_CFLAGS/LIBS
They aren't included in GTK_DEP_CFLAGS/LIBS so they need to be added
manually.
2014-05-31 14:40:13 +02:00
Matthias Clasen
98cf67ddba testsuite: put installed tests in the right place
Follow the prevailing practice and put the installed tests
into $libdir/installed-tests/$PACKAGE instead of
$pkglibdir/installed-tests.
2014-05-31 00:16:07 -04:00
Matthias Clasen
921b6519f1 inspector: better type detection for resources
Pass the name to g_content_type_guess. With this, most
CSS gets sniffed as C source code.
2014-05-30 23:45:11 -04:00
Matthias Clasen
5880c9e365 gtk-reftest: Don't warn needlessly
Only warn about the --direction argument if the option was
actually specified.
2014-05-30 23:30:56 -04:00
Matthias Clasen
e4ba5b6ab6 inspector: Go to the right tab when changing objects
When going from attribute mapping to model, it makes most sense
to go directly to the data tab, and when going from an action
name to the owner, we want to show the actions tab. Make it so.
2014-05-30 23:22:29 -04:00
Matthias Clasen
5ed6653859 inspector: Allow jumping to actions
The property editor for action-name properties now offers
to go to the object where the action is defined.
2014-05-30 23:22:29 -04:00
Matthias Clasen
d33ff810cc inspector: Trivial string change
'Size Groups' looks better than 'Sizegroups'.
2014-05-30 23:22:29 -04:00
Benjamin Otte
a18ec83b3b reftests: Add reftest for direction change
This reftest makes use of the new feature to add signal handlers.

It adds a libreftest.so module containing all the code for the reftests.
When adding a test named reftest.ui, please keep code contained in a
source file names reftest.c and add that file to Makefile.am.

https://bugzilla.gnome.org/show_bug.cgi?id=730833
2014-05-31 05:19:41 +02:00
Debarshi Ray
047d2b5f6d Update GtkImage icons when the direction is changed
Don't call gtk_widget_set_state_flags(), it filters the direction flags.
Instead, call gtk_widget_update_state_flags() directly.

https://bugzilla.gnome.org/show_bug.cgi?id=730833
2014-05-31 05:19:41 +02:00