Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ad4798

Browse files
committed
[Win] Fix compilation error of 99b2228.
1 parent 624d494 commit 0ad4798

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/browser/native_window_win.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ void NativeWindowWin::SetSize(const gfx::Size& size) {
321321
}
322322

323323
gfx::Size NativeWindowWin::GetSize() {
324-
return window_->size();
324+
return window_->GetWindowBoundsInScreen().size();
325325
}
326326

327327
void NativeWindowWin::SetMinimumSize(int width, int height) {
@@ -358,11 +358,12 @@ void NativeWindowWin::SetPosition(const std::string& position) {
358358
}
359359

360360
void NativeWindowWin::SetPosition(const gfx::Point& position) {
361-
window_->SetPosition(position);
361+
gfx::Rect bounds = window_->GetWindowBoundsInScreen();
362+
window_->SetBounds(gfx::Rect(position, bounds.size()));
362363
}
363364

364365
gfx::Point NativeWindowWin::GetPosition() {
365-
return window_->bounds().origin();
366+
return window_->GetWindowBoundsInScreen().origin();
366367
}
367368

368369
void NativeWindowWin::FlashFrame(bool flash) {

0 commit comments

Comments
 (0)