1
0
Fork 0
Commit graph

6493 commits

Author SHA1 Message Date
Jonas Ådahl
fef81cd628 clutter/stage: Fix capturing scaled views
Make clutter_stage_capture() work if views are scaled. This needs
adaptations on the using side to deal with the cairo surface device
scale that is used to communicate the scale used when capturing.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
c2e49f1bb5 clutter: Change stage view scale to be float
To support fractional scaling, change the stage view scale to be a
float instead of an int. Also change the places where it is retrieved
and used when scaling things.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
a3d63d0ac0 clutter/stage-view: Add G_PARAM_CONSTRUCT flag to properties
Otherwise those properties won't be set when ->construct is called.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
88cae8bd3d settings: Manage our own font DPI
Previously gnome-shell listened on the Xft Xsettings via GTK+s
GtkSettings to get the font DPI setting. The Xsetting might not
be what we want, and we should not rely on Xsettings when we don't need
to, so lets manage it ourself.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Carlos Garnacho
56c468a2ef clutter/x11: Set master device on pad button events
These should be set one, but just set the master to be the slave
pad device. We are passively grabbing the pad device, so this is
consistent with active grabs on slave devices. Besides, pads are
paired to the VCP, which is not really truthful.

Fixes inoffensive warnings when trying to check whether motion
throttling applies for these events.

https://bugzilla.gnome.org/show_bug.cgi?id=784881
2017-07-13 19:05:44 +02:00
Carlos Garnacho
328e3f8f4f clutter: Extend mapping-mode to pen/eraser devices
This just used to apply to CLUTTER_TABLET_DEVICE on wayland, allow using
it on pen/eraser devices (as X11 sees tablets) for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=784402
2017-07-12 23:43:23 +02:00
Emmanuele Bassi
41e22ab592 Use newer glib-genmarshal option
When building against a glib-genmarshal from GLib 2.54 we can use the
`--prototypes` command line argument to generate the prototypes for the
marshallers in the C source, and avoid a missing-prototypes compiler
warning.
2017-07-11 11:30:08 +01:00
Carlos Garnacho
a70ae50ca9 clutter: Do not throttle motion events on tablet tools
Events from tablets must not be filtered out, as the event coalescing
results in precision loss.

https://bugzilla.gnome.org/show_bug.cgi?id=783535
2017-07-03 13:56:21 +02:00
Tim Lunn
dd82f4afcd configure: require glib 2.53.2
This is required for the new glib-genmarshal as introduced in
 commit 9131f26cae

https://bugzilla.gnome.org/show_bug.cgi?id=783161
2017-05-28 11:21:42 +10:00
Florian Müllner
dd451547a5 tests: Fix actor-anchors test
Since commit 5cb5baa7d4, we skip transitions when updating an
actor's scale/position to the existing value. As a result, we
don't get change notification on those properties either - given
that the properties did not actually change, that behavior seems
fine, so just modify the test to not expect a notify signal for
unchanged properties.
2017-05-24 21:04:07 +02:00
Carlos Garnacho
4b23eb064c clutter: Update pointer position on master clock's update stage
Ensure the pointer position is up-to-date for the pointers inside
the clip area after the stage got actors relayout.

