Commit a7967930 authored by tc@google.com's avatar tc@google.com

XFCE disables the system decorations if there's an xshape set. So

only use the KWin hack when the custom frame is enabled.

This is still a bit buggy in KWin (toggling from custom frame -> system
decorations doesn't always re-attach system decorations), but it seems
like the best I can do.

Review URL: http://codereview.chromium.org/155248


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20199 0039d316-1c4b-4281-b951-d872f2087c98
parent fe19854c
...@@ -1118,12 +1118,16 @@ void BrowserWindowGtk::UpdateWindowShape(int width, int height) { ...@@ -1118,12 +1118,16 @@ void BrowserWindowGtk::UpdateWindowShape(int width, int height) {
gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 1, gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 1,
kFrameBorderThickness, kFrameBorderThickness, kFrameBorderThickness); kFrameBorderThickness, kFrameBorderThickness, kFrameBorderThickness);
} else { } else {
// Disable rounded corners. Simply passing in a NULL region doesn't if (use_custom_frame_.GetValue()) {
// seem to work on KWin, so manually set the shape to the whole window. // Disable rounded corners. Simply passing in a NULL region doesn't
GdkRectangle rect = { 0, 0, width, height }; // seem to work on KWin, so manually set the shape to the whole window.
GdkRegion* mask = gdk_region_rectangle(&rect); GdkRectangle rect = { 0, 0, width, height };
gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, mask, 0, 0); GdkRegion* mask = gdk_region_rectangle(&rect);
gdk_region_destroy(mask); gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, mask, 0, 0);
gdk_region_destroy(mask);
} else {
gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, NULL, 0, 0);
}
gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 0, 0, 0, 0); gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 0, 0, 0, 0);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment