<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=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Thanks Daniel,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My local test is just a timer that rotates every 5 seconds. I have a python keyboard running that rotates, but I have remnants of the original keyboard.</p>
<p class="MsoNormal">Almost like I have a stale buffer. The extra keyboard images don’t respond either.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is there some clear I need to be calling before I rotate?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-dwd</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">
<b><span style="color:red">David Deyo</span><o:p></o:p></b></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="margin-left:.15in;border-collapse:collapse">
<tbody>
<tr>
<td width="150" valign="top" style="width:112.5pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><img width="170" height="82" style="width:1.7708in;height:.8541in" id="Picture_x0020_3" src="cid:image003.png@01D78AB0.80A0FBB0"><span style="font-size:1.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</td>
<td width="474" valign="top" style="width:355.5pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="font-size:1.0pt;font-family:"Times New Roman",serif"> </span><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#F52D00;text-transform:uppercase"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="line-height:10.5pt"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#121145">Firmware Engineer
<o:p></o:p></span></b></p>
<p class="MsoNormal" style="line-height:10.5pt"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#F52D00;text-transform:uppercase">TPI- Tire Profiles<o:p></o:p></span></b></p>
<p class="MsoNormal" style="line-height:10.5pt"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#F52D00">O:
</span></b><span style="font-size:9.0pt;font-family:"Arial",sans-serif">214-396-3063<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.5pt"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#F52D00">E:</span></b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#121145">
</span><span style="font-size:9.0pt;font-family:"Arial",sans-serif"><a href="mailto:ddeyo@tireprofiles.com">ddeyo@tireprofiles.com</a></span><span style="font-size:9.0pt;color:#121145">
</span><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#F52D00">| W:
</span></b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#121145"> </span><a href="http://www.tireprofiles.com/" target="_blank"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#0563C1">www.tireprofiles.com</span></a><span style="font-size:9.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.5pt"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#F52D00">A:</span></b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#121145"> 3010 Story Rd W, Irving, TX 75038</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:daniel@fooishbar.org">Daniel Stone</a><br>
<b>Sent: </b>Friday, August 6, 2021 3:14 AM<br>
<b>To: </b><a href="mailto:ddeyo@tireprofiles.com">David Deyo</a><br>
<b>Cc: </b><a href="mailto:linkmauve@linkmauve.fr">Emmanuel Gil Peyrot</a>; <a href="mailto:wayland-devel@lists.freedesktop.org">
wayland-devel@lists.freedesktop.org</a><br>
<b>Subject: </b>Re: FW: xrandr and xwayland</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.<br>
<br>
<br>
Hi David,<br>
<br>
On Thu, 5 Aug 2021 at 22:17, David Deyo <ddeyo@tireprofiles.com> wrote:<br>
> > Sounds like you're missing wl_display_flush() in your client code, so the requests don't make it to the socket buffer until they're forced to because it's filled up.<br>
><br>
> That did it. You guys are awesome. I don’t suppose there’s a Weston doc somewhere that would have told me that, had I looked.<br>
<br>
It's a little bit buried, but this is the best explanation of how to<br>
integrate Wayland into an event loop, as you would with a toolkit:<br>
<a href="https://wayland.freedesktop.org/docs/html/apb.html#Client-classwl__display_1a40039c1169b153269a3dc0796a54ddb0">
https://wayland.freedesktop.org/docs/html/apb.html#Client-classwl__display_1a40039c1169b153269a3dc0796a54ddb0</a><br>
<br>
If you scroll up to the main wl_display section, it explains how event<br>
queues are used as well.<br>
<br>
Broadly speaking, the advice is to:<br>
- when active, process your events and send any requests<br>
- immediately before you go into a passive state (waiting for events,<br>
sleeping, etc), flush the display so your requests get delivered<br>
- run the prepare_read_queue() / dispatch_queue_pending() loop<br>
immediately before sleeping, in order to make sure you get all events<br>
queued for you, then flush again in case you've queued any requests<br>
from your event handlers<br>
- poll on the Wayland display FD as well as any other activity sources<br>
(other event queues, timers, etc)<br>
- when you wake up, dispatch your Wayland event queue as well as other<br>
relevant event sources<br>
<br>
> > Also, my taskbar is the wrong length and my background is black. Other than that, pretty cool.<br>
><br>
> Yep, desktop-shell isn't designed to handle runtime rotation. It could be made to pretty easily by working on the client code. For your case though I'd assume something like kiosk-shell would be a much better bet.<br>
<br>
kiosk-shell is something we have in newer versions of Weston which<br>
sounds like it would work well for your usecases - it's designed to<br>
just run a single application fullscreen. You might want to check out<br>
what we have in git, which will be released as 10.0 in a few weeks'<br>
time.<br>
<br>
The rotation patches never got merged because we had some issues with<br>
the IIO integration in particular, but having runtime rotation tests<br>
sure would be nice, and kiosk-shell should at least be a lot easier to<br>
fix than desktop-shell, if it does even need any fixes.<br>
<br>
Cheers,<br>
Daniel<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>