Commit Graph

6066 Commits

Author SHA1 Message Date
Owen W. Taylor
ec911dc8b9 ClutterStage: Replace clutter_stage_set_paint_callback() with ::after-paint signal
clutter_stage_set_paint_callback() has the disadvantage that it only
works for a single caller, and subsequent callers will overwrite and
break previous callers. Replace it with an ::after-paint signal that is
emitted at the same point - after all painting for the stage is
completed but before the drawing is presented to the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=732342
2014-06-27 14:39:02 -04:00
Emmanuele Bassi
036c2b3764 gesture-action: Use event type getter
Don't use direct struct access.
2014-06-25 16:58:18 +01:00
Carlos Garnacho
02590f08ac gesture-action: Ignore any other event than press/update/release ones
CLUTTER_ENTER/LEAVE might be processed too, leading to accounting of the
NULL sequence (ie. pointer) in the gesture, and fooling the gesture with
a static extra point that wouldn't go away.

https://bugzilla.gnome.org/show_bug.cgi?id=732235
2014-06-25 16:55:41 +01:00
Carlos Garnacho
4c4e72a9dc x11: Set the input device stage on XI_TouchBegin, if not already set
Until now, touch events sort of rely on XI_Enter/XI_Leave events accompanying
the pointer emulating touch in order to have a stage set on the device, These
events won't happen though if it's not a pointer emulating touch which happens
on the stage, causing touch events to be ignored.

Fix this by ensuring that the input device has a stage on XI_TouchBegin itself,
but only if it's not already set, so we don't possibly steal touch events to
an already interacting stage.

https://bugzilla.gnome.org/show_bug.cgi?id=732234
2014-06-25 16:55:16 +01:00
Carlos Garnacho
42f6828c9c input-device: Do not unset the device stage after the last touch is lifted
On X11 the pointer will follow a "pointer emulating" touch sequence, so the
pointer will be effectively left inside the stage after that touch is lifted,
even though the master device stage is unset. This makes pointer events get
ignored until the pointer leaves and enters again the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=732234
2014-06-25 16:55:16 +01:00
Emmanuele Bassi
8d89294ef6 drop-action: Use the right state for events
The 'state' field should be used for pointer events without button
information. Pointer events that have button information should use
the 'button' field.

https://bugzilla.gnome.org/show_bug.cgi?id=732143
2014-06-25 15:16:30 +01:00
Emmanuele Bassi
ac26dbbbe9 evdev: Update after libinput API changes 2014-06-25 12:21:39 +01:00
Jasper St. Pierre
4cdcbcb2b1 evdev: Add clutter_evdev_warp_pointer
https://bugzilla.gnome.org/show_bug.cgi?id=731536
2014-06-11 17:21:15 -04:00
Jonas Ådahl
31749cfa47 evdev: Follow libinput enum rename
s/libinput_pointer_button_state/libinput_button_state/
s/LIBINPUT_POINTER_BUTTON_STATE_/LIBINPUT_BUTTON_STATE_/

https://bugzilla.gnome.org/show_bug.cgi?id=731254
2014-06-10 11:17:25 +01:00
Jonas Ådahl
61929e26e1 evdev: Used floating point instead of fixed point numbers
Following the API change in libinput, change the uses of fixed point
numbers to floating point numbers.

https://bugzilla.gnome.org/show_bug.cgi?id=731178
2014-06-10 10:39:42 +01:00
Gustavo Noronha Silva
fcdd222c61 device-manager-xi2: use allocation for clamping
The coordinates translated by the XI2 device manager were being clamped using
the X window size kept by StageX11. However, when the stage is fullscreen,
that size is not updated to the screen size, but kept the same in order to
allow going back to it when the stage goes out of fullscreen.

https://bugzilla.gnome.org/show_bug.cgi?id=731268
2014-06-05 15:03:10 -03:00
Jonas Ådahl
7ed92c845f Fix scaling of pointer axis vectors
The vector of libinput and Wayland pointer axis events are in pointer
motion coordinate space. To convert to clutter's internal representation
the vectors need to be scaled to Xi2 scroll steps.

https://bugzilla.gnome.org/show_bug.cgi?id=723560
2014-05-28 10:20:13 +01:00
Jonas Ådahl
3da27a4f08 wayland: Fix coding style issues
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=723560
2014-05-28 10:20:13 +01:00
Carlos Garnacho
ed538a6d2c stage: Only compress consecutive touch events from the same sequence
And get CLUTTER_EVENT_LEAVE out of the touch event compression logic, as
touches are always implicitly grabbed. If no sequence check is done, only
the last touch update would be emitted, even if multiple sequences got
updated.

