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

Side by Side Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 155248: XFCE disables the system decorations if there's an xshape set. So (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/browser_window_gtk.h" 5 #include "chrome/browser/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <X11/XF86keysym.h> 8 #include <X11/XF86keysym.h>
9 9
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 GdkRectangle mid_rect = { 1, 1, width - 2, 2 }; 1111 GdkRectangle mid_rect = { 1, 1, width - 2, 2 };
1112 GdkRectangle bot_rect = { 0, 3, width, height - 3 }; 1112 GdkRectangle bot_rect = { 0, 3, width, height - 3 };
1113 GdkRegion* mask = gdk_region_rectangle(&top_rect); 1113 GdkRegion* mask = gdk_region_rectangle(&top_rect);
1114 gdk_region_union_with_rect(mask, &mid_rect); 1114 gdk_region_union_with_rect(mask, &mid_rect);
1115 gdk_region_union_with_rect(mask, &bot_rect); 1115 gdk_region_union_with_rect(mask, &bot_rect);
1116 gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, mask, 0, 0); 1116 gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, mask, 0, 0);
1117 gdk_region_destroy(mask); 1117 gdk_region_destroy(mask);
1118 gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 1, 1118 gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 1,
1119 kFrameBorderThickness, kFrameBorderThickness, kFrameBorderThickness); 1119 kFrameBorderThickness, kFrameBorderThickness, kFrameBorderThickness);
1120 } else { 1120 } else {
1121 // Disable rounded corners. Simply passing in a NULL region doesn't 1121 if (use_custom_frame_.GetValue()) {
Evan Stade 2009/07/08 23:02:39 can you put the first line of the desc. as a comme
1122 // seem to work on KWin, so manually set the shape to the whole window. 1122 // Disable rounded corners. Simply passing in a NULL region doesn't
1123 GdkRectangle rect = { 0, 0, width, height }; 1123 // seem to work on KWin, so manually set the shape to the whole window.
1124 GdkRegion* mask = gdk_region_rectangle(&rect); 1124 GdkRectangle rect = { 0, 0, width, height };
1125 gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, mask, 0, 0); 1125 GdkRegion* mask = gdk_region_rectangle(&rect);
1126 gdk_region_destroy(mask); 1126 gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, mask, 0, 0);
1127 gdk_region_destroy(mask);
1128 } else {
1129 gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, NULL, 0, 0);
1130 }
1127 gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 0, 0, 0, 0); 1131 gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 0, 0, 0, 0);
1128 } 1132 }
1129 } 1133 }
1130 1134
1131 void BrowserWindowGtk::ConnectAccelerators() { 1135 void BrowserWindowGtk::ConnectAccelerators() {
1132 GtkAccelGroup* accel_group = gtk_accel_group_new(); 1136 GtkAccelGroup* accel_group = gtk_accel_group_new();
1133 gtk_window_add_accel_group(window_, accel_group); 1137 gtk_window_add_accel_group(window_, accel_group);
1134 // Drop the initial ref on |accel_group| so |window_| will own it. 1138 // Drop the initial ref on |accel_group| so |window_| will own it.
1135 g_object_unref(accel_group); 1139 g_object_unref(accel_group);
1136 1140
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 *edge = GDK_WINDOW_EDGE_NORTH_EAST; 1395 *edge = GDK_WINDOW_EDGE_NORTH_EAST;
1392 } else if (y < bounds_.height() - kResizeAreaCornerSize) { 1396 } else if (y < bounds_.height() - kResizeAreaCornerSize) {
1393 *edge = GDK_WINDOW_EDGE_EAST; 1397 *edge = GDK_WINDOW_EDGE_EAST;
1394 } else { 1398 } else {
1395 *edge = GDK_WINDOW_EDGE_SOUTH_EAST; 1399 *edge = GDK_WINDOW_EDGE_SOUTH_EAST;
1396 } 1400 }
1397 return true; 1401 return true;
1398 } 1402 }
1399 NOTREACHED(); 1403 NOTREACHED();
1400 } 1404 }
OLDNEW
« 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