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

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

Issue 10106008: Change Panel titlebars to activate the panel on click (rather than minimize). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GTK changes 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/docked_panel_strip.cc
diff --git a/chrome/browser/ui/panels/docked_panel_strip.cc b/chrome/browser/ui/panels/docked_panel_strip.cc
index ad9118f9fe4200452715fab5a05e4bc5e6b19d61..9651609739fac5d1c82fb72f6d5006a744de1d4c 100644
--- a/chrome/browser/ui/panels/docked_panel_strip.cc
+++ b/chrome/browser/ui/panels/docked_panel_strip.cc
@@ -426,6 +426,10 @@ void DockedPanelStrip::DragRight(Panel* dragging_panel) {
void DockedPanelStrip::EndDraggingPanelWithinStrip(Panel* panel, bool aborted) {
dragging_panel_current_iterator_ = panels_.end();
+ // Ensure dragging a minimized panel did not activate it.
+ if (IsPanelMinimized(panel) && panel->IsActive())
+ panel->Deactivate();
Dmitry Titov 2012/04/18 01:49:46 We should reliably prevent activation while draggi
jennb 2012/04/24 18:47:14 Moved work-around into PanelBrowserView as it is W
+
// Calls RefreshLayout to update the dragging panel to its final position
// when the drag ends normally. Otherwise, the drag within this strip is
// aborted because either the drag enters other strip or the drag is
@@ -504,9 +508,8 @@ void DockedPanelStrip::OnPanelTitlebarClicked(Panel* panel,
DCHECK_EQ(this, panel->panel_strip());
if (modifier == panel::APPLY_TO_ALL)
ToggleMinimizeAll(panel);
-
- // TODO(jennb): Move all other titlebar click handling here.
- // (http://crbug.com/118431)
+ else
+ panel->Activate(); // Will expand a minimized panel.
Dmitry Titov 2012/04/18 01:49:46 We should activate on mousedown. This is the 'norm
jianli 2012/04/18 22:18:47 Just as dimich pointed out, Activate call is not n
jennb 2012/04/24 18:47:14 Removed. See adjustments to Panel::OnTitlebarClick
}
void DockedPanelStrip::ActivatePanel(Panel* panel) {

Powered by Google App Engine
This is Rietveld 408576698