osx: Make draggable region work for window with hidden titlebar

This commit is contained in:
Cheng Zhao 2015-09-25 16:38:36 +08:00
parent 6f944ad49b
commit 7884a2319c
3 changed files with 20 additions and 2 deletions

View file

@ -68,6 +68,7 @@ NativeWindow::NativeWindow(
const mate::Dictionary& options)
: content::WebContentsObserver(inspectable_web_contents->GetWebContents()),
has_frame_(true),
force_using_draggable_region_(false),
transparent_(false),
enable_larger_than_screen_(false),
is_closed_(false),
@ -473,7 +474,7 @@ bool NativeWindow::OnMessageReceived(const IPC::Message& message) {
void NativeWindow::UpdateDraggableRegions(
const std::vector<DraggableRegion>& regions) {
// Draggable region is not supported for non-frameless window.
if (has_frame_)
if (has_frame_ && !force_using_draggable_region_)
return;
draggable_region_ = DraggableRegionsToSkRegion(regions);
}