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

Side by Side Diff: components/exo/wayland/server.cc

Issue 2704173002: Update the layout mode first when exiting tablet mode (Closed)
Patch Set: . Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/exo/wayland/server.h" 5 #include "components/exo/wayland/server.h"
6 6
7 #include <alpha-compositing-unstable-v1-server-protocol.h> 7 #include <alpha-compositing-unstable-v1-server-protocol.h>
8 #include <gaming-input-unstable-v1-server-protocol.h> 8 #include <gaming-input-unstable-v1-server-protocol.h>
9 #include <grp.h> 9 #include <grp.h>
10 #include <keyboard-configuration-unstable-v1-server-protocol.h> 10 #include <keyboard-configuration-unstable-v1-server-protocol.h>
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 DISPLAY_METRIC_ROTATION | DISPLAY_METRIC_WORK_AREA)) { 2073 DISPLAY_METRIC_ROTATION | DISPLAY_METRIC_WORK_AREA)) {
2074 ScheduleSendDisplayMetrics(0); 2074 ScheduleSendDisplayMetrics(0);
2075 } 2075 }
2076 } 2076 }
2077 2077
2078 // Overridden from WMHelper::MaximizeModeObserver: 2078 // Overridden from WMHelper::MaximizeModeObserver:
2079 void OnMaximizeModeStarted() override { 2079 void OnMaximizeModeStarted() override {
2080 layout_mode_ = ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET; 2080 layout_mode_ = ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET;
2081 ScheduleSendDisplayMetrics(kConfigureDelayAfterLayoutSwitchMs); 2081 ScheduleSendDisplayMetrics(kConfigureDelayAfterLayoutSwitchMs);
2082 } 2082 }
2083 void OnMaximizeModeEnded() override { 2083 void OnMaximizeModeEnding() override {
2084 layout_mode_ = ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED; 2084 layout_mode_ = ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED;
2085 ScheduleSendDisplayMetrics(kConfigureDelayAfterLayoutSwitchMs); 2085 ScheduleSendDisplayMetrics(kConfigureDelayAfterLayoutSwitchMs);
2086 } 2086 }
2087 void OnMaximizeModeEnded() override {}
2087 2088
2088 // Overridden from WMHelper::ActivationObserver: 2089 // Overridden from WMHelper::ActivationObserver:
2089 void OnWindowActivated(aura::Window* gained_active, 2090 void OnWindowActivated(aura::Window* gained_active,
2090 aura::Window* lost_active) override { 2091 aura::Window* lost_active) override {
2091 SendActivated(gained_active, lost_active); 2092 SendActivated(gained_active, lost_active);
2092 } 2093 }
2093 2094
2094 private: 2095 private:
2095 void ScheduleSendDisplayMetrics(int delay_ms) { 2096 void ScheduleSendDisplayMetrics(int delay_ms) {
2096 needs_send_display_metrics_ = true; 2097 needs_send_display_metrics_ = true;
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after
3733 DCHECK(event_loop); 3734 DCHECK(event_loop);
3734 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); 3735 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds());
3735 } 3736 }
3736 3737
3737 void Server::Flush() { 3738 void Server::Flush() {
3738 wl_display_flush_clients(wl_display_.get()); 3739 wl_display_flush_clients(wl_display_.get());
3739 } 3740 }
3740 3741
3741 } // namespace wayland 3742 } // namespace wayland
3742 } // namespace exo 3743 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698