1
0
Fork 0
Commit graph

6598 commits

Author SHA1 Message Date
Jonas Ådahl
a1517cae1c clutter/device-manager: Add way to check virtual device support
This is needed so that mutter can let applications using the remote
desktop API to know whether touch screens are supported.
2018-02-23 19:33:31 +08:00
Jonas Ådahl
542502be53 clutter/x11: Add pointer motion support to virtual devices
As the other virtual input event delivery mechanisms, this also uses
the XTEST protocol.
2018-02-23 19:33:31 +08:00
Jonas Ådahl
203a0b37ed clutter: Add smooth scroll and touch API to virtual devices
So far only implemented on the evdev backend,as X11 doesn't support touch
devices nor smooth scrolling via XTEST.
2018-02-23 19:33:31 +08:00
Jonas Ådahl
b6477a826d clutter/evdev: Don't treat device touch slots as seat slots
IF two touch devices have colliding touch point IDs they'd interfere on
the seat. To avoid this, always allocate a seat wide slot for each
device wide slot, but don't use device slots directly in the seat.
2018-02-23 19:33:31 +08:00
Jonas Ådahl
95adc45b71 clutter/evdev: Move touch notification to seat 2018-02-23 19:24:07 +08:00
Jonas Ådahl
f20daf567d clutter: Silence gtk-doc warning 2018-02-23 19:24:07 +08:00
Carlos Garnacho
bcd5882081 clutter: Check the ClutterTextInputFocus has focus before filtering events
Checking correct state is responsibility of the ClutterInputFocus user, and
it is indeed possible to get a focused ClutterText while its
ClutterInputFocus didn't get itself focused (eg. lack of IM).

https://gitlab.gnome.org/GNOME/mutter/issues/36

Closes: #36
2018-02-18 15:22:13 +01:00
Carlos Garnacho
37aab9280a clutter/text: Be more pervasive at updating input method state
More concretely, ensure preedit text goes away after commit/focus_out,
and update cursor position right after focus_in.
2018-02-12 14:44:30 +01:00
Jonas Ådahl
61bc1a7d6f clutter/x11: Remove video memory purge API
Clutter doesn't handle it anyway, and mutter now creates the
CoglRenderer object itself so we don't need this API anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2018-02-07 11:04:51 +08:00
Jason Gerecke
91df801ffb clutter/evdev: Add support for BTN_STYLUS3
BTN_STYLUS3 is defined by the Linux 4.15 kernel and is sent when the
third button on a stylus is pressed. At the moment, only Wacom's "Pro
Pen 3D" has three stylus buttons. Pressing this button triggers a button
8 event to be sent under X11, so we use the same mapping here.

https://bugzilla.gnome.org/show_bug.cgi?id=790033
2018-01-30 19:28:02 +01:00
Ray Strode
58bb61e161 clutter/stage: Set framebuffer state directly
clutter_set_viewport always operates on the draw fb, but
mutter sometimes has an offscreen fb it uses instead.

This commit uses the non-deprecated, clutter_framebuffer_set_viewport
function, which takes an explicit fb argument.

Closes: https://gitlab.gnome.org/GNOME/mutter/merge_requests/2
2018-01-25 11:41:54 +08:00
Carlos Garnacho
513c278077 clutter: Make ClutterText request toggling the input panel
So gnome-shell is able to show the OSK for it.
2018-01-18 16:20:45 +01:00
Carlos Garnacho
ac8ee9a08c clutter: Add clutter_text_has_preedit()
This function returns TRUE if there is any preedit going on. This method
will be useful in gnome-shell where similar checks are performed on
StIMText actors.
2018-01-18 16:20:45 +01:00
Carlos Garnacho
952c1fefa2 clutter: Add input-purpose/hint properties to ClutterText
So those properties can be changed or queried within shell UI.
2018-01-18 16:20:45 +01:00
Carlos Garnacho
3a914a915e clutter: Implement ClutterInputFocus subclass for ClutterText
This only applies when the actor is editable. This object will allow
editable ClutterText instances to interact with the input method.
2018-01-18 16:20:45 +01:00
Carlos Garnacho
aa6561a3b1 clutter: Add ClutterInputMethod and ClutterInputFocus
ClutterInputFocus is an abstract object to be subclassed by UI actors and
the wayland interface and represents the user of an input method. It
represents the current focus of the input method, so all emitted signals
and public API hooks are expected to be called when the input method is
currently interfacing with the input focus.