https://bugzilla.gnome.org/show_bug.cgi?id=755164
2017-05-23 16:37:53 +02:00
Carlos Garnacho
5cb5baa7d4 ClutterActor: Optimize away idempotent scale/position updates
If the actor results in the same scale/position, there's no need to
trigger a transition.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:27:11 +02:00
Carlos Garnacho
d620189ae3 ClutterActor: Call queue_redraw vfunc directly if possible
Reduces some signal emission overhead.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:27:11 +02:00
Emmanuele Bassi
4b4c2b1afa ClutterActor: Avoid frequent signal emission if possible
Avoid signal emission for ::paint/::pick if no handlers are connected,
which is the most frequent case.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:27:11 +02:00
Carlos Garnacho
3887d25dbc ClutterStage: Use non-generic marshaller for ::presented signal
This signal runs often, so it's better to use a direct marshaler.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-09 11:53:27 +02:00
Nigel Taylor
d3362a6f05 clutter: conform/actor-graph: Add missing null-termination
https://bugzilla.gnome.org/show_bug.cgi?id=759085
2017-05-05 09:53:51 -04:00
Florian Müllner
9cf8aa4584 cally: Fix compilation without X11 backend
Commit 0fd9e38175 fixed setting the out parameter for the x coordinate
when using the X11 backend, but broke compilation when the backend is
not available ...
Really fix the issue by running the X11-specific code when the X11
backend is available and in use, and display the one-time warning
otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=781902
2017-05-02 14:29:59 +02:00
Emmanuele Bassi
c76eedd794 Typo fix: missing '\'
Without the backslash, the build breaks.
2017-04-30 15:05:52 +01:00
Emmanuele Bassi
9131f26cae Generate marshallers without including the generated header
GLib now generates the prototypes for the generated marshallers, so it's
not necessary to include the header any more.

This fixes a build failure in GNOME Continuous with GLib master, caused
by -Werror=redundant-decls.
2017-04-30 14:56:29 +01:00
Florian Müllner
0fd9e38175 cally: Fix translation to screen coordinates
Due to an accidental swap of an else statement and a preprocessor #else,
the output x coordinate is currently only set when not using the X11
windowing system, whoops.

https://bugzilla.gnome.org/show_bug.cgi?id=781902
2017-04-28 17:20:36 +02:00
Mario Sanchez Prada
813de50eba Declare clutter version constants as extern
These constants got the CLUTTER_VAR annotations removed when making
it a private library, so the extern modifier needs to be explicitly added.
2017-04-13 13:08:22 +01:00
Florian Müllner
47a01013b1 clutter-color: Shut up a compiler warning 2017-04-07 23:19:22 +02:00
Jonas Ådahl
20fcb88632 clutter: Remove window scaling feature
Window scaling is a clutter feature used to enable automatic scaling of
stage windows when running under as an application in windowing system.
Clutter in mutter does not support running as a stand-alone application
toolkit, so lets remove this unused feature.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-04-07 22:30:50 +08:00
Jonas Ådahl
63450d69d3 clutter: Add ability to scale stage views
This commit adds the ability to set a scale on a scale view. This will
cause the content in the stage view to be painted with the given scale,
while still keeping the configured layout on the stage. In effect, for
a stage view with scale 'n', this means the framebuffer of a given stage
will 'n' times larger, keeping the same size on the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-04-07 22:30:48 +08:00
Jonas Ådahl
df45c50d0b clutter: Also filter relative tablet tool motions
Pass the relative motion from tablet tools through the same filter
mechanism as used for the relative pointer motions.

https://bugzilla.gnome.org/show_bug.cgi?id=778119
2017-03-27 12:57:56 +02:00
Jonas Ådahl
8f691c28f3 clutter: Add API for filtering relative motion events
Add an API that allows the owner of the clutter context to alter the
relative motion events (so far relative pointer events).

https://bugzilla.gnome.org/show_bug.cgi?id=778119
2017-03-27 12:57:56 +02:00
Armin Krezović
a77da353f3 input-settings: Set double click timeout from gsettings
Clutter's evdev input backend has no support for setting double
click timeout set by gnome-settings-daemon. This results in
touchpad click events timing out on wayland, because the
default timeout value wasn't enough.

This patch moves timeout setting to mutter and removes X11
backend specific setting from clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=771576
2017-03-24 20:47:00 +01:00
Carlos Garnacho
e081bb3921 clutter: Add clutter_input_device_is_grouped call/vfunc
This will be used to query grouped devices (eg. tablets and pads)

https://bugzilla.gnome.org/show_bug.cgi?id=779986
2017-03-13 19:34:10 +01:00
Jonas Ådahl
c5dc0f4a2e clutter/stage-view: Add getter for getting the offscreen blit transform
This will be used to invert the transform in the nested mode, making it
possible to test offscreen texture based transform using the nested
backend.

