| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include <dlfcn.h> | 9 #include <dlfcn.h> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 GTK_FLOATING_CONTAINER(render_area_floating_container_))); | 1376 GTK_FLOATING_CONTAINER(render_area_floating_container_))); |
| 1377 } | 1377 } |
| 1378 gtk_widget_hide(toolbar_border_); | 1378 gtk_widget_hide(toolbar_border_); |
| 1379 } else { | 1379 } else { |
| 1380 fullscreen_exit_bubble_.reset(); | 1380 fullscreen_exit_bubble_.reset(); |
| 1381 UpdateCustomFrame(); | 1381 UpdateCustomFrame(); |
| 1382 ShowSupportedWindowFeatures(); | 1382 ShowSupportedWindowFeatures(); |
| 1383 } | 1383 } |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); |
| 1386 UpdateWindowShape(bounds_.width(), bounds_.height()); | 1387 UpdateWindowShape(bounds_.width(), bounds_.height()); |
| 1387 SaveWindowPosition(); | 1388 SaveWindowPosition(); |
| 1388 return FALSE; | 1389 return FALSE; |
| 1389 } | 1390 } |
| 1390 | 1391 |
| 1391 // Callback for the delete event. This event is fired when the user tries to | 1392 // Callback for the delete event. This event is fired when the user tries to |
| 1392 // close the window (e.g., clicking on the X in the window manager title bar). | 1393 // close the window (e.g., clicking on the X in the window manager title bar). |
| 1393 gboolean BrowserWindowGtk::OnMainWindowDeleteEvent(GtkWidget* widget, | 1394 gboolean BrowserWindowGtk::OnMainWindowDeleteEvent(GtkWidget* widget, |
| 1394 GdkEvent* event) { | 1395 GdkEvent* event) { |
| 1395 Close(); | 1396 Close(); |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2341 // system decorations for the few (?) tiling window managers where the custom | 2342 // system decorations for the few (?) tiling window managers where the custom |
| 2342 // frame doesn't make sense (e.g. awesome, ion3, ratpoison, xmonad, etc.) or | 2343 // frame doesn't make sense (e.g. awesome, ion3, ratpoison, xmonad, etc.) or |
| 2343 // other WMs where it has issues (e.g. Fluxbox -- see issue 19130). The EWMH | 2344 // other WMs where it has issues (e.g. Fluxbox -- see issue 19130). The EWMH |
| 2344 // _NET_SUPPORTING_WM property makes it easy to look up a name for the current | 2345 // _NET_SUPPORTING_WM property makes it easy to look up a name for the current |
| 2345 // WM, but at least some of the WMs in the latter group don't set it. | 2346 // WM, but at least some of the WMs in the latter group don't set it. |
| 2346 // Instead, we default to using system decorations for all WMs and | 2347 // Instead, we default to using system decorations for all WMs and |
| 2347 // special-case the ones where the custom frame should be used. These names | 2348 // special-case the ones where the custom frame should be used. These names |
| 2348 // are taken from the WMs' source code. | 2349 // are taken from the WMs' source code. |
| 2349 return (wm_name == "Blackbox" || | 2350 return (wm_name == "Blackbox" || |
| 2350 wm_name == "compiz" || | 2351 wm_name == "compiz" || |
| 2352 wm_name == "Compiz" || |
| 2351 wm_name == "e16" || // Enlightenment DR16 | 2353 wm_name == "e16" || // Enlightenment DR16 |
| 2352 wm_name == "Metacity" || | 2354 wm_name == "Metacity" || |
| 2353 wm_name == "Mutter" || | 2355 wm_name == "Mutter" || |
| 2354 wm_name == "Openbox" || | 2356 wm_name == "Openbox" || |
| 2355 wm_name == "Xfwm4"); | 2357 wm_name == "Xfwm4"); |
| 2356 } | 2358 } |
| OLD | NEW |