ClutterInputMethod is an abstract class (to be implemented in the upper
layers) that represents the input method itself. Besides focus management
itself, all public API calls that would be called by the subclasses are
delivered through the current input focus.
2018-01-18 15:35:29 +01:00
Carlos Garnacho
9eb9623288 clutter: Add ClutterBackend IM setter/getter
The input method will be global to Clutter and shared between all the
IM aware foci. These methods allow querying it and setting one up.
2018-01-18 15:33:12 +01:00
Carlos Garnacho
8c988aa632 clutter: Add special event flag for events that went through an IM
This will be useful to let Clutter know whether those should be or have
already been dispatched through an input method.
2018-01-18 15:33:12 +01:00
Carlos Garnacho
7346419295 clutter/evdev: Ensure a valid ClutterEventSequence on single-touch devices
Libinput shall report those as having slot=-1, which gets mistakenly
translated into the special "NULL" ClutterEventSequence. Making those
events get a non-NULL sequence will make single touch devices work.

https://bugzilla.gnome.org/show_bug.cgi?id=792005
2018-01-17 00:22:22 +01:00
Jonas Ådahl
4e3b26d2ed clutter/evdev: Ignore unknown touch points
We might receive touch events for unknown touch points, for example
when starting mutter while touching the screen (resulting in no
touch-down event ever being received). Avoid crashing when this happens
by just dropping these events on the floor.

https://bugzilla.gnome.org/show_bug.cgi?id=791371
2018-01-12 18:57:43 +08:00
Marco Trevisan (Treviño)
2b60fb0144 stage: Push framebuffer before setting up viewport
When capture_view* functions are called with the paint flag set
to TRUE, we need to setup the framebuffer, however this was
happening after setting up the viewport, while the viewport
needs the framebuffer to be valid when calling cogl_set_viewport.

https://bugzilla.gnome.org/show_bug.cgi?id=791809
2017-12-20 05:56:51 -05:00
Olivier Fourdan
7f5f5eb847 wayland/keyboard: preserve layout index
On VT switch, the xkb state layout index is lost and reset to the first
group, so if the first layout is not the last one being used, the xkb
state used in both meta-wayland-keyboard.c and clutter/evdev will be
desynchronized with the keyboard source indicator in the gnome-shell UI.

Save the effective layout chosen along with the seat so it can be
restored when reclaiming devices.

Use the saved layout index from the clutter/evdev's seat to restore the
layout in meta-wayland-keyboard, so that switching VT doesn't reset the
layout and causes further discrepancies with the layout indicator in the
gnome-shell UI.

https://bugzilla.gnome.org/show_bug.cgi?id=791383
2017-12-20 09:56:34 +01:00
Olivier Fourdan
03be6b687b clutter/x11: Configure XKB accessibility
Configure XKB accessibility features from the x11 and xi2 clutter input
device managers, offloading this feature from gnome-settings-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
32c22d375a clutter/x11: Add xkb accessibility helpers
Adds a set of convenient functions that can be shared between x11 input
device backends (namely core-x11 and xi2) to control XKB accessibility
features.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
bdf3f49a82 clutter/evdev: implement mouse keys support
Control the pointer using the numeric keypad.

When enabled, creates a virtual pointer and emulate the pointer event
based on keyboard events.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
356b4b0dc5 clutter/evdev: implement toggle keys support
Keeping Shift pressed for 8 seconds enables slow keys, pressing Shift 5
times in a row enables sticky keys.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
06d976e853 clutter/evdev: implement sticky keys support
One key press on a modifier latches it, two consecutive presses lock it.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
96ebd1c214 clutter/evdev: implement bounce keys support
Ignore multiple consecutive identical key presses within a time frame.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
fa28481736 clutter/evdev: implement slow keys support
Delay emitting clutter key press events when slow key is enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
76b064cffc clutter/evdev: Implement a11y configuration hooks
Apply the keyboard accessibility settings to the master keyboard.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
aa73504d95 clutter: add keyboard accessibility signals
Implementing keyboard accessibility in clutter means we need to be able
to notify higher layers of possible modifier masks or setting changes
(as some keyboard accessibility can be disabled or enabled by keyboard).

For this purpose, add two new signals:

   ClutterDeviceManager::kbd-a11y-mods-state-changed
   ClutterDeviceManager::kbd-a11y-flags-changed

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
32305b453d clutter: add hooks for kbd a11y configuration
Use a set of bitwise enum flags to set different keyboard accessibility
features and the necessary vfunc hooks in clutter input device so that
keyboard preferences can be passed to different input device
implementations.

