diff --git a/src/anbox/platform/sdl/window.cpp b/src/anbox/platform/sdl/window.cpp index 69bcfb611a458b3cbe304a19b4839c75e612cd01..f380e00866c93c61d8b84087f4e5b7794f986fe1 100755 --- a/src/anbox/platform/sdl/window.cpp +++ b/src/anbox/platform/sdl/window.cpp @@ -46,12 +46,11 @@ static const std::uint32_t HIDE_CLOSE = 0x08; static const std::uint32_t SHOW_ALL = 0x00; static const std::uint32_t MINI_WIDTH = 540; static const std::uint32_t MINI_HEIGHT = 700; -static const std::uint32_t WX_MINI_WIDTH = 730; +static const std::uint32_t WX_MINI_WIDTH = 540; const std::map Window::property_map = { - {"喜马拉雅", HIDE_MAXIMIZE}, - {"i深圳", HIDE_MAXIMIZE}, - {"地铁跑酷", HIDE_MAXIMIZE} + {"腾讯视频", SHOW_ALL}, + {"爱奇艺", SHOW_ALL} }; const std::mapWindow::custom_window_map = { @@ -85,6 +84,8 @@ Window::Window(const std::shared_ptr &renderer, auto property_itr = property_map.find(title); if (property_itr != property_map.end()) { visible_property = property_itr->second; + } else { + visible_property = HIDE_MAXIMIZE; } if (!(visible_property & HIDE_MAXIMIZE) && resizable) { flags |= SDL_WINDOW_RESIZABLE; @@ -174,33 +175,6 @@ SDL_HitTestResult Window::on_window_hit(SDL_Window *window, const SDL_Point *pt, SDL_HitTestResult result = SDL_HITTEST_NORMAL; - while (!(platform_window->GetWindowFlags() & SDL_WINDOW_MAXIMIZED)) { - if (pt->x < border_size && pt->y < border_size) - result = SDL_HITTEST_RESIZE_TOPLEFT; - else if (pt->x > window_resize_border && pt->x < w - border_size && pt->y < border_size) - result = SDL_HITTEST_RESIZE_TOP; - else if (pt->x > w - border_size && pt->y < border_size) - result = SDL_HITTEST_RESIZE_TOPRIGHT; - else if (pt->x > w - border_size && pt->y > border_size && pt->y < h - border_size) - result = SDL_HITTEST_RESIZE_RIGHT; - else if (pt->x > w - border_size && pt->y > h - border_size) - result = SDL_HITTEST_RESIZE_BOTTOMRIGHT; - else if (pt->x < w - border_size && pt->x > border_size && pt->y > h - border_size) - result = SDL_HITTEST_RESIZE_BOTTOM; - else if (pt->x < border_size && pt->y > h - border_size) - result = SDL_HITTEST_RESIZE_BOTTOMLEFT; - else if (pt->x < border_size && pt->y < h - border_size && pt->y > border_size) - result = SDL_HITTEST_RESIZE_LEFT; - else - break; - - if (!platform_window->initialized.load()) { - INFO("window initialized by resize"); - platform_window->initialized = true; - } - return result; - } - if (pt->y < top_drag_area_height) { if (!platform_window->initialized.load()) { INFO("window initialized by click top");