Commit Graph

30954 Commits

Author SHA1 Message Date
Carlos Garnacho
cbc677986e gdk: Keep track of the last slave device used
This last slave device (stored per master) is used to fill
in the missing slave device in synthesized crossing events
not directly caused by a device event (ie. due to configure
events or grabs)
2012-02-23 11:33:09 +01:00
Carlos Garnacho
59a54eaf95 gtk,tooltips: Use the source device instead of gtk-touchscreen-mode
This makes tooltips behavior dynamic based on the interacting device.
2012-02-23 11:33:09 +01:00
Carlos Garnacho
bcd51482a6 gtk,scrolledwindow: Clamp early overshooting when snapping back
Fixes the situation where overshooting in scrolled windows with a
small viewport could end up overshooting right to the opposite
side, and then back again indefinitely.
2012-02-23 11:33:09 +01:00
Carlos Garnacho
220b4130ec gtk: Handle motion hints for ::captured-event
Request automatically more motion events in behalf of
the original widget if it listens to motion hints. So
the capturing widget doesn't need to handle such
implementation details.
2012-02-23 11:33:09 +01:00
Carlos Garnacho
37329a9596 gtk,scrolledwindow: capture motions until the kinetic scrolling cancellation
If the widget which events are captured listens to motion hints, there
are situations where neither the scrolled window or the child widget
request more motions.
2012-02-23 11:33:09 +01:00
Carlos Garnacho
ad339cb823 gtk,scrolledwindow: Unset dragging device on ::grab-notify
The child widget may still call gtk_(device_)grab_add, which left
the scrolled window in an inconsistent state.
2012-02-23 11:33:09 +01:00
Carlos Garnacho
bd2f0fe877 gtk,scrolledwindow: Rework physics behind kinetic scrolling
The maths being used didn't resemble much about velocities or
friction/deceleration, so reimplement it in terms of velocity
vectors and decelerations, measured in pixels/ms^2.

Overshooting is also handled within the deceleration effect,
turning into a constant acceleration vector in the opposite
direction so it returns elastically within the boundaries.
2012-02-23 11:33:09 +01:00
Carlos Garnacho
a0225f9d07 gtk,scrolledwindow: Implement overshooting
An extra GdkWindow has been added, this window is the parent
of the child widget, and is the one getting resized/moved when
overshooting.

The unclamped adjustments' values are also stored in
GtkScrolledWindowPrivate as a separate value, overshooting is
pretty specific to GtkScrolledWindow and it isn't worth to
expose API in GtkAlignment for this single purpose.

This method allows GtkScrollable children to be blissfully
unaware of overshooting, as otherwise they'd have to handle
rather odd adjustment values themselves.
2012-02-23 11:33:08 +01:00
Carlos Garnacho
c4215d7231 gtk,scrolledwindow: Add window for overshooting
This window is the child widget's parent window, and will
be the one that's moved when overshooting.
2012-02-23 11:33:08 +01:00
Carlos Garnacho
8a3e2b748c scrolledwindow: Handle nested scrolled windows in kinetic scrolling
The innermost scrolled window always gets to capture the events, all
scrolled windows above it just let the event go through. Ideally
reaching a limit on the innermost scrolled window would propagate
the dragging up the hierarchy in order to keep following the touch
coords, although that'd involve rather evil hacks just to cater
for broken UIs.
2012-02-23 11:33:08 +01:00
Carlos Garnacho
c41d304e7f scrolledwindow: Use event times when calculating deceleration
Using g_get_current_time() isn't going to be realistic on lagging
events.
2012-02-23 11:33:08 +01:00
Carlos Garnacho
fe43df2235 scrolledwindow: bypass kinetic scrolling if no scrollbars are shown 2012-02-23 11:33:08 +01:00
Carlos Garnacho
c1c6cd75aa scrolledwindow: Remove priv->event_window
It looks like a leftover from pre-captured-event iterations of
the patch, it is completely unnecessary now.
2012-02-23 11:33:08 +01:00
Carlos Garnacho
be74ffe6f0 scrolledwindow: Don't use p-a-h for the "let event go through" timeout
Just use a timeout there, the press-and-hold feedback is undesirable
here.
2012-02-23 11:33:08 +01:00
Carlos Garnacho
4c387f0252 scrolledwindow: Enable kinetic scrolling by default 2012-02-23 11:33:08 +01:00
Carlos Garnacho
f5acae5961 scrolledwindow: add another shortcut to bypass event capture
When clicked again close to the previous button press location
(assuming it had ~0 movement), the scrolled window wil allow
the child to handle the events immediately.

