From c7ca99815527bf8eab430a0e62963729f2ff8d1a Mon Sep 17 00:00:00 2001 From: night_xiaoye <2260737534@qq.com> Date: Wed, 2 Sep 2020 11:05:13 +0800 Subject: [PATCH] window: app frame split from anbox window. Press app close button and don't release, if click point is on the other app's titlebar, drag will split app frame from anbox window on the second window. --- src/anbox/platform/sdl/platform.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/anbox/platform/sdl/platform.cpp b/src/anbox/platform/sdl/platform.cpp index a98ba743..e55d335b 100644 --- a/src/anbox/platform/sdl/platform.cpp +++ b/src/anbox/platform/sdl/platform.cpp @@ -313,17 +313,24 @@ void Platform::process_input_event(const SDL_Event &event) { std::int32_t x = 0; std::int32_t y = 0; + bool bFind = false; switch (event.type) { // Mouse case SDL_MOUSEBUTTONDOWN: for (auto &iter : windows_) { if (auto w = iter.second.lock()) { - if (w->window_id() == event.window.windowID && - w->title_event_filter(event.button.x, event.button.y)) { - return; + if (w->window_id() == event.window.windowID) { + if (w->title_event_filter(event.button.x, event.button.y)) { + return; + } + bFind = true; + break; } } } + if (!bFind) { + return; + } if (config_.no_touch_emulation) { mouse_events.push_back({EV_KEY, BTN_LEFT, 1}); } else { -- GitLab