mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 19:18:13 +02:00
shell: remove duplicated code
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. [pq: looks ok, redone since did not apply after my changes] Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
0a26641626
commit
0f997016a7
1 changed files with 3 additions and 16 deletions
19
src/shell.c
19
src/shell.c
|
|
@ -1315,6 +1315,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:
|
||||
;
|
||||
}
|
||||
|
|
@ -1361,22 +1364,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_assign_output(surface);
|
||||
weston_compositor_repick(compositor);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue