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

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

Issue 1645043003: exo: Improve window placement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « components/exo/touch_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/wayland/server.cc
diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
index c66325c23ffb1dcf36d18a00fc861d73532ee2fb..9f497acceab718d4203197e121043ce7e258c63f 100644
--- a/components/exo/wayland/server.cc
+++ b/components/exo/wayland/server.cc
@@ -638,7 +638,7 @@ void shell_surface_resize(wl_client* client,
}
void shell_surface_set_toplevel(wl_client* client, wl_resource* resource) {
- GetUserDataAs<ShellSurface>(resource)->Init();
+ GetUserDataAs<ShellSurface>(resource)->SetEnabled(true);
}
void shell_surface_set_transient(wl_client* client,
@@ -655,7 +655,7 @@ void shell_surface_set_fullscreen(wl_client* client,
uint32_t method,
uint32_t framerate,
wl_resource* output_resource) {
- GetUserDataAs<ShellSurface>(resource)->Init();
+ GetUserDataAs<ShellSurface>(resource)->SetEnabled(true);
GetUserDataAs<ShellSurface>(resource)->SetFullscreen(true);
}
@@ -673,7 +673,7 @@ void shell_surface_set_popup(wl_client* client,
void shell_surface_set_maximized(wl_client* client,
wl_resource* resource,
wl_resource* output_resource) {
- GetUserDataAs<ShellSurface>(resource)->Init();
+ GetUserDataAs<ShellSurface>(resource)->SetEnabled(true);
GetUserDataAs<ShellSurface>(resource)->Maximize();
}
@@ -725,6 +725,10 @@ void shell_get_shell_surface(wl_client* client,
return;
}
+ // Shell surfaces are initially disabled and needs to be explicitly mapped
+ // before they are enabled and can become visible.
+ shell_surface->SetEnabled(false);
+
shell_surface->set_surface_destroyed_callback(base::Bind(
&wl_resource_destroy, base::Unretained(shell_surface_resource)));
@@ -952,9 +956,6 @@ void xdg_shell_get_xdg_surface(wl_client* client,
return;
}
- // An XdgSurface is a toplevel shell surface.
- shell_surface->Init();
-
shell_surface->set_close_callback(base::Bind(
&xdg_surface_send_close, base::Unretained(xdg_surface_resource)));
« no previous file with comments | « components/exo/touch_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698