Index: ash/common/wm/default_state.cc |
diff --git a/ash/common/wm/default_state.cc b/ash/common/wm/default_state.cc |
index 2579ff16311b176a91f3339c9ec329f23777443b..c8aacb8f0938435c631019d2b3995e3ef3e48bed 100644 |
--- a/ash/common/wm/default_state.cc |
+++ b/ash/common/wm/default_state.cc |
@@ -205,10 +205,12 @@ void DefaultState::OnWMEvent(WindowState* window_state, const WMEvent* event) { |
next_state_type = WINDOW_STATE_TYPE_INACTIVE; |
break; |
case WM_EVENT_PIN: |
- // TODO(hidehiko): Check if the window can be pinnable. If a system modal |
- // window is openening, or if there already is another pinned window, |
- // the pinning should fail. |
- next_state_type = WINDOW_STATE_TYPE_PINNED; |
+ // If there already is a pinned window, it is not allowed to set it |
+ // to this window. |
+ // TODO(hidehiko): If a system modal window is openening, the pinning |
+ // probably should fail. |
+ next_state_type = WmShell::Get()->IsPinned() ? current_state_type |
oshima
2016/06/18 04:47:44
you may want to log when the request wasn't fulfil
hidehiko
2016/06/18 05:32:45
Done.
|
+ : WINDOW_STATE_TYPE_PINNED; |
break; |
case WM_EVENT_TOGGLE_MAXIMIZE_CAPTION: |
case WM_EVENT_TOGGLE_MAXIMIZE: |