| OLD | NEW |
| 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 <grp.h> | 7 #include <grp.h> |
| 8 #include <linux/input.h> | 8 #include <linux/input.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1627 // for more details. | 1627 // for more details. |
| 1628 if (changed_metrics & | 1628 if (changed_metrics & |
| 1629 (DISPLAY_METRIC_BOUNDS | DISPLAY_METRIC_DEVICE_SCALE_FACTOR | | 1629 (DISPLAY_METRIC_BOUNDS | DISPLAY_METRIC_DEVICE_SCALE_FACTOR | |
| 1630 DISPLAY_METRIC_ROTATION | DISPLAY_METRIC_WORK_AREA)) { | 1630 DISPLAY_METRIC_ROTATION | DISPLAY_METRIC_WORK_AREA)) { |
| 1631 SendDisplayMetrics(display); | 1631 SendDisplayMetrics(display); |
| 1632 } | 1632 } |
| 1633 SendConfigure_DEPRECATED(display); | 1633 SendConfigure_DEPRECATED(display); |
| 1634 } | 1634 } |
| 1635 | 1635 |
| 1636 // Overridden from ash::ShellObserver: | 1636 // Overridden from ash::ShellObserver: |
| 1637 void OnDisplayWorkAreaInsetsChanged() override { | |
| 1638 const display::Display primary = | |
| 1639 display::Screen::GetScreen()->GetPrimaryDisplay(); | |
| 1640 SendConfigure_DEPRECATED(primary); | |
| 1641 } | |
| 1642 void OnMaximizeModeStarted() override { | 1637 void OnMaximizeModeStarted() override { |
| 1643 layout_mode_ = ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET; | 1638 layout_mode_ = ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET; |
| 1644 SendLayoutModeChange_DEPRECATED(); | 1639 SendLayoutModeChange_DEPRECATED(); |
| 1645 | 1640 |
| 1646 send_configure_after_layout_change_ = true; | 1641 send_configure_after_layout_change_ = true; |
| 1647 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 1642 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 1648 FROM_HERE, base::Bind(&WaylandRemoteShell::MaybeSendConfigure, | 1643 FROM_HERE, base::Bind(&WaylandRemoteShell::MaybeSendConfigure, |
| 1649 weak_ptr_factory_.GetWeakPtr()), | 1644 weak_ptr_factory_.GetWeakPtr()), |
| 1650 base::TimeDelta::FromMilliseconds(kConfigureDelayAfterLayoutSwitchMs)); | 1645 base::TimeDelta::FromMilliseconds(kConfigureDelayAfterLayoutSwitchMs)); |
| 1651 } | 1646 } |
| (...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3139 DCHECK(event_loop); | 3134 DCHECK(event_loop); |
| 3140 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); | 3135 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); |
| 3141 } | 3136 } |
| 3142 | 3137 |
| 3143 void Server::Flush() { | 3138 void Server::Flush() { |
| 3144 wl_display_flush_clients(wl_display_.get()); | 3139 wl_display_flush_clients(wl_display_.get()); |
| 3145 } | 3140 } |
| 3146 | 3141 |
| 3147 } // namespace wayland | 3142 } // namespace wayland |
| 3148 } // namespace exo | 3143 } // namespace exo |
| OLD | NEW |