This is so the user doesn't have to wait to the p-a-h timeout
in order to operate on the scrolledwindow child.
2012-02-23 11:33:08 +01:00
Carlos Garnacho
7b7abdfc71 scrolledwindow: Only do kinetic scrolling on touch devices
This is sort of meaningless on pointer devices, besides it implies
a different input event handling on child widgets that's unnecessary
there.
2012-02-23 11:33:08 +01:00
Carlos Garnacho
00206c1a57 scrolledwindow: Don't crash on 0-sized motion buffer 2012-02-23 11:33:08 +01:00
Carlos Garnacho
3b34cfb873 entry: Handle ::grab-notify
Store the device, and unset private fields whenever the device
is shadowed by another GTK+ grab, so popping up menus while
selecting (i.e. press-and-hold) doesn't leave it in a confused
state.
2012-02-23 11:33:08 +01:00
Carlos Garnacho
ef4bc43ce5 tests: Update testkineticscrolling to use GtkGrid 2012-02-23 11:33:08 +01:00
Carlos Garnacho
caeba038b5 gtk: Expose _gtk_propagate_captured_event() as a private function 2012-02-23 11:33:08 +01:00
Carlos Garnacho
11d7ac171c gtk: Propagate ::captured-event up the hierarchy for crossing events 2012-02-23 11:33:08 +01:00
Carlos Garnacho
cc382907ab gtk: emit ::captured-event starting from the GTK grab widget 2012-02-23 11:33:08 +01:00
Carlos Garcia Campos
ccbd72dbe4 scrolledwindow: Allow selections and drag-and-drop when kinetic scrolling is enabled
If the scrolling doesn't start after a long press, the scrolling is
cancelled and events are handled by child widget normally.
2012-02-23 11:33:07 +01:00
Carlos Garcia Campos
83e6e9909e tests: Add new test for kinetic scrolling 2012-02-23 11:33:07 +01:00
Carlos Garcia Campos
82c0f59a54 test: Add checkbox to enable/disable kinetic scrolling in scrolled window test 2012-02-23 11:33:07 +01:00
Carlos Garcia Campos
3434a84d87 scrolledwindow: Initial kinetic scrolling support 2012-02-23 11:33:07 +01:00
Carlos Garcia Campos
94b3b05634 Add GtkWidget::captured-event signal
https://bugzilla.gnome.org/show_bug.cgi?id=641836
2012-02-23 11:33:07 +01:00
Carlos Garnacho
010e682160 gdk: Add GDK_SOURCE_TOUCH
This device source applies to touch capable devices, most
notably touchscreens.
2012-02-23 11:33:07 +01:00
Chun-wei Fan
72482c335d Bug 670499-gtkthemingengine.c: Include fallback-c89.c
This is due to the use of round and nearbyint() function, which are C99 functions...
2012-02-23 12:23:59 +08:00
Cosimo Cecchi
03fdaca187 color-swatch: set/unset prelight state flag on enter/leave events
Allows themes to set a different style on prelight.
2012-02-21 18:17:26 +01:00
Michael Natterer
f4b15a58db x11: s/_/-/ in signal name "window-manager-changed" 2012-02-21 17:32:37 +01:00
Michael Natterer
427b88f541 GdkScreen: fix precondition checks in the public API
Move g_return_if_fail() stuff from the backends to the public
functions in gdkscreen.c itself, and some fixes for ugly formatting in
the various gdkscreen-backend.c files.
2012-02-21 17:19:35 +01:00
Cosimo Cecchi
8317fed2b9 Revert "Remove the broken test for now"
Passes correctly again now.

This reverts commit addff95c97.
2012-02-21 12:25:06 +01:00
Cosimo Cecchi
c35f1d3f9a Revert "Disable broken entry progress test"
Passes correctly again now.

This reverts commit 39e51072b4.
2012-02-21 12:14:50 +01:00
Cosimo Cecchi
925c800e5d entry: fix progressbar area size for interior-focus = FALSE
No need to subtract focus line width again, since the progressbar is
rendered starting at (0, 0).
This also fixes the entry-progressbar-coloring reftest.
2012-02-21 12:14:50 +01:00
Fran Diéguez
49674d92f9 Updated Galician translations 2012-02-21 12:08:13 +01:00
Sebastian Keller
ab2e9d9c93 Bug 650693 - Drawing errors in column headers when adding new columns
Reset style on visible headers, not on invisible ones
2012-02-21 11:46:47 +01:00
Chun-wei Fan
476b320759 Update Visual C++ property sheets
The file "installation" part needed a long-overdue update, especially
as some headers were simply moved into gtk/deprecated and some new headers
were introduced, and a new .gschema.xml file needed to be processed.
2012-02-21 18:03:51 +08:00
Matthias Clasen
ca05315c8a Bump version 2012-02-21 10:45:07 +01:00
Matthias Clasen
addff95c97 Remove the broken test for now
It can come back after it has been repaired.
3.3.16
2012-02-21 10:00:26 +01:00
Мирослав Николић
7c1ea66bc1 Updated Serbian translation 2012-02-21 08:38:29 +01:00
Мирослав Николић
877f2eb986 Updated Serbian translation 2012-02-21 08:32:34 +01:00
Chun-wei Fan
2c94f67e04 Update config.h.win32(.in)
Make it more like the current config.h.in template.
2012-02-21 12:34:18 +08:00
Chun-wei Fan
e180e85ab8 Update gtk3-demo Visual C++ projects
Make up for the missed source file application.c
2012-02-21 12:08:19 +08:00
Matthias Clasen
fbaa9b2211 Bump glib dep 2012-02-21 02:00:54 +01:00
Matthias Clasen
fe71b9494a More updates 2012-02-21 01:51:38 +01:00
Matthias Clasen
7fdc5e723e Update expected output 2012-02-21 01:50:20 +01:00
Matthias Clasen
074bb5d5db Updates 2012-02-21 01:50:19 +01:00
Matthias Clasen
39e51072b4 Disable broken entry progress test
Cosimo says this needs to be done differently.
2012-02-21 01:50:19 +01:00