https://bugzilla.gnome.org/show_bug.cgi?id=779745
2017-03-09 10:17:30 +08:00
Rui Matos
542ed1d024 clutter-clone: Unset source when source actor is destroyed
Otherwise we might be holding on to a source actor that's no longer
fully functioning and cause crashes if for example we try to paint it.

https://bugzilla.gnome.org/show_bug.cgi?id=779483
2017-03-06 14:00:48 +01:00
Carlos Garnacho
46d516cb04 clutter: Force scale=1 in tests/conform
Device pixel sizes are compared in several places, which breaks
some tests on hidpi setups.
2017-02-17 17:01:57 +01:00
Jonas Ådahl
4ebc55f2b3 Make libmutter and friends parallel installable
In order to minimize the amount of breakage, while at the same time
making it easier to make backward incompatible changes needed to
continue turning libmutter into a capable Wayland compositor, make the
libmutter and friends (libmutter-clutter, libmutter-cogl*) parallel
installable by adding a version number to the name. This changes
various filenames, for example what previously was libmutter.so is now
libmutter-0.so (assuming the version for now is 0), and
libmutter-clutter-1.0.so is now libmutter-clutter-0.so. The pkg-config
filenames and GObject introspection has been renamed to reflect this as
well.

This enables a downstream compositor rely on a specific version of the
libmutter API, while gracefully handling API/ABI changes by having to
update to the new version at their own pace.

https://bugzilla.gnome.org/show_bug.cgi?id=777317
2017-02-14 11:16:45 +08:00
Carlos Garnacho
d6fc41b73e clutter: Add function to find out the number of modes for a pad group
This is obtained in backend-dependent ways in the upper layers, seems
better to let ClutterInputDevice provide this information.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
9d38ffa6e3 clutter: Add functions to find out mode switch buttons, and their group
This is done in the upper layers through backend-dependent ways, seems
better to let ClutterInputDevice provide this information.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
8bcdf9ba61 clutter: Add current group mode on pad events
This info can be obtained here right away, so we don't need
backend-dependent paths in the upper layers.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
1ff9bbd59c clutter/evdev: Add ClutterInputDeviceEvdev::output-aspect-ratio
When != 0, this property will express the W:H ratio of the desired
output area (be it one monitor or the span of all monitors). At
the time of translating coordinates, coordinates will be skewed so
that the input area of the tablet is a rectangle of the given ratio.

Events happening in the input areas that fall outside the output
aspect ratio will be clamped to the nearest coordinate in the rect.

If the ratio is 0, the whole input area of the tablet will be used
and no coordinate skewing will happen.

https://bugzilla.gnome.org/show_bug.cgi?id=774115
2017-02-10 16:31:50 +01:00
Carlos Garnacho
cc838ead8b clutter/evdev: Add ClutterInputDeviceEvdev::device-matrix property
And transform absolute events using this matrix. This property is
akin to the "Coordinate Transformation Matrix" property in X11,
and will be used to map tablets/touchscreens to outputs, favoured
over the libinput matrix which is meant for calibration.

https://bugzilla.gnome.org/show_bug.cgi?id=774115
2017-02-10 16:31:50 +01:00
Carlos Garnacho
9c79a1631d backends: Pass seat ID to evdev ClutterDeviceManager
Clutter assumed seat0 which is most usually, but not always correct.
Add an evdev-backend specific function to allow passing the seat
that will be used for ClutterDeviceManager construction, which we
already obtain in MetaLauncher.

https://bugzilla.gnome.org/show_bug.cgi?id=778092
2017-02-02 23:39:02 +01:00
Rui Matos
1597b357a1 clutter/evdev: Dispatch libinput before generating key repeat events
Since both the libinput event source and the key repeat timer have the
same priority, the order in which both handlers are called is
arbitrary if both sources are ready on the same poll return. This
means that sometimes we generate key repeats when there's already a
real key event queued on libinput that would cancel the repeat timer
if only it was processed before.

One solution would be lowering the repeat timer source priority a
notch lower than the libinput source but that would mean that a steady
stream of events from libinput (e.g. pointer device motion) would
prevent any key repeats to happen.