https://bugzilla.gnome.org/show_bug.cgi?id=730577
2014-05-22 13:44:53 +02:00
Carlos Garnacho
fd8705b9c6 gesture-action: Fix typo in clutter_gesture_action_get_threshold_trigger_egde()
Let's cross fingers and hope nobody notices. If this went unnoticed so far, likely
means this function has never been used. If any complain is raised about this, a
stub function should be added (and marked deprecated).
2014-05-21 15:15:01 +02:00
Carlos Garnacho
9510d6ac95 evdev: Add clutter_evdev_event_sequence_get_slot()
This function helps know the libinput slot used by a sequence.

https://bugzilla.gnome.org/show_bug.cgi?id=728968
2014-05-21 14:09:33 +02:00
Carlos Garnacho
50b3d7cd9b evdev: Manage LIBINPUT_EVENT_TOUCH_* events
Those are translated into CLUTTER_TOUCH_* ClutterEvents. As the
"NULL" ClutterEventSequence is special cased, the slot=0 value is
avoided.

Frame events are ignored, as there is no Clutter equivalence, and
Cancel events are sent to all current individual touches.

https://bugzilla.gnome.org/show_bug.cgi?id=728968
2014-05-21 14:09:33 +02:00
Carlos Garnacho
76d48f79d6 evdev: Set core device on translated events
And ensure the core pointer shares the same stage than the slave
device when those events are set. This fixes problems on the evdev
backend where the last touch unsets the stage on the device, but
nothing sets it back afterwards.

https://bugzilla.gnome.org/show_bug.cgi?id=728968
2014-05-21 14:09:33 +02:00
Carlos Garnacho
8857b19d49 evdev: Add function to get the libinput_device from a ClutterInputDevice
This may be useful for deeper libinput integration that's not in the scope
of Clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=728967
2014-05-21 14:09:22 +02:00
Carlos Garnacho
91ee1ceca4 evdev: Add evdev specific event filter function
This function can be used to intercept or translate events
that are unmanaged by clutter itself.

https://bugzilla.gnome.org/show_bug.cgi?id=728967
2014-05-21 14:09:22 +02:00
Jasper St. Pierre
b66fec0450 egl: Add a way to pause the ClutterMasterClock
When VT switched away, we need to pause the ClutterMasterClock,
stop processing events, and stop trying to flip.

https://bugzilla.gnome.org/show_bug.cgi?id=730215
2014-05-19 15:48:39 -04:00
Jasper St. Pierre
32af6a3ef4 evdev: Fix a compile warning
device_type_str is only used inside a CLUTTER_NOTE, which evaluate
to nothing when CLUTTER_ENABLE_DEBUG is off.
2014-05-19 15:47:57 -04:00
Emmanuele Bassi
d708c30765 Provide 1.20 version macros 2014-05-19 17:55:52 +01:00
Gustavo Noronha Silva
bf5fe70e23 clutter-canvas: cache the texture to avoid uploads
When an actor carrying canvas content is repainted, it will currently reupload
the data from the buffer to a texture. While this is not a performance problem
on a desktop, some mobile environments take a big performance hit. This
change tracks data changes and only recreates the texture if necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=729144
2014-05-01 11:48:51 -03:00
Emmanuele Bassi
0255b5a133 docs: Add an explicit example of image loading
Using GdkPixbuf, which is what we expect people to use anyway.
2014-04-26 20:50:43 +01:00
Emmanuele Bassi
10ff9a4679 docs: Fix the ClutterImage example URL 2014-04-26 20:50:29 +01:00
Gustavo Noronha Silva
d7b183a4e3 clutter-main: start mainloop timer on clutter_init()
By creating and starting the timer on clutter_main() an assumption is made
that that is how the main loop will be run for all clutter applications.
With more and more applications moving to GApplication, this assumption no
longer holds true.

Moving to clutter_init() means we are starting the timer earlier than we
should, and by not stopping it when the main loop quits we are taking a
measure that is later than we should. I believe it is safe to consider
those are close enough to the actual beginning and quitting of the main
loop in practice.

https://bugzilla.gnome.org/show_bug.cgi?id=728521
2014-04-18 19:05:37 -03:00
Emmanuele Bassi
ef2a94de93 master-clock: Clean up the over-budget diagnostic
Use the difference between the elapsed time and the available budget, so
that the message can be read more easily.
2014-04-14 22:24:47 +01:00
Adel Gadllah
3517c11c9b stage-cogl: Don't mess with the damage_history list when buffer_age is not available 2014-04-10 21:30:15 +02:00
Emmanuele Bassi
f9d99d1c4e test-utils: Skip tests if no DISPLAY is set
Instead of just bailing out when initializing the test suite, we can do
a much better job and skip all the tests. This means that the TAP driver
will work correctly instead of dying a horrible death, and we get a nice
report with a proper cause of the test skipping.
2014-04-02 19:25:55 +01:00
Emmanuele Bassi
f065a34e46 Remove clutter.symbols
The Visual Studio build files have been updated to not use it, so we can
remove it from the repository.
2014-04-02 18:48:59 +01:00
Emilio Pozuelo Monfort
363c0d2f7a wayland: Add missing CLUTTER_AVAILABLE annotations
Signed-off-by: Emilio Pozuelo Monfort <pochu27@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=727020
2014-03-25 14:05:46 +01:00
David Warman
5d53620bb9 stage: re-implement minimal paint() method to respect Z order
Without a paint() implementation in clutter-stage, the function
from clutter-group is used.  That class has its own child list,
but attempts to use sort_depth_order, which is empty in this case.

