summaryrefslogtreecommitdiff
path: root/src/backends/meta-remote-desktop-session.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace contents with redirect messagemasterFlorian Müllner2021-07-191-1725/+0
| | | | | | | The default development branch is now `main`. This commit only exists on `master` to point people towards that. See https://gitlab.gnome.org/GNOME/glib/-/issues/2348 for details.
* remote-desktop-session: Don't recreate virtual device over and overJonas Ådahl2021-05-071-6/+11
| | | | | | | | | | | In 'remote-desktop-session: Create virtual input devices on demand' the intention was to create input devices on-demand, but during a refactorization of the code, instead the virtual input device was recreated over and over. Lets fix that. Fixes: a0af52caf00ed Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1799 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1858>
* remote-desktop-session: Create virtual input devices on demandJonas Ådahl2021-04-291-17/+103
| | | | | | | This avoids triggering heuristics based on available input device types; e.g. hiding the cursor when connecting a touchscreen. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1800>
* remote-desktop/session: Handle unable to transform coordinate gracefullyJonas Ådahl2021-03-121-17/+35
| | | | | | | | | | | There may be a race between the ability to turn stream relative input coordinates and turning them into screen coordinates, due to the future scenario where the entity backing a stream is created and managed ad-hoc depending on PipeWire stream negotiations. When an input event is sent during this time, drop it. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
* remote-desktop/session: Add CapsLockState and NumLockState propertiesJonas Ådahl2021-03-041-0/+11
| | | | | | | | | | | Will be used by remote desktop services that want to try to affect the end result of these. We cannot let it set these directly, as these needs to be done using virtual key events to not cause issues in all the XKB state tracking, so remote desktop services try to deal with this themself if they need to. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1342 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1739>
* remote-desktop/session: Maybe emit 'owner-changed' after clipboard enabledJonas Ådahl2021-02-051-10/+29
| | | | | | | | If there is a clipboard owner when enabling the clipboard integration without immediately overriding the owner, send an initial owner-changed event. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1552>
* remote-desktop/session: Add support for SelectionTransfer/WriteJonas Ådahl2021-02-051-18/+295
| | | | | | | | | | | When a transfer request is done to the MetaSelectionSourceRemote source, it's translated to a SelectionTransfer signal, which the remote desktop server is supposed to respond to with SelectionWrite. A timeout (set to 15 seconds) is added to handle too long timeouts, which cancels the transfer request. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1552>
* remote-desktop/session: Implement SelectionRead()Jonas Ådahl2021-02-051-4/+128
| | | | | | | This makes it possible to retrieve the clipboard content from the current selection clipboard source. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1552>
* remote-desktop/session: Forward MetaSelection::owner-changedJonas Ådahl2021-02-051-3/+121
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1552>
* remote-desktop/session: Added boiler plate for clipboard integrationJonas Ådahl2021-02-051-0/+166
| | | | | | | | | | | Nothing is hooked up, it only does basic sanity checking i.e. whether the clipboard was enabled when interacting with it. No actual clipboard integration is hooked up yet. This also syncs org.gnome.Mutter.RemoteDesktop.xml from gnome-remote-desktop. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1552>
* remote-desktop: Allow using custom scroll source for NotifyPointerAxisPascal Nowack2021-01-111-2/+42
| | | | | | | | | | | | | | | | | | | | Currently, the NotifyPointerAxis method always assumes that the scroll source is CLUTTER_SCROLL_SOURCE_FINGER. This is however not always true and in some cases a remote desktop client needs to submit a PointerAxis event with a custom axis step. This is for example the case with high resolution mouse wheels, where the NotifyPointerAxisDiscrete method is unsuitable. In such cases NotifyPointerAxis needs to be called, but with the intention that the scroll source is still a mouse wheel. To solve this situation, don't assume the scroll source always to be CLUTTER_SCROLL_SOURCE_FINGER. Instead, add further flag options to NotifyPointerAxis, which allow a remote desktop client to choose the scroll source. This way a remote desktop client can choose what scroll source is the most suitable one for the current scroll event. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1636>
* clutter: Limit number of touch slots available to a virtual touch deviceCarlos Garnacho2020-10-231-2/+26
| | | | | | | | It's not worth letting these devices have an "unlimited" range of touch slots. Limiting it to 32 is more than enough to map it with real touch devices nowadays. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1486
* remote-desktop: Check for screencast only when requiredOlivier Fourdan2020-06-291-8/+26
| | | | | | | | | | | | | | The portal API requires a screencast session only for absolution motion with remote desktop, other methods including relative motion do not require a screencast session. There is no reason to be more strict than the API actually is, check for a screencast session only when required, like for absolute motion events and touch events. Tested with https://gitlab.gnome.org/snippets/1122 Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1307
* backends: Make uniform checks on remote desktop input dbus methodsCarlos Garnacho2020-05-201-94/+51
| | | | | | | | | | | | | | They all checked that the remote session service talked with the correct peer, and some of them did check that there is an associated screencast session. Add a new check for the session being started (as it's state is decoupled with screencast session availability) and move all checks to a function that is called from all input-oriented DBus methods. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1254 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1258
* backends: Ensure remote desktop dbus interface stateCarlos Garnacho2020-05-201-1/+21
| | | | | | | Ensure that it does receive Start and Stop orderly, and error out otherwise. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1258
* clutter: Move virtual device management to ClutterSeatCarlos Garnacho2020-01-301-9/+5
| | | | | | A11y in general may be considered a per-seat feature. https://gitlab.gnome.org/GNOME/mutter/merge_requests/852
* cleanup: Use g_clear_signal_handler() where possibleRobert Mader2019-11-211-2/+2
| | | | | | | | | | | | | | | | | | | This is inspired by 98892391d764d1cf where the usage of `g_signal_handler_disconnect()` without resetting the corresponding handler id later resulted in a bug. Using `g_clear_signal_handler()` makes sure we avoid similar bugs and is almost always the better alternative. We use it for new code, let's clean up the old code to also use it. A further benefit is that it can get called even if the passed id is 0, allowing us to remove a lot of now unnessecary checks, and the fact that `g_clear_signal_handler()` checks for the right type size, forcing us to clean up all places where we used `guint` instead of `gulong`. No functional changes intended here and all changes should be trivial, thus bundled in one big commit. https://gitlab.gnome.org/GNOME/mutter/merge_requests/940
* remote-desktop-session: Remove unnecessary includeFlorian Müllner2019-06-271-1/+0
| | | | | | | The class doesn't actually use the native backend, so remove it to avoid build errors when the backend is disabled. https://gitlab.gnome.org/GNOME/mutter/merge_requests/637
* Fix builds with G_DISABLE_ASSERTFlorian Müllner2019-01-251-0/+1
| | | | | | | | | Commit 25f416c13db added additional compilation warnings, including -Werror=return-type. There are several places where this results in build failures if `g_assert_not_reached()` is disabled at compile time and the compiler misses a return value. https://gitlab.gnome.org/GNOME/mutter/issues/447
* remote-desktop: Do not leak the virtual touchscreenOlivier Fourdan2018-11-191-0/+1
| | | | | | | | Virtual keyboard and pointer are freed on session close, but the virtual touchscreen isn't. Avoid a leak by freeing the virtual touchscreen along with the rest of virtual devices.
* Clean up include macros messJonas Ådahl2018-11-061-0/+1
| | | | | | The order and way include macros were structured was chaotic, with no real common thread between files. Try to tidy up the mess with some common scheme, to make things look less messy.
* Add remote access controller APIJonas Ådahl2018-07-201-0/+80
| | | | | | | | | | | | Add API to let GNOME Shell have the ability to get notified about remote access sessions (remote desktop, remote control and screen cast), and with a way to close them. This is done by adding an abstraction above the remote desktop and screen cast session objects, to avoid exposing their objects to outside of mutter. Doing that would result in external parts holding references to the objects, complicating their lifetimes. By using separate wrapper objects, we avoid this issue all together.
* remote-desktop: Remove unnecessary includeJonas Ådahl2018-07-061-1/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=759538
* remote-desktop: Add touch screen event supportJonas Ådahl2018-02-231-0/+135
|
* remote-desktop: Fix absolute pointer motion coordinatesJonas Ådahl2018-02-231-1/+23
| | | | | | If the coordinates was for a stream not at the stage position (0, 0), they'd be incorrect. Fix this by correctly translating the coordinates according to the stream position.
* remote-desktop: Add relative pointer motion event supportJonas Ådahl2018-02-231-0/+27
| | | | Relative pointer motions are assumed to be pre-accelerated.
* remote-desktop: Add smooth scroll event supportJonas Ådahl2018-02-231-0/+42
|
* remote-desktop: Add keyboard keycode event supportJonas Ådahl2018-02-231-0/+33
| | | | | Keyboard keycode events will act as a physical keyboard thus depend on the active keyboard layout.
* remote-desktop: Support multiple axis steps at onceJonas Ådahl2018-02-231-7/+8
| | | | Just call the corresponding clutter API once for each step.
* remote-desktop: Fix notify axis input validity checkJonas Ådahl2018-02-231-1/+1
| | | | | The check was inverted; allowed axis are 0 and 1, not the other way around.
* remote-desktop-session: Don't always warn about axis stepsJonas Ådahl2018-01-241-1/+1
| | | | | | | The condition for warning was wrong, causing it to always warn no matter the input. https://bugzilla.gnome.org/show_bug.cgi?id=792062
* remote-desktop, screen-cast: Fail session method calls from other peersJonas Ådahl2017-08-291-1/+62
| | | | | | | Only accept method calls on the session objects from the same peer that created the session. https://bugzilla.gnome.org/show_bug.cgi?id=784199
* Add remote desktop and screen cast functionalityJonas Ådahl2017-08-291-0/+444
This commit adds basic screen casting and remote desktoping functionalty. This works by exposing two D-Bus API services: org.gnome.Mutter.ScreenCast and org.gnome.Mutter.RemoteDesktop. The remote desktop API is used to create remote desktop sessions. For each session, a D-Bus object is created, and an application can manage the session by sending messages to the session object. A remote desktop session the user to emit input events using the D-Bus methods on the session object. To get framebuffer content, the application should create an associated screen cast session. The screen cast API is used to create screen cast sessions. One can so far either create stand-alone screen cast sessions, or a screen cast session associated with a remote desktop session. A remote desktop associated screen cast session is managed by the remote desktop session. So far only remote desktop managed screen cast sessions are implemented. Each screen cast session may have one or more streams. A screen cast stream is a stream of buffers of some part of the compositor content. So far API exists for creating streams of monitors and windows, but only monitor streams are implemented. When a screen cast session is started, the one PipeWire stream is created for each screen cast stream created for the session. When this has happened, a PipeWireStreamAdded signal is emitted on the stream object, passing a unique identifier. The application may use this identifier to find the associated stream being advertised by the PipeWire daemon. The remote desktop and screen cast functionality must be explicitly be enabled at ./configure time by passing --enable-remote-desktop to ./configure. Doing this will build both screen cast and remote desktop support. To actually enable the screen casting and remote desktop, the user must enable the experimental feature. See org.gnome.mutter.experimental-features. https://bugzilla.gnome.org/show_bug.cgi?id=784199