diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 23:01:03 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 23:01:03 +0000 |
commit | a796793059916e64b9c45191c1945868f4bff2a5 (patch) | |
tree | 5f768c8f1b71d7164f0574de26e40af114c811a8 /chrome/browser/gtk | |
parent | fe19854c04872937cd20a500bbe3069ef32d7cad (diff) | |
download | chromium_src-a796793059916e64b9c45191c1945868f4bff2a5.zip chromium_src-a796793059916e64b9c45191c1945868f4bff2a5.tar.gz chromium_src-a796793059916e64b9c45191c1945868f4bff2a5.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index 3d57433..1da4fd5 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -1118,12 +1118,16 @@ void BrowserWindowGtk::UpdateWindowShape(int width, int height) { gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 1, kFrameBorderThickness, kFrameBorderThickness, kFrameBorderThickness); } else { - // 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); + if (use_custom_frame_.GetValue()) { + // 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); + } 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); } } |