<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ZH-CN link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for your comments. You are right, this is a bug.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>The following code is meant to restore the initial position of a toplevel surface when it switch from a non-toplevel to toplevel.<br>The problem is that (</span><span lang=EN-US>prev_surface_type != SHELL_SURFACE_TOPLEVEL</span><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>) can not drop the buffer size changing case in which no surface type switched and the </span><span lang=EN-US>prev_surface_type is SHELL_SURFACE_NONE</span><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>.<br>I will fix it in next version.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Scott Moreau [mailto:oreaus@gmail.com] <br><b>Sent:</b> Friday, March 02, 2012 2:41 PM<br><b>To:</b> zhiwen.wu@linux.intel.com<br><b>Cc:</b> wayland-devel@lists.freedesktop.org; krh@bitplanet.net; juan.j.zhao@linux.intel.com; ppaalanen@gmail.com<br><b>Subject:</b> Re: [PATCH 1/2] shell: Add implementation of fullscreen.<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>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.<br><br><o:p></o:p></span></p><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal><span lang=EN-US>+ case SHELL_SURFACE_TOPLEVEL:<br>+ if (prev_surface_type != SHELL_SURFACE_TOPLEVEL) {<br>+ if (shsurf->saved_position_valid &&<br>+ shsurf->saved_x != surface->geometry.x &&<br>+ shsurf->saved_y != surface->geometry.y) {<br>+ weston_surface_set_position(surface,<br>+ shsurf->saved_x,<br>+ shsurf->saved_y);<br>+ } else if (!shsurf->saved_position_valid) {<br>+ weston_surface_set_position(surface, 10 + random() % 400,<br>+ 10 + random() % 400);<br>+ }<br>+ }<br>+ break;<o:p></o:p></span></p></blockquote></div><p class=MsoNormal><span lang=EN-US><br><br><br>Thanks,<br><br>Scott<o:p></o:p></span></p></div></div></body></html>