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

Unified Diff: chrome/browser/ui/panels/panel_browser_window_gtk.cc

Issue 10066032: Enable user resizing for docked Panels (GTK and Mac). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/panels/panel_browser_window_gtk.cc
diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.cc b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
index a7b500b2ff2773e37cf31b16e353fd9291f4ed2d..b57311b02410d493bda3dd4e84ef3381902a320b 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
@@ -109,8 +109,24 @@ bool PanelBrowserWindowGtk::GetWindowEdge(int x, int y, GdkWindowEdge* edge) {
// This method is used by the base class to detect when the cursor has
// hit the window edge in order to change the cursor to a resize cursor
// and to detect when to initiate a resize drag.
- return panel_->CanResizeByMouse() ?
- BrowserWindowGtk::GetWindowEdge(x, y, edge) : FALSE;
+ panel::Resizability resizability = panel_->CanResizeByMouse();
+ if (panel::NOT_RESIZABLE == resizability)
+ return false;
+
+ if (!BrowserWindowGtk::GetWindowEdge(x, y, edge))
+ return FALSE;
+
+ // Special handling if bottom edge is not resizable.
+ if (panel::RESIZABLE_ALL_SIDES_EXCEPT_BOTTOM == resizability) {
+ if (*edge == GDK_WINDOW_EDGE_SOUTH)
+ return FALSE;
+ if (*edge == GDK_WINDOW_EDGE_SOUTH_WEST)
+ *edge = GDK_WINDOW_EDGE_WEST;
+ else if (*edge == GDK_WINDOW_EDGE_SOUTH_EAST)
+ *edge = GDK_WINDOW_EDGE_EAST;
+ }
+
+ return TRUE;
}
void PanelBrowserWindowGtk::EnsureDragHelperCreated() {
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_view_browsertest.cc ('k') | chrome/browser/ui/panels/panel_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698