The idea is to be able to configure either the clutter own
implementation of keyboard accessibility for evdev, or eventually
configure AccessX from the X11 clutter input device using the same
mechanism.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
7d5e08c843 clutter-main: Add hooks to plug kbd accessibility
On X11, when AccessX is enabled, all X11 clients benefit from the
AccessX features, including gnome-shell/mutter, meaning that special
keys like the overview or other shortcuts are also affected.

To achieve the same in Wayland, we need to implement the same features
in clutter main rather than the Wayland backend, so that all depending
code within the compositor but also Wayland clients (which rely on the
compositor to get keyboard events) similarly benefit from the
accessibility features.

Add hooks to the clutter main loop to be able to implement such
features.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Olivier Fourdan
2ffe597617 clutter/backend: Add bell-notify
We'll need a way to trigger a bell from within clutter for keyboard
accessibility features, add the necessary hooks to be able to call a
backend bell-notify method.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2017-11-16 14:14:31 +01:00
Carlos Garnacho
c86c5d6905 clutter: Plug evdev ClutterDeviceManager leaks
The unused ID GList element is leaked, and so is the node path.

https://bugzilla.gnome.org/show_bug.cgi?id=789984
2017-11-06 20:51:58 +01:00
Daniel van Vugt
a37956c95f eglnative: Use gnome-settings-daemon font settings
While the X11 backend gets its font settings from XSettings, the native
backend did not use any user font preferences till now. So all shell fonts
were rendered with grayscale un-hinted, which some people describe as
"blurry text in Wayland sessions".

Although it's somewhat confusing using the "xsettings" schema on eglnative,
this is consistent with what GTK does already for its Wayland backend. It
is also documented here:

https://wiki.gnome.org/Initiatives/Wayland/GTK%2B#XSettings
https://wiki.gnome.org/Initiatives/Wayland/gnome-settings-daemon#xsettings

No more blurry shell text in Wayland sessions.

https://bugzilla.gnome.org/show_bug.cgi?id=645433
2017-10-27 22:12:57 -05:00
Jeremy Bicha
5fa8f78434 Revert "tests: Fix actor-anchors test"
This reverts commit dd451547a5.

since we reverted commit 5cb5baa with commit 4d2647c
2017-10-21 18:58:37 -04:00
Michael Catanzaro
4d2647cdbc Revert "ClutterActor: Optimize away idempotent scale/position updates"
This reverts commit 5cb5baa7d4.

There's a cascade of regressions that needs to be sorted out before
relanding this:

https://bugzilla.gnome.org/show_bug.cgi?id=784314
2017-10-19 19:54:24 -05:00
Jeremy Soller
ea214fbe0f Remove unscaled-font-dpi setting from X11 backend
https://bugzilla.gnome.org/show_bug.cgi?id=788049
2017-09-25 22:01:11 +01:00
Jonas Ådahl
ba194bd19e clutter: Fix capture_into on non-origin view
The capture_into() function wrote out of bounds when capturing from a
non-origin view (not positioned at (0,0)). At the time of
implementation, this API was used to capture pixels across views into a
single data buffer, but the way it's used, and the way views may work
now, makes this impossible to do properly.

So remove the ability to capture into a pre-allocated buffer from
multiple views, and complain if the passed rectantgle overlapps with
multiple views. This removes the broken offset calculation all
together, fixing the bug motivating this change.

https://bugzilla.gnome.org/show_bug.cgi?id=787715
2017-09-20 18:27:57 +08:00
Carlos Garnacho
26cd031be8 clutter: Use the ClutterScrollFinishFlags when delivering scroll event
This got accidentally hardcoded to CLUTTER_SCROLL_FINISHED_NONE on commit
d3c559a917, which broke kinetic scrolling for touchpads on clients.
2017-09-14 15:39:58 +02:00
Jonas Ådahl
dd4ad4efc4 Revert "renderer-native: Destroy monitor framebuffers when suspending"
The reverted commit seems to cause
https://bugzilla.gnome.org/show_bug.cgi?id=787240 for some reason. Lets
be safe and revert it for now, as the code freeze is just around the
corner.

