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

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc

Issue 54983005: Plumb native AppWindow input region through to window shape under Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo in X11 patch Created 7 years, 1 month 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/views/widget/desktop_aura/desktop_root_window_host_win.cc ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
index 180614e955525046fbbfc4e2a0b5b810d681ca8a..884608768bf65683f5d04ca8c0d967755c6f8e3f 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
@@ -430,11 +430,18 @@ gfx::Rect DesktopRootWindowHostX11::GetWorkAreaBoundsInScreen() const {
}
void DesktopRootWindowHostX11::SetShape(gfx::NativeRegion native_region) {
- SkPath path;
- native_region->getBoundaryPath(&path);
- Region region = gfx::CreateRegionFromSkPath(path);
- XShapeCombineRegion(xdisplay_, xwindow_, ShapeBounding, 0, 0, region, false);
- XDestroyRegion(region);
+ if (native_region) {
+ SkPath path;
+ native_region->getBoundaryPath(&path);
+ Region region = gfx::CreateRegionFromSkPath(path);
+ XShapeCombineRegion(
+ xdisplay_, xwindow_, ShapeBounding, 0, 0, region, false);
+ XDestroyRegion(region);
+ } else {
+ ResetWindowRegion();
+ }
+
+ delete native_region;
}
void DesktopRootWindowHostX11::Activate() {
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_win.cc ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698