diff --git a/components/rgbd-sources/src/sources/screencapture/screencapture.cpp b/components/rgbd-sources/src/sources/screencapture/screencapture.cpp index 4f59d7e3879df69a05c7acc23a15c98a117ebd41..6ade3f14ecc1cd858d3597d17f3308eebae722eb 100644 --- a/components/rgbd-sources/src/sources/screencapture/screencapture.cpp +++ b/components/rgbd-sources/src/sources/screencapture/screencapture.cpp @@ -203,23 +203,11 @@ void ScreenCapture::_mouseClick(int button, int x, int y) { auto &s = *impl_state_; - //ftl::pool.push([this,x,y](int id) { - //auto &s = *impl_state_; + XTestFakeMotionEvent (s.display, 0, x, y, CurrentTime); + XSync(s.display, 0); - //std::this_thread::sleep_for(std::chrono::milliseconds(100)); - - XTestFakeMotionEvent (s.display, 0, x, y, CurrentTime); - XSync(s.display, 0); - - //std::this_thread::sleep_for(std::chrono::milliseconds(100)); - //XTestFakeButtonEvent (s.display, Button1, False, CurrentTime); - //XSync(s.display, 0); - - XTestFakeButtonEvent (s.display, Button1, True, CurrentTime); - //XSync(s.display, 0); - XTestFakeButtonEvent (s.display, Button1, False, CurrentTime); - //XSync(s.display, 0); - //}); + XTestFakeButtonEvent (s.display, Button1, True, CurrentTime); + XTestFakeButtonEvent (s.display, Button1, False, CurrentTime); #endif } @@ -230,8 +218,9 @@ bool ScreenCapture::retrieve(ftl::rgbd::Frame &frame) { if (host_->value("enable_touch", false)) { if (frame.changed(Channel::Touch)) { - LOG(INFO) << "GOT TOUCH DATA"; const auto &touches = frame.get<std::vector<ftl::codecs::Touch>>(Channel::Touch); + LOG(INFO) << "GOT TOUCH DATA " << touches.size(); + for (const auto &t : touches) { LOG(INFO) << " -- " << t.x << "," << t.y; } diff --git a/components/structures/src/new_frame.cpp b/components/structures/src/new_frame.cpp index 46df694966212a6c9dc522ca36e1ab1572e40e31..88619e19ee2e8e65ef2da538ca396c2cc1266475 100644 --- a/components/structures/src/new_frame.cpp +++ b/components/structures/src/new_frame.cpp @@ -365,8 +365,8 @@ void Frame::reset() { d.second.status = ChannelStatus::INVALID; d.second.encoded.clear(); - // Note: Aggregate channels cannot memory pool and must be cleared. - if (ftl::data::isAggregate(d.first)) d.second.data.reset(); + // Note: Data channels should be cleared + if ((int)d.first >= 32) d.second.data.reset(); } changed_.clear(); status_ = FrameStatus::CREATED;