osr_rwhv->Invalidate();
} else {
const auto ownerWindow = owner_window();
- const auto nativeWindow = ownerWindow ? ownerWindow->GetNativeWindow() :
- nullptr;
- if (nativeWindow) {
- const gfx::Rect& bounds = nativeWindow->bounds();
- nativeWindow->SchedulePaintInRect(
- gfx::Rect(0, 0, bounds.width(), bounds.height()));
+ if (ownerWindow) {
+ ownerWindow->Invalidate();
}
}
}
std::string* error = nullptr) = 0;
virtual bool IsAlwaysOnTop() = 0;
virtual void Center() = 0;
+ virtual void Invalidate() = 0;
virtual void SetTitle(const std::string& title) = 0;
virtual std::string GetTitle() = 0;
virtual void FlashFrame(bool flash) = 0;
int relativeLevel, std::string* error) override;
bool IsAlwaysOnTop() override;
void Center() override;
+ void Invalidate() override;
void SetTitle(const std::string& title) override;
std::string GetTitle() override;
void FlashFrame(bool flash) override;
[window_ center];
}
+void NativeWindowMac::Invalidate() {
+ [window_ flushWindow];
+ [[window_ contentView] setNeedsDisplay:TRUE];
+}
+
void NativeWindowMac::SetTitle(const std::string& title) {
// For macOS <= 10.9, the setTitleVisibility API is not available, we have
// to avoid calling setTitle for frameless window.
window_->CenterWindow(GetSize());
}
+void NativeWindowViews::Invalidate() {
+ const gfx::Rect& bounds = GetBounds();
+ window_->SchedulePaintInRect(
+ gfx::Rect(0, 0, bounds.width(), bounds.height()));
+}
+
void NativeWindowViews::SetTitle(const std::string& title) {
title_ = title;
window_->UpdateWindowTitle();
int relativeLevel, std::string* error) override;
bool IsAlwaysOnTop() override;
void Center() override;
+ void Invalidate() override;
void SetTitle(const std::string& title) override;
std::string GetTitle() override;
void FlashFrame(bool flash) override;