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

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

Issue 2225903002: arc: Implement proper Arc window activation for task moving to front. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 <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 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 } 1525 }
1526 1526
1527 void remote_surface_set_rectangular_shadow_background_opacity( 1527 void remote_surface_set_rectangular_shadow_background_opacity(
1528 wl_client* client, 1528 wl_client* client,
1529 wl_resource* resource, 1529 wl_resource* resource,
1530 wl_fixed_t opacity) { 1530 wl_fixed_t opacity) {
1531 GetUserDataAs<ShellSurface>(resource)->SetRectangularShadowBackgroundOpacity( 1531 GetUserDataAs<ShellSurface>(resource)->SetRectangularShadowBackgroundOpacity(
1532 wl_fixed_to_double(opacity)); 1532 wl_fixed_to_double(opacity));
1533 } 1533 }
1534 1534
1535 void remote_surface_activate(wl_client* client,
1536 wl_resource* resource,
1537 uint32_t serial) {
1538 GetUserDataAs<ShellSurface>(resource)->Activate();
1539 }
1540
1535 const struct zwp_remote_surface_v1_interface remote_surface_implementation = { 1541 const struct zwp_remote_surface_v1_interface remote_surface_implementation = {
1536 remote_surface_destroy, 1542 remote_surface_destroy,
1537 remote_surface_set_app_id, 1543 remote_surface_set_app_id,
1538 remote_surface_set_window_geometry, 1544 remote_surface_set_window_geometry,
1539 remote_surface_set_scale, 1545 remote_surface_set_scale,
1540 remote_surface_fullscreen, 1546 remote_surface_fullscreen,
1541 remote_surface_maximize, 1547 remote_surface_maximize,
1542 remote_surface_minimize, 1548 remote_surface_minimize,
1543 remote_surface_restore, 1549 remote_surface_restore,
1544 remote_surface_pin, 1550 remote_surface_pin,
1545 remote_surface_unpin, 1551 remote_surface_unpin,
1546 remote_surface_unfullscreen, 1552 remote_surface_unfullscreen,
1547 remote_surface_set_rectangular_shadow, 1553 remote_surface_set_rectangular_shadow,
1548 remote_surface_set_title, 1554 remote_surface_set_title,
1549 remote_surface_set_top_inset, 1555 remote_surface_set_top_inset,
1550 remote_surface_set_system_modal, 1556 remote_surface_set_system_modal,
1551 remote_surface_unset_system_modal, 1557 remote_surface_unset_system_modal,
1552 remote_surface_set_rectangular_shadow_background_opacity}; 1558 remote_surface_set_rectangular_shadow_background_opacity,
1559 remote_surface_activate};
1553 1560
1554 //////////////////////////////////////////////////////////////////////////////// 1561 ////////////////////////////////////////////////////////////////////////////////
1555 // notification_surface_interface: 1562 // notification_surface_interface:
1556 1563
1557 void notification_surface_destroy(wl_client* client, wl_resource* resource) { 1564 void notification_surface_destroy(wl_client* client, wl_resource* resource) {
1558 wl_resource_destroy(resource); 1565 wl_resource_destroy(resource);
1559 } 1566 }
1560 1567
1561 const struct zwp_notification_surface_v1_interface 1568 const struct zwp_notification_surface_v1_interface
1562 notification_surface_implementation = {notification_surface_destroy}; 1569 notification_surface_implementation = {notification_surface_destroy};
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 wl_resource_get_version(resource), id); 1894 wl_resource_get_version(resource), id);
1888 SetImplementation(notification_surface_resource, 1895 SetImplementation(notification_surface_resource,
1889 &notification_surface_implementation, 1896 &notification_surface_implementation,
1890 std::move(notification_surface)); 1897 std::move(notification_surface));
1891 } 1898 }
1892 1899
1893 const struct zwp_remote_shell_v1_interface remote_shell_implementation = { 1900 const struct zwp_remote_shell_v1_interface remote_shell_implementation = {
1894 remote_shell_destroy, remote_shell_get_remote_surface, 1901 remote_shell_destroy, remote_shell_get_remote_surface,
1895 remote_shell_get_notification_surface}; 1902 remote_shell_get_notification_surface};
1896 1903
1897 const uint32_t remote_shell_version = 9; 1904 const uint32_t remote_shell_version = 10;
1898 1905
1899 void bind_remote_shell(wl_client* client, 1906 void bind_remote_shell(wl_client* client,
1900 void* data, 1907 void* data,
1901 uint32_t version, 1908 uint32_t version,
1902 uint32_t id) { 1909 uint32_t id) {
1903 wl_resource* resource = 1910 wl_resource* resource =
1904 wl_resource_create(client, &zwp_remote_shell_v1_interface, 1911 wl_resource_create(client, &zwp_remote_shell_v1_interface,
1905 std::min(version, remote_shell_version), id); 1912 std::min(version, remote_shell_version), id);
1906 1913
1907 SetImplementation(resource, &remote_shell_implementation, 1914 SetImplementation(resource, &remote_shell_implementation,
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
3124 DCHECK(event_loop); 3131 DCHECK(event_loop);
3125 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); 3132 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds());
3126 } 3133 }
3127 3134
3128 void Server::Flush() { 3135 void Server::Flush() {
3129 wl_display_flush_clients(wl_display_.get()); 3136 wl_display_flush_clients(wl_display_.get());
3130 } 3137 }
3131 3138
3132 } // namespace wayland 3139 } // namespace wayland
3133 } // namespace exo 3140 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698