This provides a partial fix by replacing a minimal paint(), see:

https://bugzilla.gnome.org/show_bug.cgi?id=711645
2014-03-20 17:26:37 +00:00
Chun-wei Fan
2b3fac8b3d clutter-version.h.in: Refine how CLUTTER_VAR is Defined
Define CLUTTER_VAR like how it is done on GLib, so that the version
constants can be exported and imported appropriately on different
compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=726762
2014-03-21 00:33:10 +08:00
Chun-wei Fan
4c204a4f3e clutter-event-win32.c: Avoid a Crash
Commit e70a0109 simplified the dispatching of events by passing the event's
owernership to ClutterStage, but it may be so that any.stage is NULL at
some point on Windows, which will either cause _clutter_stage_queue_event()
to crash or issue a critical warning.  Avoid this problem by checking
whether event->any.stage is not NULL before trying to call
_clutter_stage_queue_event().

https://bugzilla.gnome.org/show_bug.cgi?id=726765
2014-03-20 22:37:17 +08:00
Chun-wei Fan
891d3fce00 Fix on Last Commit of config.h.win32.in
Missed a /* before an #undef line, causing build warnings, oops, sorry.
2014-03-20 09:30:17 +08:00
Chun-wei Fan
44d688cdfb Update config.h.win32.in Further
...so that its entries will reflect the entries that are checked by the
autotools builds on config.h.in.  Also take into consideration for MinGW
builds and for newer Visual Studio versions, such as the availability for
inttypes.h.  Update the layout of the file cosmetic-wise as well.
2014-03-20 09:18:57 +08:00
Chun-wei Fan
783bc64a02 Visual Studio Builds: Don't Generate a .def File
Clutter, like GTK+ and GLib, has recently switched to a visibility-based
method of exporting symbols, so update the Visual Studio build files to
do likewise, by using __declspec (dllexport). This eliminats the need to
use a .def file to export the symbols.  The pre-configured
config.h.win32.in is also updated accordingly for this purpose.  The
clutter.symbols file can be dropped if it is not being used otherwise.
2014-03-20 08:57:06 +08:00
Emmanuele Bassi
4f5dd5ad43 docs: Remove last stray DocBook tags 2014-03-18 14:15:01 +00:00
Emmanuele Bassi
ddc1955f6b docs: Port backend-specific sections to markdown 2014-03-17 23:10:07 +00:00
Emmanuele Bassi
46051bfb20 docs: Port deprecated sections to markdown syntax
And drop docbook tags along the way.
2014-03-17 23:09:27 +00:00
Emmanuele Bassi
12370bd4f8 docs: Move to markdown
We're removing docbook tags in favour of the markdown syntax.
2014-03-17 23:07:58 +00:00
Emmanuele Bassi
115104db8c cally: Remove docbook tags 2014-03-17 23:05:09 +00:00
Emmanuele Bassi
8fc47244b0 build: Remove abicheck.sh
We now control the visibility of symbols directly from the header files,
so we always have the correct ABI.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
386be83f24 New visibility handling in Clutter
Instead of listing every public symbol inside an ancillary file, we can
use compiler annotations. This scheme is also used by GLib and GTK+.

The symbols file is left in tree until the Visual Studio rules are
fixed, but it's not used any more during distcheck.

I double-checked that the exposed ABI is the same before and after this
change, except for symbols that were never meant to be public in the
first place, and that escaped our attention when we generated the first
version of the symbols file.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
5c4c2aa52f symbols: Fix the expected ABI
Some symbols that were never meant to be exported ended up in the
symbols file.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
3b21999494 Use _CLUTTER_EXTERN to define CLUTTER_VAR
The macro is defined outside of the header, and does all the heavy
lifting of getting the proper attributes.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
c44f73a7f1 Include "config.h"
Otherwise the symbol annotation won't be expanded correctly.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
53a86e91d9 Annotate symbols in backend-specific headers
Like we did for the rest of the API.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
66826bc6ba Annotate symbol visibility in Cally
Like we did for the main library.
2014-03-17 19:26:27 +00:00