feat: 'will-move' event for windows. (#14283)
* feat: 'will-resize' window event (Windows only) * documentation for 'will-move' event * comment and line break fix in docs
This commit is contained in:
parent
f1fe485768
commit
afdb6c5f90
7 changed files with 37 additions and 1 deletions
|
@ -207,9 +207,16 @@ bool NativeWindowViews::PreHandleMSG(UINT message,
|
|||
return false;
|
||||
}
|
||||
case WM_MOVING: {
|
||||
if (!movable_)
|
||||
bool prevent_default = false;
|
||||
NotifyWindowWillMove(gfx::Rect(*reinterpret_cast<RECT*>(l_param)),
|
||||
&prevent_default);
|
||||
if (!movable_ || prevent_default) {
|
||||
::GetWindowRect(GetAcceleratedWidget(),
|
||||
reinterpret_cast<RECT*>(l_param));
|
||||
return true; // Tells Windows that the Move is handled. If not true,
|
||||
// frameless windows can be moved using
|
||||
// -webkit-app-region: drag elements.
|
||||
}
|
||||
return false;
|
||||
}
|
||||
case WM_MOVE: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue