[PATCH 1/2] shell: Add implementation of fullscreen.

wuzhiwen zhiwen.wu at linux.intel.com
Thu Mar 1 23:23:23 PST 2012


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:oreaus at gmail.com] 
Sent: Friday, March 02, 2012 2:41 PM
To: zhiwen.wu at linux.intel.com
Cc: wayland-devel at lists.freedesktop.org; krh at bitplanet.net;
juan.j.zhao at linux.intel.com; ppaalanen at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20120302/170236cf/attachment.html>


More information about the wayland-devel mailing list