summary refs log tree commit diff
path: root/src/WebRTCSession.cpp
diff options
context:
space:
mode:
authortrilene <trilene@runbox.com>2021-02-18 16:53:30 -0500
committertrilene <trilene@runbox.com>2021-02-18 16:53:30 -0500
commit3b26cf4ba37c0944a6a297968d40da309be82b69 (patch)
tree5b2a20f06d84c93e4468dd8897a5ff7953301615 /src/WebRTCSession.cpp
parentSupport desktop screen sharing on X11 (diff)
downloadnheko-3b26cf4ba37c0944a6a297968d40da309be82b69.tar.xz
Screen sharing (X11): add hide mouse cursor option
Diffstat (limited to '')
-rw-r--r--src/WebRTCSession.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/WebRTCSession.cpp b/src/WebRTCSession.cpp

index 9c01ddc4..acd54b77 100644 --- a/src/WebRTCSession.cpp +++ b/src/WebRTCSession.cpp
@@ -918,10 +918,13 @@ WebRTCSession::addVideoPipeline(int vp8PayloadType) nhlog::ui()->error("WebRTC: failed to create ximagesrc"); return false; } - g_object_set(source, "use-damage", 0, nullptr); + g_object_set(source, "use-damage", FALSE, nullptr); g_object_set(source, "xid", 0, nullptr); - - int frameRate = ChatPage::instance()->userSettings()->screenShareFrameRate(); + auto settings = ChatPage::instance()->userSettings(); + g_object_set(source, "show-pointer", !settings->screenShareHideCursor(), nullptr); + nhlog::ui()->debug("WebRTC: screen share hide mouse cursor: {}", + settings->screenShareHideCursor()); + int frameRate = settings->screenShareFrameRate(); caps = gst_caps_new_simple( "video/x-raw", "framerate", GST_TYPE_FRACTION, frameRate, 1, nullptr); nhlog::ui()->debug("WebRTC: screen share frame rate: {} fps", frameRate);