| 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 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1522 } | 1522 } |
| 1523 | 1523 |
| 1524 void remote_surface_set_rectangular_shadow_background_opacity( | 1524 void remote_surface_set_rectangular_shadow_background_opacity( |
| 1525 wl_client* client, | 1525 wl_client* client, |
| 1526 wl_resource* resource, | 1526 wl_resource* resource, |
| 1527 wl_fixed_t opacity) { | 1527 wl_fixed_t opacity) { |
| 1528 GetUserDataAs<ShellSurface>(resource)->SetRectangularShadowBackgroundOpacity( | 1528 GetUserDataAs<ShellSurface>(resource)->SetRectangularShadowBackgroundOpacity( |
| 1529 wl_fixed_to_double(opacity)); | 1529 wl_fixed_to_double(opacity)); |
| 1530 } | 1530 } |
| 1531 | 1531 |
| 1532 void remote_surface_activate(wl_client* client, |
| 1533 wl_resource* resource, |
| 1534 uint32_t serial) { |
| 1535 GetUserDataAs<ShellSurface>(resource)->Activate(); |
| 1536 } |
| 1537 |
| 1532 const struct zwp_remote_surface_v1_interface remote_surface_implementation = { | 1538 const struct zwp_remote_surface_v1_interface remote_surface_implementation = { |
| 1533 remote_surface_destroy, | 1539 remote_surface_destroy, |
| 1534 remote_surface_set_app_id, | 1540 remote_surface_set_app_id, |
| 1535 remote_surface_set_window_geometry, | 1541 remote_surface_set_window_geometry, |
| 1536 remote_surface_set_scale, | 1542 remote_surface_set_scale, |
| 1537 remote_surface_fullscreen, | 1543 remote_surface_fullscreen, |
| 1538 remote_surface_maximize, | 1544 remote_surface_maximize, |
| 1539 remote_surface_minimize, | 1545 remote_surface_minimize, |
| 1540 remote_surface_restore, | 1546 remote_surface_restore, |
| 1541 remote_surface_pin, | 1547 remote_surface_pin, |
| 1542 remote_surface_unpin, | 1548 remote_surface_unpin, |
| 1543 remote_surface_unfullscreen, | 1549 remote_surface_unfullscreen, |
| 1544 remote_surface_set_rectangular_shadow, | 1550 remote_surface_set_rectangular_shadow, |
| 1545 remote_surface_set_title, | 1551 remote_surface_set_title, |
| 1546 remote_surface_set_top_inset, | 1552 remote_surface_set_top_inset, |
| 1547 remote_surface_set_system_modal, | 1553 remote_surface_set_system_modal, |
| 1548 remote_surface_unset_system_modal, | 1554 remote_surface_unset_system_modal, |
| 1549 remote_surface_set_rectangular_shadow_background_opacity}; | 1555 remote_surface_set_rectangular_shadow_background_opacity, |
| 1556 remote_surface_activate}; |
| 1550 | 1557 |
| 1551 //////////////////////////////////////////////////////////////////////////////// | 1558 //////////////////////////////////////////////////////////////////////////////// |
| 1552 // notification_surface_interface: | 1559 // notification_surface_interface: |
| 1553 | 1560 |
| 1554 void notification_surface_destroy(wl_client* client, wl_resource* resource) { | 1561 void notification_surface_destroy(wl_client* client, wl_resource* resource) { |
| 1555 wl_resource_destroy(resource); | 1562 wl_resource_destroy(resource); |
| 1556 } | 1563 } |
| 1557 | 1564 |
| 1558 const struct zwp_notification_surface_v1_interface | 1565 const struct zwp_notification_surface_v1_interface |
| 1559 notification_surface_implementation = {notification_surface_destroy}; | 1566 notification_surface_implementation = {notification_surface_destroy}; |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1881 wl_resource_get_version(resource), id); | 1888 wl_resource_get_version(resource), id); |
| 1882 SetImplementation(notification_surface_resource, | 1889 SetImplementation(notification_surface_resource, |
| 1883 ¬ification_surface_implementation, | 1890 ¬ification_surface_implementation, |
| 1884 std::move(notification_surface)); | 1891 std::move(notification_surface)); |
| 1885 } | 1892 } |
| 1886 | 1893 |
| 1887 const struct zwp_remote_shell_v1_interface remote_shell_implementation = { | 1894 const struct zwp_remote_shell_v1_interface remote_shell_implementation = { |
| 1888 remote_shell_destroy, remote_shell_get_remote_surface, | 1895 remote_shell_destroy, remote_shell_get_remote_surface, |
| 1889 remote_shell_get_notification_surface}; | 1896 remote_shell_get_notification_surface}; |
| 1890 | 1897 |
| 1891 const uint32_t remote_shell_version = 9; | 1898 const uint32_t remote_shell_version = 10; |
| 1892 | 1899 |
| 1893 void bind_remote_shell(wl_client* client, | 1900 void bind_remote_shell(wl_client* client, |
| 1894 void* data, | 1901 void* data, |
| 1895 uint32_t version, | 1902 uint32_t version, |
| 1896 uint32_t id) { | 1903 uint32_t id) { |
| 1897 wl_resource* resource = | 1904 wl_resource* resource = |
| 1898 wl_resource_create(client, &zwp_remote_shell_v1_interface, | 1905 wl_resource_create(client, &zwp_remote_shell_v1_interface, |
| 1899 std::min(version, remote_shell_version), id); | 1906 std::min(version, remote_shell_version), id); |
| 1900 | 1907 |
| 1901 // TODO(reveman): Multi-display support. | 1908 // TODO(reveman): Multi-display support. |
| (...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3123 DCHECK(event_loop); | 3130 DCHECK(event_loop); |
| 3124 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); | 3131 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); |
| 3125 } | 3132 } |
| 3126 | 3133 |
| 3127 void Server::Flush() { | 3134 void Server::Flush() { |
| 3128 wl_display_flush_clients(wl_display_.get()); | 3135 wl_display_flush_clients(wl_display_.get()); |
| 3129 } | 3136 } |
| 3130 | 3137 |
| 3131 } // namespace wayland | 3138 } // namespace wayland |
| 3132 } // namespace exo | 3139 } // namespace exo |
| OLD | NEW |