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

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: minor cleanup 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..55215264b531f30aa16c1ccae4b2be737a772bb2 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::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() {

Powered by Google App Engine
This is Rietveld 408576698