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

Unified Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 155169: Work around a bug in KWin where the window shape doesn't get (Closed)
Patch Set: Created 11 years, 5 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: chrome/browser/gtk/browser_window_gtk.cc
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 57d18c628aa45e11a8f9ffd08b33e3709899308b..b8b5fd64d067bbf01d4e7e0fbdee2b2f8517bae4 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -1123,8 +1123,12 @@ void BrowserWindowGtk::UpdateWindowShape(int width, int height) {
gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 1,
kFrameBorderThickness, kFrameBorderThickness, kFrameBorderThickness);
} else {
- // Disable rounded corners.
- gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, NULL, 0, 0);
+ // Disable rounded corners. Simply passing in a NULL region doesn't
+ // seem to work on KWin, so manually set the shape to the whole window.
+ GdkRectangle rect = { 0, 0, width, height };
+ GdkRegion* mask = gdk_region_rectangle(&rect);
+ gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, mask, 0, 0);
+ gdk_region_destroy(mask);
gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 0, 0, 0, 0);
}
}
« 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