summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 57d18c6..b8b5fd6 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);
}
}