Instead, we can fix this problem by trying to dispatch libinput from
the key repeat timer and checking if the timer source has been
destroyed before generating more key repeats.

https://bugzilla.gnome.org/show_bug.cgi?id=774989
2017-01-25 13:07:48 +01:00
Rui Matos
73524cadd4 clutter/evdev: Avoid losing key repeat timestamp resolution
Commit 9214d5029c changed the notify*
API to use microseconds and we already have a microsecond time source
here so we can use the timestamp directly without losing resolution at
this layer.

https://bugzilla.gnome.org/show_bug.cgi?id=774989
2017-01-25 13:07:43 +01:00
Florian Müllner
e8380d11c4 build: Fix cogl include paths of tests
Those were missed by commit 0aa6d9782c ...
2016-11-23 23:12:55 +01:00
Florian Müllner
0aa6d9782c build: Fix cogl include paths
cogl-egl-defines.h is now referenced from a public header, so we need
to include its location whenever the header is used (directly or via
cogl.h).
2016-11-23 18:03:59 +01:00
Jonas Ådahl
c2e72823fc clutter: Fix a couple introspection warnings
This includes not introspecting ClutterStageView things at all for now,
as they are only used by C code.

https://bugzilla.gnome.org/show_bug.cgi?id=774827
2016-11-23 21:59:16 +08:00
Carlos Garnacho
af920851ca clutter: Fix build
Typo in get_type() function, can only be classified as post-c&p brain fart.
2016-11-07 14:24:36 +01:00
Carlos Garnacho
ea4dbdd66f clutter/x11: Implement ClutterInputDeviceTool
This is implemented using Wacom-driver specific properties at
the moment, until libinput becomes the fallback driver handling
tablet and pad management.

Whenever a tool becomes in proximity, a new ClutterInputDeviceToolXI2
will be created (if it wasn't created previously) for the given
serial number. This tool will be set in all events send from the
device.

https://bugzilla.gnome.org/show_bug.cgi?id=773779
2016-11-04 21:25:31 +01:00
Carlos Garnacho
b252771a8f clutter/evdev: Take over stylus configuration
Stylus configuration (stylus buttons, pressure) was handled
at the very high level, doing the button and pressure translations
right before sending these to wayland clients.

However, it makes more sense to store these settings into the
ClutterInputDeviceTool itself, and have clutter apply the config
at the lower level so 1) the settings actually apply desktop-wide,
not just in clients and 2) X11 and wayland may share similar
configuration paths. The settings are now just applied whenever
the tool enters proximity, in reaction to
ClutterDeviceManager::tool-changed.

This commit moves all handling of these two settings to
the clutter level, and removes the wayland-specific paths

https://bugzilla.gnome.org/show_bug.cgi?id=773779
2016-11-04 21:25:31 +01:00
Carlos Garnacho
75c3f0ffba clutter/evdev: Emit ClutterDeviceManager::tool-changed
We do so whenever a tool enters or leaves proximity. We now also
ensure that last_tool is NULL after it leaves proximity, although
the CLUTTER_PROXIMITY_OUT event itself should still contain tool
information.

https://bugzilla.gnome.org/show_bug.cgi?id=773779
2016-11-04 21:25:31 +01:00
Carlos Garnacho
bd83873a7f clutter: Add ClutterDeviceManager::tool-changed signal
This signal will notify whenever a device changed tool.

https://bugzilla.gnome.org/show_bug.cgi?id=773779
2016-11-04 21:25:31 +01:00
Carlos Garnacho
9abf6892c4 clutter/x11: Add minimal support for pad devices
We most notably handle button events (acquired through a passive grab on
all device buttons) which are translated to CLUTTER_PAD_BUTTON* events,
so there is generic handling of pad actions on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=773779
2016-11-04 21:25:31 +01:00
Carlos Garnacho
674a48335d clutter/x11: Implement XTest-based ClutterVirtualInputDevice
This will be used too on X11 in order to implement the button-to-keycombo
mapping in pad devices.

https://bugzilla.gnome.org/show_bug.cgi?id=773779
2016-11-04 21:25:31 +01:00