Cleanup formatting
This commit is contained in:
parent
3a55cf9189
commit
abb0497a5d
7 changed files with 20 additions and 14 deletions
|
|
@ -143,7 +143,8 @@ void AndroidApiStub::task_removed(Request<protobuf::rpc::Void> *request) {
|
|||
remove_task_handle_.result_received();
|
||||
}
|
||||
|
||||
void AndroidApiStub::resize_task(const std::int32_t &id, const anbox::graphics::Rect &rect,
|
||||
void AndroidApiStub::resize_task(const std::int32_t &id,
|
||||
const anbox::graphics::Rect &rect,
|
||||
const std::int32_t &resize_mode) {
|
||||
ensure_rpc_channel();
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ class AndroidApiStub : public anbox::ApplicationManager {
|
|||
|
||||
void set_focused_task(const std::int32_t &id);
|
||||
void remove_task(const std::int32_t &id);
|
||||
void resize_task(const std::int32_t &id, const anbox::graphics::Rect &rect, const std::int32_t &resize_mode);
|
||||
void resize_task(const std::int32_t &id, const anbox::graphics::Rect &rect,
|
||||
const std::int32_t &resize_mode);
|
||||
|
||||
private:
|
||||
void ensure_rpc_channel();
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ Daemon::Daemon()
|
|||
|
||||
int Daemon::Run(const std::vector<std::string> &arguments) try {
|
||||
auto argv = arguments;
|
||||
if (arguments.size() == 0)
|
||||
argv = {"run"};
|
||||
if (arguments.size() == 0) argv = {"run"};
|
||||
return cmd.run({std::cin, std::cout, argv});
|
||||
} catch (std::exception &err) {
|
||||
ERROR("%s", err.what());
|
||||
|
|
|
|||
|
|
@ -194,8 +194,7 @@ void PlatformPolicy::window_deleted(const Window::Id &id) {
|
|||
WARNING("Got window removed event for unknown window (id %d)", id);
|
||||
return;
|
||||
}
|
||||
if (auto window = w->second.lock())
|
||||
android_api_->remove_task(window->task());
|
||||
if (auto window = w->second.lock()) android_api_->remove_task(window->task());
|
||||
windows_.erase(w);
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +206,8 @@ void PlatformPolicy::window_wants_focus(const Window::Id &id) {
|
|||
android_api_->set_focused_task(window->task());
|
||||
}
|
||||
|
||||
void PlatformPolicy::window_moved(const Window::Id &id, const std::int32_t &x, const std::int32_t &y) {
|
||||
void PlatformPolicy::window_moved(const Window::Id &id, const std::int32_t &x,
|
||||
const std::int32_t &y) {
|
||||
auto w = windows_.find(id);
|
||||
if (w == windows_.end()) return;
|
||||
|
||||
|
|
@ -218,7 +218,9 @@ void PlatformPolicy::window_moved(const Window::Id &id, const std::int32_t &x, c
|
|||
}
|
||||
}
|
||||
|
||||
void PlatformPolicy::window_resized(const Window::Id &id, const std::int32_t &width, const std::int32_t &height) {
|
||||
void PlatformPolicy::window_resized(const Window::Id &id,
|
||||
const std::int32_t &width,
|
||||
const std::int32_t &height) {
|
||||
auto w = windows_.find(id);
|
||||
if (w == windows_.end()) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,8 +52,10 @@ class PlatformPolicy : public std::enable_shared_from_this<PlatformPolicy>,
|
|||
|
||||
void window_deleted(const Window::Id &id) override;
|
||||
void window_wants_focus(const Window::Id &id) override;
|
||||
void window_moved(const Window::Id &id, const std::int32_t &x, const std::int32_t &y) override;
|
||||
void window_resized(const Window::Id &id, const std::int32_t &width, const std::int32_t &height) override;
|
||||
void window_moved(const Window::Id &id, const std::int32_t &x,
|
||||
const std::int32_t &y) override;
|
||||
void window_resized(const Window::Id &id, const std::int32_t &width,
|
||||
const std::int32_t &height) override;
|
||||
|
||||
DisplayInfo display_info() const override;
|
||||
|
||||
|
|
|
|||
|
|
@ -100,8 +100,7 @@ void Window::process_event(const SDL_Event &event) {
|
|||
case SDL_WINDOWEVENT_HIDDEN:
|
||||
break;
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
if (observer_)
|
||||
observer_->window_deleted(id_);
|
||||
if (observer_) observer_->window_deleted(id_);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,10 @@ class Window : public std::enable_shared_from_this<Window>, public wm::Window {
|
|||
virtual ~Observer();
|
||||
virtual void window_deleted(const Id &id) = 0;
|
||||
virtual void window_wants_focus(const Id &id) = 0;
|
||||
virtual void window_moved(const Id &id, const std::int32_t &x, const std::int32_t &y) = 0;
|
||||
virtual void window_resized(const Id &id, const std::int32_t &x, const std::int32_t &y) = 0;
|
||||
virtual void window_moved(const Id &id, const std::int32_t &x,
|
||||
const std::int32_t &y) = 0;
|
||||
virtual void window_resized(const Id &id, const std::int32_t &x,
|
||||
const std::int32_t &y) = 0;
|
||||
};
|
||||
|
||||
Window(const Id &id, const wm::Task::Id &task,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue