Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/workspace/frame_maximize_button.h" | 5 #include "ash/wm/workspace/frame_maximize_button.h" |
| 6 | 6 |
| 7 #include "ash/launcher/launcher.h" | 7 #include "ash/launcher/launcher.h" |
| 8 #include "ash/screen_ash.h" | 8 #include "ash/screen_ash.h" |
| 9 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 // Before the window gets destroyed, the maximizer dialog needs to be shut | 102 // Before the window gets destroyed, the maximizer dialog needs to be shut |
| 103 // down since it would otherwise call into a deleted object. | 103 // down since it would otherwise call into a deleted object. |
| 104 maximizer_.reset(); | 104 maximizer_.reset(); |
| 105 if (widget_) | 105 if (widget_) |
| 106 OnWindowDestroying(widget_->GetNativeWindow()); | 106 OnWindowDestroying(widget_->GetNativeWindow()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void FrameMaximizeButton::SnapButtonHovered(SnapType type) { | 109 void FrameMaximizeButton::SnapButtonHovered(SnapType type) { |
| 110 // Make sure to only show hover operations when no button is pressed and | 110 // Make sure to only show hover operations when no button is pressed and |
| 111 // a similar snap operation in progress does not get re-applied. | 111 // a similar snap operation in progress does not get re-applied. |
| 112 if (is_snap_enabled_ || (type == snap_type_ && snap_sizer_)) | 112 if (is_snap_enabled_) |
| 113 return; | 113 return; |
| 114 // Prime the mouse location with the center of the (local) button. | 114 // Prime the mouse location with the center of the (local) button. |
| 115 press_location_ = gfx::Point(width() / 2, height() / 2); | 115 press_location_ = gfx::Point(width() / 2, height() / 2); |
| 116 // Then get an adjusted mouse position to initiate the effect. | 116 // Then get an adjusted mouse position to initiate the effect. |
| 117 gfx::Point location = press_location_; | 117 gfx::Point location = press_location_; |
| 118 switch (type) { | 118 switch (type) { |
| 119 case SNAP_LEFT: | 119 case SNAP_LEFT: |
| 120 location.set_x(location.x() - width()); | 120 location.set_x(location.x() - width()); |
| 121 break; | 121 break; |
| 122 case SNAP_RIGHT: | 122 case SNAP_RIGHT: |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 149 void FrameMaximizeButton::ExecuteSnapAndCloseMenu(SnapType snap_type) { | 149 void FrameMaximizeButton::ExecuteSnapAndCloseMenu(SnapType snap_type) { |
| 150 // We can come here with no snap type set in case that the mouse opened the | 150 // We can come here with no snap type set in case that the mouse opened the |
| 151 // maximize button and a touch event "touched" a button. | 151 // maximize button and a touch event "touched" a button. |
| 152 if (snap_type_ == SNAP_NONE) | 152 if (snap_type_ == SNAP_NONE) |
| 153 SnapButtonHovered(snap_type); | 153 SnapButtonHovered(snap_type); |
| 154 | 154 |
| 155 Cancel(true); | 155 Cancel(true); |
| 156 // Tell our menu to close. | 156 // Tell our menu to close. |
| 157 maximizer_.reset(); | 157 maximizer_.reset(); |
| 158 snap_type_ = snap_type; | 158 snap_type_ = snap_type; |
| 159 // Since Snap might destroy |this|, but the snap_sizer needs to be destroyed, | 159 Snap(); |
| 160 // The ownership of the snap_sizer is taken now. | |
| 161 scoped_ptr<SnapSizer> snap_sizer(snap_sizer_.release()); | |
| 162 Snap(*snap_sizer.get()); | |
| 163 } | 160 } |
| 164 | 161 |
| 165 void FrameMaximizeButton::DestroyMaximizeMenu() { | 162 void FrameMaximizeButton::DestroyMaximizeMenu() { |
| 166 Cancel(false); | 163 Cancel(false); |
| 167 } | 164 } |
| 168 | 165 |
| 169 void FrameMaximizeButton::OnWindowBoundsChanged( | 166 void FrameMaximizeButton::OnWindowBoundsChanged( |
| 170 aura::Window* window, | 167 aura::Window* window, |
| 171 const gfx::Rect& old_bounds, | 168 const gfx::Rect& old_bounds, |
| 172 const gfx::Rect& new_bounds) { | 169 const gfx::Rect& new_bounds) { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 331 // Prepare the help menu. | 328 // Prepare the help menu. |
| 332 if (!maximizer_) { | 329 if (!maximizer_) { |
| 333 maximizer_.reset(new MaximizeBubbleController( | 330 maximizer_.reset(new MaximizeBubbleController( |
| 334 this, | 331 this, |
| 335 GetMaximizeBubbleFrameState(), | 332 GetMaximizeBubbleFrameState(), |
| 336 bubble_appearance_delay_ms_)); | 333 bubble_appearance_delay_ms_)); |
| 337 } else { | 334 } else { |
| 338 // If the menu did not show up yet, we delay it even a bit more. | 335 // If the menu did not show up yet, we delay it even a bit more. |
| 339 maximizer_->DelayCreation(); | 336 maximizer_->DelayCreation(); |
| 340 } | 337 } |
| 341 snap_sizer_.reset(NULL); | |
| 342 InstallEventFilter(); | 338 InstallEventFilter(); |
| 343 snap_type_ = SNAP_NONE; | 339 snap_type_ = SNAP_NONE; |
| 344 press_location_ = event.location(); | 340 press_location_ = event.location(); |
| 345 press_is_gesture_ = event.IsGestureEvent(); | 341 press_is_gesture_ = event.IsGestureEvent(); |
| 346 exceeded_drag_threshold_ = false; | 342 exceeded_drag_threshold_ = false; |
| 347 update_timer_.Start( | 343 update_timer_.Start( |
| 348 FROM_HERE, | 344 FROM_HERE, |
| 349 base::TimeDelta::FromMilliseconds(kUpdateDelayMS), | 345 base::TimeDelta::FromMilliseconds(kUpdateDelayMS), |
| 350 this, | 346 this, |
| 351 &FrameMaximizeButton::UpdateSnapFromEventLocation); | 347 &FrameMaximizeButton::UpdateSnapFromEventLocation); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 371 maximizer_.reset(); | 367 maximizer_.reset(); |
| 372 | 368 |
| 373 if (!should_snap || snap_type_ == SNAP_NONE) | 369 if (!should_snap || snap_type_ == SNAP_NONE) |
| 374 return false; | 370 return false; |
| 375 | 371 |
| 376 SetState(views::CustomButton::STATE_NORMAL); | 372 SetState(views::CustomButton::STATE_NORMAL); |
| 377 // SetState will not call SchedulePaint() if state was already set to | 373 // SetState will not call SchedulePaint() if state was already set to |
| 378 // STATE_NORMAL during a drag. | 374 // STATE_NORMAL during a drag. |
| 379 SchedulePaint(); | 375 SchedulePaint(); |
| 380 phantom_window_.reset(); | 376 phantom_window_.reset(); |
| 381 // Since Snap might destroy |this|, but the snap_sizer needs to be destroyed, | 377 Snap(); |
| 382 // The ownership of the snap_sizer is taken now. | |
| 383 scoped_ptr<SnapSizer> snap_sizer(snap_sizer_.release()); | |
| 384 Snap(*snap_sizer.get()); | |
| 385 return true; | 378 return true; |
| 386 } | 379 } |
| 387 | 380 |
| 388 void FrameMaximizeButton::Cancel(bool keep_menu_open) { | 381 void FrameMaximizeButton::Cancel(bool keep_menu_open) { |
| 389 if (!keep_menu_open) { | 382 if (!keep_menu_open) { |
| 390 maximizer_.reset(); | 383 maximizer_.reset(); |
| 391 UninstallEventFilter(); | 384 UninstallEventFilter(); |
| 392 is_snap_enabled_ = false; | 385 is_snap_enabled_ = false; |
| 393 snap_sizer_.reset(); | |
| 394 } | 386 } |
| 395 phantom_window_.reset(); | 387 phantom_window_.reset(); |
| 396 snap_type_ = SNAP_NONE; | 388 snap_type_ = SNAP_NONE; |
| 397 update_timer_.Stop(); | 389 update_timer_.Stop(); |
| 398 SchedulePaint(); | 390 SchedulePaint(); |
| 399 } | 391 } |
| 400 | 392 |
| 401 void FrameMaximizeButton::InstallEventFilter() { | 393 void FrameMaximizeButton::InstallEventFilter() { |
| 402 if (escape_event_filter_) | 394 if (escape_event_filter_) |
| 403 return; | 395 return; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 414 if (exceeded_drag_threshold_) | 406 if (exceeded_drag_threshold_) |
| 415 return; | 407 return; |
| 416 exceeded_drag_threshold_ = true; | 408 exceeded_drag_threshold_ = true; |
| 417 UpdateSnap(press_location_, false, press_is_gesture_); | 409 UpdateSnap(press_location_, false, press_is_gesture_); |
| 418 } | 410 } |
| 419 | 411 |
| 420 void FrameMaximizeButton::UpdateSnap(const gfx::Point& location, | 412 void FrameMaximizeButton::UpdateSnap(const gfx::Point& location, |
| 421 bool select_default, | 413 bool select_default, |
| 422 bool is_touch) { | 414 bool is_touch) { |
| 423 SnapType type = SnapTypeForLocation(location); | 415 SnapType type = SnapTypeForLocation(location); |
| 424 if (type == snap_type_) { | 416 if (type == snap_type_) |
| 425 if (snap_sizer_) { | |
| 426 snap_sizer_->Update(LocationForSnapSizer(location)); | |
| 427 phantom_window_->Show(ScreenAsh::ConvertRectToScreen( | |
| 428 frame_->GetWidget()->GetNativeView()->parent(), | |
| 429 snap_sizer_->target_bounds())); | |
| 430 } | |
| 431 return; | 417 return; |
| 432 } | |
| 433 | 418 |
| 434 snap_type_ = type; | 419 snap_type_ = type; |
| 435 snap_sizer_.reset(); | |
| 436 SchedulePaint(); | 420 SchedulePaint(); |
| 437 | 421 |
| 438 if (snap_type_ == SNAP_NONE) { | 422 if (snap_type_ == SNAP_NONE) { |
| 439 phantom_window_.reset(); | 423 phantom_window_.reset(); |
| 440 return; | 424 return; |
| 441 } | 425 } |
| 442 | 426 |
| 443 if (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT) { | |
| 444 SnapSizer::Edge snap_edge = snap_type_ == SNAP_LEFT ? | |
| 445 SnapSizer::LEFT_EDGE : SnapSizer::RIGHT_EDGE; | |
| 446 SnapSizer::InputType input_type = | |
| 447 is_touch ? SnapSizer::TOUCH_MAXIMIZE_BUTTON_INPUT : | |
| 448 SnapSizer::OTHER_INPUT; | |
| 449 snap_sizer_.reset(new SnapSizer(frame_->GetWidget()->GetNativeWindow(), | |
| 450 LocationForSnapSizer(location), | |
| 451 snap_edge, | |
| 452 input_type)); | |
| 453 if (select_default) | |
| 454 snap_sizer_->SelectDefaultSizeAndDisableResize(); | |
| 455 } | |
| 456 if (!phantom_window_) { | 427 if (!phantom_window_) { |
| 457 phantom_window_.reset(new internal::PhantomWindowController( | 428 phantom_window_.reset(new internal::PhantomWindowController( |
| 458 frame_->GetWidget()->GetNativeWindow())); | 429 frame_->GetWidget()->GetNativeWindow())); |
| 459 } | 430 } |
| 460 if (maximizer_) { | 431 if (maximizer_) { |
| 461 phantom_window_->set_phantom_below_window(maximizer_->GetBubbleWindow()); | 432 phantom_window_->set_phantom_below_window(maximizer_->GetBubbleWindow()); |
| 462 maximizer_->SetSnapType(snap_type_); | 433 maximizer_->SetSnapType(snap_type_); |
| 463 } | 434 } |
| 464 phantom_window_->Show( | 435 phantom_window_->Show(ScreenBoundsForType(snap_type_)); |
| 465 ScreenBoundsForType(snap_type_, *snap_sizer_.get())); | |
| 466 } | 436 } |
| 467 | 437 |
| 468 SnapType FrameMaximizeButton::SnapTypeForLocation( | 438 SnapType FrameMaximizeButton::SnapTypeForLocation( |
| 469 const gfx::Point& location) const { | 439 const gfx::Point& location) const { |
| 470 MaximizeBubbleFrameState maximize_type = GetMaximizeBubbleFrameState(); | 440 MaximizeBubbleFrameState maximize_type = GetMaximizeBubbleFrameState(); |
| 471 gfx::Vector2d delta(location - press_location_); | 441 gfx::Vector2d delta(location - press_location_); |
| 472 if (!views::View::ExceededDragThreshold(delta)) | 442 if (!views::View::ExceededDragThreshold(delta)) |
| 473 return maximize_type != FRAME_STATE_FULL ? SNAP_MAXIMIZE : SNAP_RESTORE; | 443 return maximize_type != FRAME_STATE_FULL ? SNAP_MAXIMIZE : SNAP_RESTORE; |
| 474 if (delta.x() < 0 && delta.y() > delta.x() && delta.y() < -delta.x()) | 444 if (delta.x() < 0 && delta.y() > delta.x() && delta.y() < -delta.x()) |
| 475 return maximize_type == FRAME_STATE_SNAP_LEFT ? SNAP_RESTORE : SNAP_LEFT; | 445 return maximize_type == FRAME_STATE_SNAP_LEFT ? SNAP_RESTORE : SNAP_LEFT; |
| 476 if (delta.x() > 0 && delta.y() > -delta.x() && delta.y() < delta.x()) | 446 if (delta.x() > 0 && delta.y() > -delta.x() && delta.y() < delta.x()) |
| 477 return maximize_type == FRAME_STATE_SNAP_RIGHT ? SNAP_RESTORE : SNAP_RIGHT; | 447 return maximize_type == FRAME_STATE_SNAP_RIGHT ? SNAP_RESTORE : SNAP_RIGHT; |
| 478 if (delta.y() > 0) | 448 if (delta.y() > 0) |
| 479 return SNAP_MINIMIZE; | 449 return SNAP_MINIMIZE; |
| 480 return maximize_type != FRAME_STATE_FULL ? SNAP_MAXIMIZE : SNAP_RESTORE; | 450 return maximize_type != FRAME_STATE_FULL ? SNAP_MAXIMIZE : SNAP_RESTORE; |
| 481 } | 451 } |
| 482 | 452 |
| 483 gfx::Rect FrameMaximizeButton::ScreenBoundsForType( | 453 gfx::Rect FrameMaximizeButton::ScreenBoundsForType(SnapType type) const { |
| 484 SnapType type, | |
| 485 const SnapSizer& snap_sizer) const { | |
| 486 aura::Window* window = frame_->GetWidget()->GetNativeWindow(); | 454 aura::Window* window = frame_->GetWidget()->GetNativeWindow(); |
| 487 switch (type) { | 455 switch (type) { |
| 488 case SNAP_LEFT: | 456 case SNAP_LEFT: |
| 489 case SNAP_RIGHT: | 457 case SNAP_RIGHT: { |
| 490 return ScreenAsh::ConvertRectToScreen( | 458 SnapSizer snap_sizer( |
| 491 frame_->GetWidget()->GetNativeView()->parent(), | 459 window, |
| 492 snap_sizer.target_bounds()); | 460 gfx::Point(), |
| 461 (type == SNAP_LEFT) ? SnapSizer::LEFT_EDGE : SnapSizer::RIGHT_EDGE, | |
| 462 SnapSizer::STEP_NO); | |
| 463 return snap_sizer.target_bounds(); | |
|
varkha
2013/08/30 17:13:25
Does it not need to be in screen coordinates? I th
pkotwicz
2013/08/30 21:10:57
Nice catch!
| |
| 464 } | |
| 493 case SNAP_MAXIMIZE: | 465 case SNAP_MAXIMIZE: |
| 494 return ScreenAsh::ConvertRectToScreen( | 466 return ScreenAsh::ConvertRectToScreen( |
| 495 window->parent(), | 467 window->parent(), |
| 496 ScreenAsh::GetMaximizedWindowBoundsInParent(window)); | 468 ScreenAsh::GetMaximizedWindowBoundsInParent(window)); |
| 497 case SNAP_MINIMIZE: { | 469 case SNAP_MINIMIZE: { |
| 498 gfx::Rect rect = GetMinimizeAnimationTargetBoundsInScreen(window); | 470 gfx::Rect rect = GetMinimizeAnimationTargetBoundsInScreen(window); |
| 499 if (!rect.IsEmpty()) { | 471 if (!rect.IsEmpty()) { |
| 500 // PhantomWindowController insets slightly, outset it so the phantom | 472 // PhantomWindowController insets slightly, outset it so the phantom |
| 501 // doesn't appear inset. | 473 // doesn't appear inset. |
| 502 rect.Inset(-8, -8); | 474 rect.Inset(-8, -8); |
| 503 } | 475 } |
| 504 return rect; | 476 return rect; |
| 505 } | 477 } |
| 506 case SNAP_RESTORE: { | 478 case SNAP_RESTORE: { |
| 507 const gfx::Rect* restore = GetRestoreBoundsInScreen(window); | 479 const gfx::Rect* restore = GetRestoreBoundsInScreen(window); |
| 508 return restore ? | 480 return restore ? |
| 509 *restore : frame_->GetWidget()->GetWindowBoundsInScreen(); | 481 *restore : frame_->GetWidget()->GetWindowBoundsInScreen(); |
| 510 } | 482 } |
| 511 case SNAP_NONE: | 483 case SNAP_NONE: |
| 512 NOTREACHED(); | 484 NOTREACHED(); |
| 513 } | 485 } |
| 514 return gfx::Rect(); | 486 return gfx::Rect(); |
| 515 } | 487 } |
| 516 | 488 |
| 517 gfx::Point FrameMaximizeButton::LocationForSnapSizer( | 489 void FrameMaximizeButton::Snap() { |
| 518 const gfx::Point& location) const { | |
| 519 gfx::Point result(location); | |
| 520 views::View::ConvertPointToScreen(this, &result); | |
| 521 return result; | |
| 522 } | |
| 523 | |
| 524 void FrameMaximizeButton::Snap(const SnapSizer& snap_sizer) { | |
| 525 ash::Shell* shell = ash::Shell::GetInstance(); | 490 ash::Shell* shell = ash::Shell::GetInstance(); |
| 526 views::Widget* widget = frame_->GetWidget(); | 491 views::Widget* widget = frame_->GetWidget(); |
| 527 switch (snap_type_) { | 492 switch (snap_type_) { |
| 528 case SNAP_LEFT: | 493 case SNAP_LEFT: |
| 494 shell->delegate()->RecordUserMetricsAction( | |
| 495 ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_LEFT); | |
|
varkha
2013/08/30 17:13:25
It would be nice to add UMA metrics to workspace r
pkotwicz
2013/08/30 21:10:57
I think it belongs in a separate CL from this CL a
| |
| 496 SnapSizer::SnapWindow(widget->GetNativeView(), | |
| 497 SnapSizer::LEFT_EDGE, | |
| 498 SnapSizer::STEP_NO); | |
| 499 break; | |
|
varkha
2013/08/30 17:13:25
Would it be simpler and less code duplication if y
pkotwicz
2013/08/30 21:10:57
I think this way is clearer. Note that a different
| |
| 529 case SNAP_RIGHT: { | 500 case SNAP_RIGHT: { |
| 530 shell->delegate()->RecordUserMetricsAction( | 501 shell->delegate()->RecordUserMetricsAction( |
| 531 snap_type_ == SNAP_LEFT ? | 502 ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_RIGHT); |
| 532 ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_LEFT : | 503 SnapSizer::SnapWindow(widget->GetNativeView(), |
| 533 ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_RIGHT); | 504 SnapSizer::RIGHT_EDGE, |
| 534 // Get the bounds in screen coordinates for restore purposes. | 505 SnapSizer::STEP_NO); |
| 535 gfx::Rect restore = widget->GetWindowBoundsInScreen(); | |
| 536 if (widget->IsMaximized() || widget->IsFullscreen()) { | |
| 537 aura::Window* window = widget->GetNativeWindow(); | |
| 538 // In case of maximized we have a restore boundary. | |
| 539 DCHECK(ash::GetRestoreBoundsInScreen(window)); | |
| 540 // If it was maximized we need to recover the old restore set. | |
| 541 restore = *ash::GetRestoreBoundsInScreen(window); | |
| 542 | |
| 543 // The auto position manager will kick in when this is the only window. | |
| 544 // To avoid interference with it we tell it temporarily to not change | |
| 545 // the coordinates of this window. | |
| 546 bool is_managed = ash::wm::IsWindowPositionManaged(window); | |
| 547 if (is_managed) | |
| 548 ash::wm::SetWindowPositionManaged(window, false); | |
| 549 | |
| 550 // Set the restore size we want to restore to. | |
| 551 ash::SetRestoreBoundsInScreen(window, | |
| 552 ScreenBoundsForType(snap_type_, | |
| 553 snap_sizer)); | |
| 554 widget->Restore(); | |
| 555 | |
| 556 // After the window is where we want it to be we allow the window to be | |
| 557 // auto managed again. | |
| 558 if (is_managed) | |
| 559 ash::wm::SetWindowPositionManaged(window, true); | |
| 560 } else { | |
| 561 // Others might also have set up a restore rectangle already. If so, | |
| 562 // we should not overwrite the restore rectangle. | |
| 563 bool restore_set = | |
| 564 GetRestoreBoundsInScreen(widget->GetNativeWindow()) != NULL; | |
| 565 widget->SetBounds(ScreenBoundsForType(snap_type_, snap_sizer)); | |
| 566 if (restore_set) | |
| 567 break; | |
| 568 } | |
| 569 // Remember the widow's bounds for restoration. | |
| 570 ash::SetRestoreBoundsInScreen(widget->GetNativeWindow(), restore); | |
| 571 break; | 506 break; |
| 572 } | 507 } |
| 573 case SNAP_MAXIMIZE: | 508 case SNAP_MAXIMIZE: |
| 574 widget->Maximize(); | 509 widget->Maximize(); |
| 575 shell->delegate()->RecordUserMetricsAction( | 510 shell->delegate()->RecordUserMetricsAction( |
| 576 ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE); | 511 ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE); |
| 577 break; | 512 break; |
| 578 case SNAP_MINIMIZE: | 513 case SNAP_MINIMIZE: |
| 579 widget->Minimize(); | 514 widget->Minimize(); |
| 580 shell->delegate()->RecordUserMetricsAction( | 515 shell->delegate()->RecordUserMetricsAction( |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 615 return FRAME_STATE_SNAP_LEFT; | 550 return FRAME_STATE_SNAP_LEFT; |
| 616 if (bounds.right() == screen.right()) | 551 if (bounds.right() == screen.right()) |
| 617 return FRAME_STATE_SNAP_RIGHT; | 552 return FRAME_STATE_SNAP_RIGHT; |
| 618 // If we come here, it is likely caused by the fact that the | 553 // If we come here, it is likely caused by the fact that the |
| 619 // "VerticalResizeDoubleClick" stored a restore rectangle. In that case | 554 // "VerticalResizeDoubleClick" stored a restore rectangle. In that case |
| 620 // we allow all maximize operations (and keep the restore rectangle). | 555 // we allow all maximize operations (and keep the restore rectangle). |
| 621 return FRAME_STATE_NONE; | 556 return FRAME_STATE_NONE; |
| 622 } | 557 } |
| 623 | 558 |
| 624 } // namespace ash | 559 } // namespace ash |
| OLD | NEW |