| 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 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 | 1512 |
| 1513 void remote_surface_set_system_modal(wl_client* client, wl_resource* resource) { | 1513 void remote_surface_set_system_modal(wl_client* client, wl_resource* resource) { |
| 1514 GetUserDataAs<ShellSurface>(resource)->SetSystemModal(true); | 1514 GetUserDataAs<ShellSurface>(resource)->SetSystemModal(true); |
| 1515 } | 1515 } |
| 1516 | 1516 |
| 1517 void remote_surface_unset_system_modal(wl_client* client, | 1517 void remote_surface_unset_system_modal(wl_client* client, |
| 1518 wl_resource* resource) { | 1518 wl_resource* resource) { |
| 1519 GetUserDataAs<ShellSurface>(resource)->SetSystemModal(false); | 1519 GetUserDataAs<ShellSurface>(resource)->SetSystemModal(false); |
| 1520 } | 1520 } |
| 1521 | 1521 |
| 1522 void remote_surface_activate(wl_client* client, wl_resource* resource) { |
| 1523 GetUserDataAs<ShellSurface>(resource)->Activate(); |
| 1524 } |
| 1525 |
| 1522 const struct zwp_remote_surface_v1_interface remote_surface_implementation = { | 1526 const struct zwp_remote_surface_v1_interface remote_surface_implementation = { |
| 1523 remote_surface_destroy, | 1527 remote_surface_destroy, |
| 1524 remote_surface_set_app_id, | 1528 remote_surface_set_app_id, |
| 1525 remote_surface_set_window_geometry, | 1529 remote_surface_set_window_geometry, |
| 1526 remote_surface_set_scale, | 1530 remote_surface_set_scale, |
| 1527 remote_surface_fullscreen, | 1531 remote_surface_fullscreen, |
| 1528 remote_surface_maximize, | 1532 remote_surface_maximize, |
| 1529 remote_surface_minimize, | 1533 remote_surface_minimize, |
| 1530 remote_surface_restore, | 1534 remote_surface_restore, |
| 1531 remote_surface_pin, | 1535 remote_surface_pin, |
| 1532 remote_surface_unpin, | 1536 remote_surface_unpin, |
| 1533 remote_surface_unfullscreen, | 1537 remote_surface_unfullscreen, |
| 1534 remote_surface_set_rectangular_shadow, | 1538 remote_surface_set_rectangular_shadow, |
| 1535 remote_surface_set_title, | 1539 remote_surface_set_title, |
| 1536 remote_surface_set_top_inset, | 1540 remote_surface_set_top_inset, |
| 1537 remote_surface_set_system_modal, | 1541 remote_surface_set_system_modal, |
| 1538 remote_surface_unset_system_modal}; | 1542 remote_surface_unset_system_modal, |
| 1543 remote_surface_activate}; |
| 1539 | 1544 |
| 1540 //////////////////////////////////////////////////////////////////////////////// | 1545 //////////////////////////////////////////////////////////////////////////////// |
| 1541 // notification_surface_interface: | 1546 // notification_surface_interface: |
| 1542 | 1547 |
| 1543 void notification_surface_destroy(wl_client* client, wl_resource* resource) { | 1548 void notification_surface_destroy(wl_client* client, wl_resource* resource) { |
| 1544 wl_resource_destroy(resource); | 1549 wl_resource_destroy(resource); |
| 1545 } | 1550 } |
| 1546 | 1551 |
| 1547 const struct zwp_notification_surface_v1_interface | 1552 const struct zwp_notification_surface_v1_interface |
| 1548 notification_surface_implementation = {notification_surface_destroy}; | 1553 notification_surface_implementation = {notification_surface_destroy}; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1831 wl_resource_get_version(resource), id); | 1836 wl_resource_get_version(resource), id); |
| 1832 SetImplementation(notification_surface_resource, | 1837 SetImplementation(notification_surface_resource, |
| 1833 ¬ification_surface_implementation, | 1838 ¬ification_surface_implementation, |
| 1834 std::move(notification_surface)); | 1839 std::move(notification_surface)); |
| 1835 } | 1840 } |
| 1836 | 1841 |
| 1837 const struct zwp_remote_shell_v1_interface remote_shell_implementation = { | 1842 const struct zwp_remote_shell_v1_interface remote_shell_implementation = { |
| 1838 remote_shell_destroy, remote_shell_get_remote_surface, | 1843 remote_shell_destroy, remote_shell_get_remote_surface, |
| 1839 remote_shell_get_notification_surface}; | 1844 remote_shell_get_notification_surface}; |
| 1840 | 1845 |
| 1841 const uint32_t remote_shell_version = 8; | 1846 const uint32_t remote_shell_version = 9; |
| 1842 | 1847 |
| 1843 void bind_remote_shell(wl_client* client, | 1848 void bind_remote_shell(wl_client* client, |
| 1844 void* data, | 1849 void* data, |
| 1845 uint32_t version, | 1850 uint32_t version, |
| 1846 uint32_t id) { | 1851 uint32_t id) { |
| 1847 wl_resource* resource = | 1852 wl_resource* resource = |
| 1848 wl_resource_create(client, &zwp_remote_shell_v1_interface, | 1853 wl_resource_create(client, &zwp_remote_shell_v1_interface, |
| 1849 std::min(version, remote_shell_version), id); | 1854 std::min(version, remote_shell_version), id); |
| 1850 | 1855 |
| 1851 // TODO(reveman): Multi-display support. | 1856 // TODO(reveman): Multi-display support. |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2996 DCHECK(event_loop); | 3001 DCHECK(event_loop); |
| 2997 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); | 3002 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); |
| 2998 } | 3003 } |
| 2999 | 3004 |
| 3000 void Server::Flush() { | 3005 void Server::Flush() { |
| 3001 wl_display_flush_clients(wl_display_.get()); | 3006 wl_display_flush_clients(wl_display_.get()); |
| 3002 } | 3007 } |
| 3003 | 3008 |
| 3004 } // namespace wayland | 3009 } // namespace wayland |
| 3005 } // namespace exo | 3010 } // namespace exo |
| OLD | NEW |