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

Unified Diff: ui/aura/root_window_host_linux.cc

Issue 10981024: Clear root window when the aura root window is moved/resized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: guard with OS_CHROMEOS Created 8 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_host_linux.cc
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
index 1f8cc0d1431cf0e3bcd670b3ca9694ebfa67b05a..6eea168a47f49487b14eb26396a618e30070b466 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -511,6 +511,22 @@ bool RootWindowHostLinux::Dispatch(const base::NativeEvent& event) {
delegate_->OnHostResized(bounds.size());
if (origin_changed)
delegate_->OnHostMoved(bounds_.origin());
+#if defined(OS_CHROMEOS)
+ // TODO(oshima): Clear the root when the window is moved or
+ // resized while the extended desktop is disabled.
+ // crbug.com/152003.
+ if (base::chromeos::IsRunningOnChromeOS()) {
+ XGCValues gc_values = {0};
+ gc_values.foreground = BlackPixel(xdisplay_, DefaultScreen(xdisplay_));
+ GC gc = XCreateGC(xdisplay_, x_root_window_, GCForeground, &gc_values);
+ XFillRectangle(xdisplay_, x_root_window_, gc,
+ x_root_bounds_.x(),
+ x_root_bounds_.y(),
+ x_root_bounds_.width(),
+ x_root_bounds_.height());
+ XFreeGC(xdisplay_, gc);
+ }
+#endif
break;
}
case GenericEvent:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698