This partly (it doesn't reintroduce a whitespace issue) reverts commit
dbc63430d8.
2017-09-04 22:37:16 +08:00
Jonas Ådahl
12710dc644 clutter/stage: Add capture_into API
Add API similar to clutter_stage_capture() but that draws into
externally allocated memory. It is assumed that the pixel format is
ARGB32, and the memory is structured in a way that the width of the
passed rectangle is identical to the stride divided by 4.

https://bugzilla.gnome.org/show_bug.cgi?id=784199
2017-08-29 11:49:01 +08:00
Jonas Ådahl
a10ad577a7 ClutterVirtualInputDevice: Add discrete scrolling
Add emitting of discrete scrolling events (such as mouse scroll
wheel-like events).

https://bugzilla.gnome.org/show_bug.cgi?id=784199
2017-08-29 11:49:01 +08:00
Jonas Ådahl
d3c559a917 clutter/evdev: Move scroll notification to ClutterSeatEvdev
This refactors the scroll event emitting code, moving it behind a
clutter_seat_evdev_ helper.

https://bugzilla.gnome.org/show_bug.cgi?id=784199
2017-08-29 11:49:01 +08:00
Jonas Ådahl
1e7628a3ef ClutterVirtualInputDevice: Allow passing CLUTTER_CURRENT_TIME
If CLUTTER_CURRENT_TIME is passed, let the backend find an appropriate
time stamp representing the current time in the clock that is used by
that backend.

https://bugzilla.gnome.org/show_bug.cgi?id=784199
2017-08-29 11:49:01 +08:00
Jonas Ådahl
5685449e15 clutter/evdev: Add API to get current layout index
We set the layout index when changing keyboard layout, but have no way
to get it back would so be needed. Add that.

https://bugzilla.gnome.org/show_bug.cgi?id=786408
2017-08-21 21:19:18 +08:00
Jonas Ådahl
dbc63430d8 renderer-native: Destroy monitor framebuffers when suspending
When suspending (i.e. VT switching away, the GDM gnome-shell instance
gets hidden, or changing user), destroy the onscreen and offscreen
monitor framebuffers. When resuming, the stage views and framebuffers
will be recreated anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=786299
2017-08-16 13:17:43 +08:00
Carlos Garnacho
c9937faf1e clutter: Fix build with --enable-debug
Message was poking stage_x11, which doesn't exist in this context.
Just print the Window that is receiving the event, the event will be
emitted into the only existing stage anyway.
2017-08-12 11:55:19 +02:00
Jason Gerecke
4d8cb5408b wayland: Provide basic tablet wheel event support
Adds basic support for the "wheel" event from the Wayland tablet protocol.
Ideally we would accumulate the angle and report a wheel event with an
appropriate value for "clicks". We can get away with a much cruder method
for the time being, however, since no Wacom tablet puck actually provides
a smooth scrollwheel. Checking whether the angle in CLUTTER_INPUT_AXIS_WHEEL
exceeds a nominally-small threshold is sufficient to determine that the
wheel has advanced by at least one physical click.

https://bugzilla.gnome.org/show_bug.cgi?id=783716
2017-07-17 21:22:15 +02:00
Carlos Garnacho
5c3b27d02f clutter/x11: Emit CLUTTER_PAD_RING/STRIP events on X11
These events will be useful on gnome-shell UI, so translate the
4-5 button events with exotic axes to those. Also use the
XI_Motion event received when first touching those to reset
the ring/strip state, so we don't receive spurious direction
changes in the upper layers.

https://bugzilla.gnome.org/show_bug.cgi?id=782033
2017-07-17 19:43:13 +02:00
Carlos Garnacho
ead6556b50 clutter: Add clutter_event_get_pad_event_details()
This function extracts pad event information, and more importantly
exposes it for gobject introspection.

https://bugzilla.gnome.org/show_bug.cgi?id=782033
2017-07-17 19:10:05 +02:00
Jonas Ådahl
9ab338d7b6 clutter/stage-cogl: Track regions in buffer coordinate space
When fractional scaling is used, damage and paint clip region is tracked
in stage coordinate space using integers might end up missing some
pixels when the border ends up on half pixels. Change the damage
tracking and clip regions to be in buffer coordinates so we can align
damage on physical pixel borders.

However, just using rounding up to the next physical pixel results in
glitches. To avoid this, extend the damage by one logical pixel in all
directions, but still (scissor) clip the drawing to the non-extended
region, as otherwise drawing the damaged regions will result in
incorrect pixels on the right and bottom edges of the clip region. It is
possible that there are better ways to do this, which can be explored in
the future.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
Jonas Ådahl
0adc56779f clutter/stage: Don't loose precision when setting up viewport
We always hit non-fractional floats here because the stage views are
always made so that they are aligned on integer positions with integer
sizes, but there is no reason to go float -> int -> float when
calculating the viewport.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
Jonas Ådahl
dfc4d0d523 clutter/stage-view: Allow scales down to 0.5
There is support for scaling logical monitors down to 0.5, so don't let
ClutterStageView stand in the way for that.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
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