Handle window movement/resize/close on our side and not in Android
This leads to much better performance and user interaction. Resizing still has some flickering but that is a different area of problems.
This commit is contained in:
parent
bd6e17ef70
commit
65531a3b82
17 changed files with 230 additions and 41 deletions
|
|
@ -119,8 +119,6 @@ void AndroidApiSkeleton::launch_application(anbox::protobuf::bridge::LaunchAppli
|
|||
void AndroidApiSkeleton::set_focused_task(anbox::protobuf::bridge::SetFocusedTask const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) {
|
||||
(void) response;
|
||||
|
||||
connect_services();
|
||||
|
||||
if (activity_manager_.get())
|
||||
|
|
@ -130,4 +128,35 @@ void AndroidApiSkeleton::set_focused_task(anbox::protobuf::bridge::SetFocusedTas
|
|||
|
||||
done->Run();
|
||||
}
|
||||
|
||||
void AndroidApiSkeleton::remove_task(anbox::protobuf::bridge::RemoveTask const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) {
|
||||
connect_services();
|
||||
|
||||
if (activity_manager_.get())
|
||||
activity_manager_->removeTask(request->id());
|
||||
else
|
||||
response->set_error("ActivityManager is not available");
|
||||
|
||||
done->Run();
|
||||
|
||||
}
|
||||
|
||||
void AndroidApiSkeleton::resize_task(anbox::protobuf::bridge::ResizeTask const *request,
|
||||
anbox::protobuf::rpc::Void *response,
|
||||
google::protobuf::Closure *done) {
|
||||
connect_services();
|
||||
|
||||
if (activity_manager_.get()) {
|
||||
auto r = request->rect();
|
||||
activity_manager_->resizeTask(request->id(),
|
||||
anbox::graphics::Rect{r.left(), r.top(), r.right(), r.bottom()},
|
||||
request->resize_mode());
|
||||
} else {
|
||||
response->set_error("ActivityManager is not available");
|
||||
}
|
||||
|
||||
done->Run();
|
||||
}
|
||||
} // namespace anbox
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue