[PATCH 2/5] shell: remove duplicated code
Tiago Vignatti
tiago.vignatti at intel.com
Thu Feb 9 09:06:53 PST 2012
From: Tiago Vignatti <vignatti at freedesktop.org>
This clean-up seems alright, but someone with better knowledge has to
doublecheck this function. I guess there's a lot of space for clean-up there.
Signed-off-by: Tiago Vignatti <vignatti at freedesktop.org>
---
src/shell.c | 19 +++----------------
1 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/src/shell.c b/src/shell.c
index 53b192c..15d34d4 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1323,6 +1323,9 @@ map(struct weston_shell *base,
case SHELL_SURFACE_LOCK:
center_on_output(surface, get_default_output(compositor));
break;
+ case SHELL_SURFACE_POPUP:
+ shell_map_popup(shsurf, shsurf->popup.time);
+ break;
default:
;
}
@@ -1369,22 +1372,6 @@ map(struct weston_shell *base,
}
}
- switch (surface_type) {
- case SHELL_SURFACE_TOPLEVEL:
- surface->geometry.x = 10 + random() % 400;
- surface->geometry.y = 10 + random() % 400;
- surface->geometry.dirty = 1;
- break;
- case SHELL_SURFACE_POPUP:
- shell_map_popup(shsurf, shsurf->popup.time);
- break;
- default:
- break;
- }
-
- surface->geometry.width = width;
- surface->geometry.height = height;
- surface->geometry.dirty = 1;
if (do_configure) {
weston_surface_configure(surface, surface->geometry.x,
surface->geometry.y,
--
1.7.5.4
More information about the wayland-devel
mailing list