| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 | 657 |
| 658 void BrowserWindowGtk::SetBounds(const gfx::Rect& bounds) { | 658 void BrowserWindowGtk::SetBounds(const gfx::Rect& bounds) { |
| 659 SetBoundsImpl(bounds, true); | 659 SetBoundsImpl(bounds, true); |
| 660 } | 660 } |
| 661 | 661 |
| 662 void BrowserWindowGtk::Close() { | 662 void BrowserWindowGtk::Close() { |
| 663 // We're already closing. Do nothing. | 663 // We're already closing. Do nothing. |
| 664 if (!window_) | 664 if (!window_) |
| 665 return; | 665 return; |
| 666 | 666 |
| 667 // Sometimes the tabstrip will get stuck thinking it's in a drag session. | |
| 668 // Short of figuring out a repro case and actually solving the problem, this | |
| 669 // is the best way to avoid an immortal window. See http://crbug.com/23733 | |
| 670 tabstrip_->CancelActiveDragSession(); | |
| 671 | |
| 672 if (!CanClose()) | 667 if (!CanClose()) |
| 673 return; | 668 return; |
| 674 | 669 |
| 675 // We're going to destroy the window, make sure the tab strip isn't running | 670 // We're going to destroy the window, make sure the tab strip isn't running |
| 676 // any animations which may still reference GtkWidgets. | 671 // any animations which may still reference GtkWidgets. |
| 677 tabstrip_->StopAnimation(); | 672 tabstrip_->StopAnimation(); |
| 678 | 673 |
| 679 SaveWindowPosition(); | 674 SaveWindowPosition(); |
| 680 | 675 |
| 681 if (accel_group_) { | 676 if (accel_group_) { |
| (...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2146 // special-case the ones where the custom frame should be used. These names | 2141 // special-case the ones where the custom frame should be used. These names |
| 2147 // are taken from the WMs' source code. | 2142 // are taken from the WMs' source code. |
| 2148 return (wm_name == "Blackbox" || | 2143 return (wm_name == "Blackbox" || |
| 2149 wm_name == "compiz" || | 2144 wm_name == "compiz" || |
| 2150 wm_name == "e16" || // Enlightenment DR16 | 2145 wm_name == "e16" || // Enlightenment DR16 |
| 2151 wm_name == "Metacity" || | 2146 wm_name == "Metacity" || |
| 2152 wm_name == "Mutter" || | 2147 wm_name == "Mutter" || |
| 2153 wm_name == "Openbox" || | 2148 wm_name == "Openbox" || |
| 2154 wm_name == "Xfwm4"); | 2149 wm_name == "Xfwm4"); |
| 2155 } | 2150 } |
| OLD | NEW |