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

Unified Diff: components/exo/wayland/server.cc

Issue 2664403004: Use pixel coordinates for shadow underlay bounds (Closed)
Patch Set: update names etc 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 side-by-side diff with in-line comments
Download patch
Index: components/exo/wayland/server.cc
diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
index a63bfb75d5974670ee1cc9eceb30b5efc18278ea..57e2630120c6bec0e12f921dcb9938dbf59f649d 100644
--- a/components/exo/wayland/server.cc
+++ b/components/exo/wayland/server.cc
@@ -879,7 +879,7 @@ void shell_surface_set_toplevel(wl_client* client, wl_resource* resource) {
return;
shell_surface->SetFrame(true);
- shell_surface->SetRectangularShadow(true);
+ shell_surface->set_shadow_enabled(true);
reveman 2017/02/03 17:47:01 Ah, sorry! I forgot that we use this here. Let's k
shell_surface->SetEnabled(true);
}
@@ -931,7 +931,7 @@ void shell_surface_set_transient(wl_client* client,
shell_surface->SetFrame(true);
shell_surface->SetParent(parent_shell_surface);
}
- shell_surface->SetRectangularShadow(true);
+ shell_surface->set_shadow_enabled(true);
shell_surface->SetEnabled(true);
}
@@ -1501,17 +1501,15 @@ void remote_surface_set_scale(wl_client* client,
GetUserDataAs<ShellSurface>(resource)->SetScale(wl_fixed_to_double(scale));
}
-void remote_surface_set_rectangular_shadow(wl_client* client,
- wl_resource* resource,
- int32_t x,
- int32_t y,
- int32_t width,
- int32_t height) {
+void remote_surface_set_rectangular_shadow_DEPRECATED(wl_client* client,
+ wl_resource* resource,
+ int32_t x,
+ int32_t y,
+ int32_t width,
+ int32_t height) {
ShellSurface* shell_surface = GetUserDataAs<ShellSurface>(resource);
gfx::Rect content_bounds(x, y, width, height);
-
- shell_surface->SetRectangularShadowContentBounds(content_bounds);
- shell_surface->SetRectangularShadow(!content_bounds.IsEmpty());
+ shell_surface->SetRectangularShadow_DEPRECATED(content_bounds);
}
void remote_surface_set_rectangular_shadow_background_opacity(
@@ -1580,12 +1578,31 @@ void remote_surface_unset_system_modal(wl_client* client,
GetUserDataAs<ShellSurface>(resource)->SetSystemModal(false);
}
+void remote_surface_set_rectangular_surface_shadow(wl_client* client,
+ wl_resource* resource,
+ int32_t x,
+ int32_t y,
+ int32_t width,
+ int32_t height) {
+ ShellSurface* shell_surface = GetUserDataAs<ShellSurface>(resource);
+ gfx::Rect content_bounds(x, y, width, height);
+ shell_surface->SetRectangularSurfaceShadow(content_bounds);
+}
+
+void remote_surface_set_moving(wl_client* client, wl_resource* resource) {
+ NOTIMPLEMENTED();
+}
+
+void remote_surface_unset_moving(wl_client* client, wl_resource* resource) {
+ NOTIMPLEMENTED();
+}
+
const struct zcr_remote_surface_v1_interface remote_surface_implementation = {
remote_surface_destroy,
remote_surface_set_app_id,
remote_surface_set_window_geometry,
remote_surface_set_scale,
- remote_surface_set_rectangular_shadow,
+ remote_surface_set_rectangular_shadow_DEPRECATED,
remote_surface_set_rectangular_shadow_background_opacity,
remote_surface_set_title,
remote_surface_set_top_inset,
@@ -1598,7 +1615,10 @@ const struct zcr_remote_surface_v1_interface remote_surface_implementation = {
remote_surface_pin,
remote_surface_unpin,
remote_surface_set_system_modal,
- remote_surface_unset_system_modal};
+ remote_surface_unset_system_modal,
+ remote_surface_set_moving,
+ remote_surface_unset_moving,
+ remote_surface_set_rectangular_surface_shadow};
////////////////////////////////////////////////////////////////////////////////
// notification_surface_interface:
@@ -1885,7 +1905,7 @@ const struct zcr_remote_shell_v1_interface remote_shell_implementation = {
remote_shell_destroy, remote_shell_get_remote_surface,
remote_shell_get_notification_surface};
-const uint32_t remote_shell_version = 1;
+const uint32_t remote_shell_version = 3;
void bind_remote_shell(wl_client* client,
void* data,

Powered by Google App Engine
This is Rietveld 408576698