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

Unified Diff: ash/wm/dock/docked_window_resizer.cc

Issue 597683003: Add window states docked; and docked minimized. Add wm window event to set docked and undocked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dock
Patch Set: Created 6 years, 3 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: ash/wm/dock/docked_window_resizer.cc
diff --git a/ash/wm/dock/docked_window_resizer.cc b/ash/wm/dock/docked_window_resizer.cc
index 14b58d408fe53eb12eca8c96538a33b537877fe6..d9c5daeb0d7e4185318a8d93a815d188beae23ff 100644
--- a/ash/wm/dock/docked_window_resizer.cc
+++ b/ash/wm/dock/docked_window_resizer.cc
@@ -15,6 +15,7 @@
#include "ash/wm/dock/docked_window_layout_manager.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
+#include "ash/wm/wm_event.h"
#include "ash/wm/workspace/magnetism_matcher.h"
#include "ash/wm/workspace/workspace_window_resizer.h"
#include "base/command_line.h"
@@ -243,6 +244,12 @@ void DockedWindowResizer::FinishedDragging(
window_state_->SetRestoreBoundsInScreen(restore_bounds);
}
+ if (move_result != aura::client::MOVE_CANCELED && is_docked_ != was_docked_) {
+ const wm::WMEvent event(is_docked_ ? wm::WM_EVENT_DOCK :
+ wm::WM_EVENT_UNDOCK);
varkha 2014/09/23 22:35:31 Would WM_EVENT_NORMAL work just as well as WM_EVEN
dtapuska 2014/09/24 15:21:13 This is what I originally had. I didn't have the W
dtapuska 2014/09/26 14:17:07 Done.
dtapuska 2014/09/26 14:17:07 Done.
+ window_state_->OnWMEvent(&event);
varkha 2014/09/23 22:35:31 Is this clean in all the cases where MaybeReparent
+ }
+
// Check if the window needs to be docked or returned to workspace.
DockedAction action = MaybeReparentWindowOnDragCompletion(is_resized,
is_attached_panel);

Powered by Google App Engine
This is Rietveld 408576698