Hi, Thanks for your comments. You are right, this is a bug.
The following code is meant to restore the initial position of a toplevel surface when it switch from a non-toplevel to toplevel. The problem is that (prev_surface_type != SHELL_SURFACE_TOPLEVEL) can not drop the buffer size changing case in which no surface type switched and the prev_surface_type is SHELL_SURFACE_NONE. I will fix it in next version. From: Scott Moreau [mailto:ore...@gmail.com] Sent: Friday, March 02, 2012 2:41 PM To: zhiwen...@linux.intel.com Cc: wayland-devel@lists.freedesktop.org; k...@bitplanet.net; juan.j.z...@linux.intel.com; ppaala...@gmail.com Subject: Re: [PATCH 1/2] shell: Add implementation of fullscreen. Hi. This patch introduces a bug where the window jumps all over the place when resizing it. I've tracked down the problem to the following code though I'm not sure I understand what it's meant to do yet exactly, so I figured I'd post a comment here. + case SHELL_SURFACE_TOPLEVEL: + if (prev_surface_type != SHELL_SURFACE_TOPLEVEL) { + if (shsurf->saved_position_valid && + shsurf->saved_x != surface->geometry.x && + shsurf->saved_y != surface->geometry.y) { + weston_surface_set_position(surface, + shsurf->saved_x, + shsurf->saved_y); + } else if (!shsurf->saved_position_valid) { + weston_surface_set_position(surface, 10 + random() % 400, + 10 + random() % 400); + } + } + break; Thanks, Scott
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel