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

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

Issue 347013: Linux: set minimum window size to 100x100 so it does not disappear with a cus... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | 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 <string> 10 #include <string>
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 1529
1530 void BrowserWindowGtk::BookmarkBarIsFloating(bool is_floating) { 1530 void BrowserWindowGtk::BookmarkBarIsFloating(bool is_floating) {
1531 toolbar_->UpdateForBookmarkBarVisibility(is_floating); 1531 toolbar_->UpdateForBookmarkBarVisibility(is_floating);
1532 1532
1533 // This can be NULL during initialization of the bookmark bar. 1533 // This can be NULL during initialization of the bookmark bar.
1534 if (bookmark_bar_.get()) 1534 if (bookmark_bar_.get())
1535 PlaceBookmarkBar(is_floating); 1535 PlaceBookmarkBar(is_floating);
1536 } 1536 }
1537 1537
1538 void BrowserWindowGtk::SetGeometryHints() { 1538 void BrowserWindowGtk::SetGeometryHints() {
1539 // Allow the user to resize us arbitrarily small. 1539 // Do not allow the user to resize us arbitrarily small. When using the
1540 // custom frame, the window can disappear entirely while resizing, or get
1541 // to a size that's very hard to resize.
1540 GdkGeometry geometry; 1542 GdkGeometry geometry;
1541 geometry.min_width = 1; 1543 geometry.min_width = 100;
1542 geometry.min_height = 1; 1544 geometry.min_height = 100;
1543 gtk_window_set_geometry_hints(window_, NULL, &geometry, GDK_HINT_MIN_SIZE); 1545 gtk_window_set_geometry_hints(window_, NULL, &geometry, GDK_HINT_MIN_SIZE);
1544 1546
1545 // If we call gtk_window_maximize followed by gtk_window_present, compiz gets 1547 // If we call gtk_window_maximize followed by gtk_window_present, compiz gets
1546 // confused and maximizes the window, but doesn't set the 1548 // confused and maximizes the window, but doesn't set the
1547 // GDK_WINDOW_STATE_MAXIMIZED bit. So instead, we keep track of whether to 1549 // GDK_WINDOW_STATE_MAXIMIZED bit. So instead, we keep track of whether to
1548 // maximize and call it after gtk_window_present. 1550 // maximize and call it after gtk_window_present.
1549 maximize_after_show_ = browser_->GetSavedMaximizedState(); 1551 maximize_after_show_ = browser_->GetSavedMaximizedState();
1550 1552
1551 gfx::Rect bounds = browser_->GetSavedWindowBounds(); 1553 gfx::Rect bounds = browser_->GetSavedWindowBounds();
1552 // We don't blindly call SetBounds here: that sets a forced position 1554 // We don't blindly call SetBounds here: that sets a forced position
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2298 // are taken from the WMs' source code. 2300 // are taken from the WMs' source code.
2299 return (wm_name == "Blackbox" || 2301 return (wm_name == "Blackbox" ||
2300 wm_name == "compiz" || 2302 wm_name == "compiz" ||
2301 wm_name == "e16" || // Enlightenment DR16 2303 wm_name == "e16" || // Enlightenment DR16
2302 wm_name == "KWin" || 2304 wm_name == "KWin" ||
2303 wm_name == "Metacity" || 2305 wm_name == "Metacity" ||
2304 wm_name == "Mutter" || 2306 wm_name == "Mutter" ||
2305 wm_name == "Openbox" || 2307 wm_name == "Openbox" ||
2306 wm_name == "Xfwm4"); 2308 wm_name == "Xfwm4");
2307 } 2309 }
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