Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Unified Diff: ui/ozone/platform/wayland/wayland_window.cc

Issue 1739193004: ozone/platform/wayland: Use more realistic event processing and request flushing in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wayland-test2
Patch Set: Use watching_ instead of base::MessageLoopForUI::IsCurrent() Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/wayland/wayland_test.cc ('k') | ui/ozone/platform/wayland/wayland_window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/wayland/wayland_window.cc
diff --git a/ui/ozone/platform/wayland/wayland_window.cc b/ui/ozone/platform/wayland/wayland_window.cc
index e28aacfa1dc5b0e3f3fdb5979c859839a78b3616..b64f0bc732e32b595db2c82301f51734e7d4094a 100644
--- a/ui/ozone/platform/wayland/wayland_window.cc
+++ b/ui/ozone/platform/wayland/wayland_window.cc
@@ -41,6 +41,7 @@ bool WaylandWindow::Initialize() {
return false;
}
xdg_surface_add_listener(xdg_surface_.get(), &xdg_surface_listener, this);
+ display_->ScheduleFlush();
display_->AddWindow(surface_.id(), this);
delegate_->OnAcceleratedWidgetAvailable(surface_.id(), 1.f);
@@ -56,6 +57,7 @@ void WaylandWindow::ApplyPendingBounds() {
DCHECK(xdg_surface_);
xdg_surface_ack_configure(xdg_surface_.get(), pending_configure_serial_);
pending_bounds_ = gfx::Rect();
+ display_->ScheduleFlush();
}
void WaylandWindow::Show() {}
@@ -82,6 +84,7 @@ gfx::Rect WaylandWindow::GetBounds() {
void WaylandWindow::SetTitle(const base::string16& title) {
DCHECK(xdg_surface_);
xdg_surface_set_title(xdg_surface_.get(), UTF16ToUTF8(title).c_str());
+ display_->ScheduleFlush();
}
void WaylandWindow::SetCapture() {
@@ -99,16 +102,19 @@ void WaylandWindow::ToggleFullscreen() {
void WaylandWindow::Maximize() {
DCHECK(xdg_surface_);
xdg_surface_set_maximized(xdg_surface_.get());
+ display_->ScheduleFlush();
}
void WaylandWindow::Minimize() {
DCHECK(xdg_surface_);
xdg_surface_set_minimized(xdg_surface_.get());
+ display_->ScheduleFlush();
}
void WaylandWindow::Restore() {
DCHECK(xdg_surface_);
xdg_surface_unset_maximized(xdg_surface_.get());
+ display_->ScheduleFlush();
}
void WaylandWindow::SetCursor(PlatformCursor cursor) {
« no previous file with comments | « ui/ozone/platform/wayland/wayland_test.cc ('k') | ui/ozone/platform/wayland/wayland_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698