add moveTop API to move window z-oder to top for win32, mac (#12485)

* add moveTop API to move window z-oder to top for win32, mac

* BrowserWindow::MoveTop SetMethod bug fix
This commit is contained in:
MadfishDT 2018-04-03 22:04:32 +09:00 committed by Charles Kerr
parent 9d570dc645
commit 200388ff96
8 changed files with 36 additions and 1 deletions

View file

@ -88,7 +88,6 @@ void FlipWindowStyle(HWND handle, bool on, DWORD flag) {
bool IsAltKey(const content::NativeWebKeyboardEvent& event) {
return event.windows_key_code == ui::VKEY_MENU;
}
bool IsAltModifier(const content::NativeWebKeyboardEvent& event) {
typedef content::NativeWebKeyboardEvent::Modifiers Modifiers;
int modifiers = event.GetModifiers();
@ -625,6 +624,16 @@ void NativeWindowViews::SetResizable(bool resizable) {
resizable_ = resizable;
}
#if defined(OS_WIN)
void NativeWindowViews::MoveTop() {
gfx::Point pos = GetPosition();
gfx::Size size = GetSize();
::SetWindowPos(GetAcceleratedWidget(), HWND_TOP,
pos.x(), pos.y(), size.width(), size.height(),
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
}
#endif
bool NativeWindowViews::IsResizable() {
#if defined(OS_WIN)
if (has_frame())