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 507022: Fix issue 11258: Linux: gracefully handle small browser window... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/gtk/download_shelf_gtk.cc » ('j') | 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 <string> 10 #include <string>
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 1576
1577 void BrowserWindowGtk::BookmarkBarIsFloating(bool is_floating) { 1577 void BrowserWindowGtk::BookmarkBarIsFloating(bool is_floating) {
1578 toolbar_->UpdateForBookmarkBarVisibility(is_floating); 1578 toolbar_->UpdateForBookmarkBarVisibility(is_floating);
1579 1579
1580 // This can be NULL during initialization of the bookmark bar. 1580 // This can be NULL during initialization of the bookmark bar.
1581 if (bookmark_bar_.get()) 1581 if (bookmark_bar_.get())
1582 PlaceBookmarkBar(is_floating); 1582 PlaceBookmarkBar(is_floating);
1583 } 1583 }
1584 1584
1585 void BrowserWindowGtk::SetGeometryHints() { 1585 void BrowserWindowGtk::SetGeometryHints() {
1586 // Do not allow the user to resize us arbitrarily small. When using the
1587 // custom frame, the window can disappear entirely while resizing, or get
1588 // to a size that's very hard to resize.
1589 GdkGeometry geometry;
1590 geometry.min_width = 100;
1591 geometry.min_height = 100;
1592 gtk_window_set_geometry_hints(window_, NULL, &geometry, GDK_HINT_MIN_SIZE);
1593
1594 // If we call gtk_window_maximize followed by gtk_window_present, compiz gets 1586 // If we call gtk_window_maximize followed by gtk_window_present, compiz gets
1595 // confused and maximizes the window, but doesn't set the 1587 // confused and maximizes the window, but doesn't set the
1596 // GDK_WINDOW_STATE_MAXIMIZED bit. So instead, we keep track of whether to 1588 // GDK_WINDOW_STATE_MAXIMIZED bit. So instead, we keep track of whether to
1597 // maximize and call it after gtk_window_present. 1589 // maximize and call it after gtk_window_present.
1598 maximize_after_show_ = browser_->GetSavedMaximizedState(); 1590 maximize_after_show_ = browser_->GetSavedMaximizedState();
1599 1591
1600 gfx::Rect bounds = browser_->GetSavedWindowBounds(); 1592 gfx::Rect bounds = browser_->GetSavedWindowBounds();
1601 // We don't blindly call SetBounds here: that sets a forced position 1593 // We don't blindly call SetBounds here: that sets a forced position
1602 // on the window and we intentionally *don't* do that for normal 1594 // on the window and we intentionally *don't* do that for normal
1603 // windows. Most programs do not restore their window position on 1595 // windows. Most programs do not restore their window position on
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
2393 // are taken from the WMs' source code. 2385 // are taken from the WMs' source code.
2394 return (wm_name == "Blackbox" || 2386 return (wm_name == "Blackbox" ||
2395 wm_name == "compiz" || 2387 wm_name == "compiz" ||
2396 wm_name == "e16" || // Enlightenment DR16 2388 wm_name == "e16" || // Enlightenment DR16
2397 wm_name == "KWin" || 2389 wm_name == "KWin" ||
2398 wm_name == "Metacity" || 2390 wm_name == "Metacity" ||
2399 wm_name == "Mutter" || 2391 wm_name == "Mutter" ||
2400 wm_name == "Openbox" || 2392 wm_name == "Openbox" ||
2401 wm_name == "Xfwm4"); 2393 wm_name == "Xfwm4");
2402 } 2394 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/download_shelf_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698