summaryrefslogtreecommitdiff
path: root/clutter
Commit message (Collapse)AuthorAgeFilesLines
* clutter/x11: Implement keycode lookup from keysyms on virtual key devicesCarlos Garnacho2018-08-283-4/+204
| | | | | | | | | | | | | | Unfortunately XKeysymToKeycode() falls short in that it coalesces keysyms into keycodes pertaining to the first level (i.e. lowercase). Add a ClutterKeymapX11 method (much alike its GdkKeymap counterpart) to look up all matches for the given keysym. Two other helper methods have been added so the virtual device can fetch the current keyboard group, and latch modifiers for key emission. Combining all this, the virtual device is now able to handle keycodes in further levels. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/135
* clutter: Set can_show_preedit flag on ClutterTextCarlos Garnacho2018-08-231-0/+1
| | | | | It is certainly able to visualize preedit text inline, so it must announce itself as such.
* clutter: Refactor ClutterText IM focus in into separate functionCarlos Garnacho2018-08-231-12/+21
| | | | | | A just focused ClutterInputFocus must set itself up correctly on all situations. Refactor this into a function, so it can be used for the case where a ClutterText gets editable while focused.
* clutter-text: Avoid clipping the wrong framebufferDaniel van Vugt2018-08-201-8/+2
| | | | | | | | | | | | `ClutterText` painting for editable single_line_mode actors like `StEntry` is always clipped by: `cogl_framebuffer_push_rectangle_clip (fb, 0, 0, alloc_width, alloc_height)` So it's difficult to get the rectangle wrong. However in cases where the target framebuffer has changed (`cogl_push_framebuffer`) such as when updating `ClutterOffscreenEffect` we had the wrong old value of `fb`. And so would be clipping the wrong framebuffer, effectively not clipping at all.
* clutter/x11: Detect auto-repeated key eventsAndrea Azzarone2018-08-201-0/+3
| | | | Detect auto-repeated key events using the XIKeyRepeat flag.
* clutter/enum: Add CLUTTER_EVENT_FLAG_REPEATED for auto-repeated eventsAndrea Azzarone2018-08-203-4/+5
|
* virtual-input/evdev: Translate from button internal codes to evdevJonas Ådahl2018-08-091-6/+29
| | | | | | | | | | | Sending button events to a ClutterVirtualInputDevice, the API expects button codes to be of the internal clutter type. The evdev implementation incorrectly assumed it was already prepared evdev event codes, which was not the case. Fix the evdev implementation to translate from the internal representation to evdev before passing it along to ClutterSeatEvdev. https://gitlab.gnome.org/GNOME/mutter/merge_requests/190
* clutter/actor: Inherit clone branch depth from parentDaniel van Vugt2018-08-011-8/+21
| | | | | | | Children added to a parent after that parent (or its ancestors) have already been cloned now inherit the clone branch depth of the parent. Otherwise `clutter_actor_is_in_clone_paint` on the child could return FALSE when it should have been returning TRUE.
* Don't cast free function passed to g_clear_pointerFlorian Müllner2018-07-311-1/+1
| | | | | | | | | The function is intentionally provided as macro to not require a cast. Recently the macro was improved to check that the passed in pointer matches the free function, so the cast to GDestroyNotify is now even harmful. https://gitlab.gnome.org/GNOME/mutter/merge_requests/176
* clutter: Stop using g_type_class_add_private()Florian Müllner2018-07-316-42/+30
| | | | | | | It is now deprecated in favor of the G_ADD_PRIVATE() macro (usually called via G_DEFINE_WITH_PRIVATE()). https://gitlab.gnome.org/GNOME/mutter/merge_requests/176
* ClutterActor: Preserve valid paint volumes till the next relayout/repaintCarlos Garnacho2018-07-131-1/+17
| | | | | | | Cuts down approximately all paint volume calculations when there's windows that redraw frequently, but don't move. https://bugzilla.gnome.org/show_bug.cgi?id=782344
* clutter-input-device-xi2: Check for null group_modes before unrefCorentin Noël2018-06-071-1/+2
|
* clutter-actor: Fix uninitialized matrix multiplyDaniel van Vugt2018-05-311-1/+1
| | | | | | | | `modelview` is uninitialized and the `apply` function just multiplies it. What we really want is to initialize `modelview` so replace `apply` with `get`. Who knows what bugs this may have caused...
* device-manager-evdev: Add main seat to seats by defaultMarco Trevisan (Treviño)2018-05-291-8/+6
| | | | | | Treat the main seat as other seats, so we don't have to handle it differently in specific places. This was already the case before when a real device was plugged before the startup, but not applied when hotplugging a device.
* device-manager-evdev: Free the main seat on finalizeMarco Trevisan (Treviño)2018-05-291-0/+1
|
* device-manager-evdev: Set and unset the stage for the main seat tooMarco Trevisan (Treviño)2018-05-291-0/+4
| | | | | | | | | | | When no input devices are available on startup the device manager might be fast enough to be constructed so that no default stage is set yet, and thus when main seat virtual devices are created they won't have a proper stage set. If then we plug a real device, the events that an input manager could generate won't be associated to any stage and thus won't be processed. We need then ensure that when we update the stage for the device manager we (un)associate it also to the main seat devices.
* clutter-device-evdev: Get devices from main seat if no real seat is setMarco Trevisan (Treviño)2018-05-151-9/+4
| | | | | | | | | | In devices such as ARM boards there could be no input devices connected on startup, leading to a crash when we try to process artificial events that could be queued (as gnome-shell does when syncing pointer). Those events still should refer to a device and, in case we don't have one provided by libinput we should still return the core devices defined in the main seat.
* clutter-seat-evdev: Add function to get device by idMarco Trevisan (Treviño)2018-05-152-0/+21
|
* clutter: Don't reference invalid pc in girFlorian Müllner2018-05-071-1/+1
| | | | | | | Cally is built into clutter itself rather than exposed as a separate library. https://bugzilla.gnome.org/show_bug.cgi?id=781471
* clutter: Plug minor leakCarlos Garnacho2018-04-221-0/+2
| | | | | clutter_stage_manager_list_stages() returns a copied list, which should be freed.
* clutter: Set slave=master in IM forwarded key eventsCarlos Garnacho2018-04-221-0/+1
| | | | | | | | The fix is twofold. On one hand, it makes sense not to relate IM (nor any other) generated events to a HW device. On the other hand, if we are unfortunate that an IM event is in flight when we are switching to another TTY, it may arrive at a time when the source device is no longer existent.
* clutter/evdev: Don't ignore CAPS lock as modifierOlivier Fourdan2018-04-181-0/+8
| | | | | | | | Mark CAPS lock as a modifier (as it should) so that when using XKB options to change the default behaviour of CAPS lock, the new assigned key can by used as a sticky key as well. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/112
* clutter/evdev: ignore injected events from IMOlivier Fourdan2018-04-181-0/+4
| | | | | | | Input method can inject key events, which leads to multiple reported key press/release events for a single user action. Ignore those events as this confuses keyboard accessibility.
* clutter: Apply input hints/purpose on ClutterTextInputFocus focus inCarlos Garnacho2018-04-031-2/+10
| | | | | | | | | | And make the ClutterText-level properties independent from the input focus, as those properties can be set anytime, not just when the ClutterText actor is focused. https://gitlab.gnome.org/GNOME/mutter/issues/66 Closes: #66
* clutter: Avoid unnecessary relayouts in ClutterTextYussuf Khalil2018-03-221-16/+27
| | | | | | We can save an unnecessary relayout if the required size to fully draw the text is equal to the currently allocated size after the underlying text buffer or attributes that only affect the PangoLayout have changed.
* configure: Don't declare functions in AC_TRY_LINK and AC_TRY_COMPILETing-Wei Lan2018-03-211-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=792717
* Fix some spelling errorshandsome-feng2018-03-211-1/+1
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/45
* clutter: Give the ClutterTextInputFocus a first stab at handling key eventsCarlos Garnacho2018-03-131-4/+5
| | | | | | | | | | Actor keybindings were dispatched in an earlier return path, which means the IM doesn't get to see certain key events. Flip the order around so the IM has an opportunity to handle all keypresses. https://gitlab.gnome.org/GNOME/mutter/issues/65 Closes: #65
* clutter/x11: Communicate proper group/mode on pad events.Carlos Garnacho2018-03-033-1/+84
| | | | | | | | So we can trigger actions for the right mode. https://gitlab.gnome.org/GNOME/mutter/issues/48 Closes: #48
* clutter/x11: Implement missing ClutterInputDevice pad vmethodsCarlos Garnacho2018-03-035-2/+156
| | | | | | | | | Use libwacom to be able to find out modes, groups and button roles on pad devices. https://gitlab.gnome.org/GNOME/mutter/issues/48 Closes: #48
* clutter/x11: Plug a leakCarlos Garnacho2018-02-271-0/+1
|
* clutter/device-manager: Add way to check virtual device supportJonas Ådahl2018-02-235-0/+54
| | | | | This is needed so that mutter can let applications using the remote desktop API to know whether touch screens are supported.
* clutter/x11: Add pointer motion support to virtual devicesJonas Ådahl2018-02-231-0/+9
| | | | | As the other virtual input event delivery mechanisms, this also uses the XTEST protocol.
* clutter: Add smooth scroll and touch API to virtual devicesJonas Ådahl2018-02-235-0/+304
| | | | | So far only implemented on the evdev backend,as X11 doesn't support touch devices nor smooth scrolling via XTEST.
* clutter/evdev: Don't treat device touch slots as seat slotsJonas Ådahl2018-02-235-53/+155
| | | | | | 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.
* clutter/evdev: Move touch notification to seatJonas Ådahl2018-02-233-61/+80
|
* clutter: Silence gtk-doc warningJonas Ådahl2018-02-231-1/+2
|
* clutter: Check the ClutterTextInputFocus has focus before filtering eventsCarlos Garnacho2018-02-181-2/+4
| | | | | | | | | | 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
* clutter/text: Be more pervasive at updating input method stateCarlos Garnacho2018-02-121-2/+9
| | | | | More concretely, ensure preedit text goes away after commit/focus_out, and update cursor position right after focus_in.
* clutter/x11: Remove video memory purge APIJonas Ådahl2018-02-072-30/+1
| | | | | | | 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
* clutter/evdev: Add support for BTN_STYLUS3Jason Gerecke2018-01-301-0/+8
| | | | | | | | | 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
* clutter/stage: Set framebuffer state directlyRay Strode2018-01-251-9/+12
| | | | | | | | | | 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
* clutter: Make ClutterText request toggling the input panelCarlos Garnacho2018-01-181-0/+1
| | | | So gnome-shell is able to show the OSK for it.
* clutter: Add clutter_text_has_preedit()Carlos Garnacho2018-01-182-0/+11
| | | | | | 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.
* clutter: Add input-purpose/hint properties to ClutterTextCarlos Garnacho2018-01-182-0/+69
| | | | So those properties can be changed or queried within shell UI.
* clutter: Implement ClutterInputFocus subclass for ClutterTextCarlos Garnacho2018-01-181-2/+177
| | | | | This only applies when the actor is editable. This object will allow editable ClutterText instances to interact with the input method.
* clutter: Add ClutterInputMethod and ClutterInputFocusCarlos Garnacho2018-01-1810-0/+986
| | | | | | | | | | | | | 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.
* clutter: Add ClutterBackend IM setter/getterCarlos Garnacho2018-01-184-0/+39
| | | | | 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.
* clutter: Add special event flag for events that went through an IMCarlos Garnacho2018-01-181-2/+3
| | | | | This will be useful to let Clutter know whether those should be or have already been dispatched through an input method.
* clutter/evdev: Ensure a valid ClutterEventSequence on single-touch devicesCarlos Garnacho2018-01-171-1/+1
| | | | | | | | 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