mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-31 19:45:27 +01:00
d3a2237a5a
Popup windows will be created on the display that best matches the requested coordinates. The requested size will apply to the content area (as required by JS documentation) and window size will be reduced if necessary to fit within the target display. The requested origin will apply to the window (including frame) and will be modified if necessary so that the window is fully visible on the target display. This change does not implement popup positioning for cefclient which uses an application-created parent window. This change grants access to the getScreenDetails JS API without user prompt.
18 lines
711 B
C
18 lines
711 B
C
// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
// can be found in the LICENSE file.
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_SCREEN_UTIL_H_
|
|
#define CEF_LIBCEF_BROWSER_SCREEN_UTIL_H_
|
|
#pragma once
|
|
|
|
#include "include/internal/cef_types_wrappers.h"
|
|
|
|
// Create a new rectangle from the input |rect| rectangle that is fully visible
|
|
// on provided |screen_rect| screen. The width and height of the resulting
|
|
// rectangle are clamped to the screen width and height respectively if they
|
|
// would overflow.
|
|
CefRect MakeVisibleOnScreenRect(const CefRect& rect, const CefRect& screen);
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_SCREEN_UTIL_H_
|