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

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: 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..88a8d0d24c5afe5758c96c16f5c491d40021eec1 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -511,6 +511,17 @@ bool RootWindowHostLinux::Dispatch(const base::NativeEvent& event) {
delegate_->OnHostResized(bounds.size());
if (origin_changed)
delegate_->OnHostMoved(bounds_.origin());
+ // 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()) {
+ XSetWindowBackground(xdisplay_,
+ x_root_window_,
+ BlackPixel(xdisplay_, DefaultScreen(xdisplay_)));
+ XClearWindow(xdisplay_, x_root_window_);
+ // Set the background back to None to preserve content.
+ XSetWindowBackgroundPixmap(xdisplay_, x_root_window_, None);
Daniel Erat 2012/09/25 19:10:57 it's not obvious to me why this is necessary. can
oshima 2012/09/25 19:33:28 According to @marcheu, we intentionally set backgr
Daniel Erat 2012/09/25 19:54:41 Got it, thanks. Wonder if it'd be cleaner to just
oshima 2012/09/25 20:45:09 Done.
+ }
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