<html 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)">
<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"><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:raster@rasterman.com">Carsten Haitzler</a><br>
<b>Sent: </b>Tuesday, August 3, 2021 9:38 AM<br>
<b>To: </b><a href="mailto:ddeyo@tireprofiles.com">David Deyo</a><br>
<b>Cc: </b><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" style="margin-bottom:12.0pt">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>
On Tue, 3 Aug 2021 13:40:25 +0000 David Deyo <ddeyo@tireprofiles.com> said:<br>
<br>
> From: Carsten Haitzler<<a href="mailto:raster@rasterman.com">mailto:raster@rasterman.com</a>><br>
> Sent: Tuesday, August 3, 2021 8:13 AM<br>
> To: David Deyo<<a href="mailto:ddeyo@tireprofiles.com">mailto:ddeyo@tireprofiles.com</a>><br>
> Cc:<br>
> wayland-devel@lists.freedesktop.org<mailto:wayland-devel@lists.freedesktop.org><br>
> Subject: Re: FW: xrandr and xwayland<br>
><br>
> CAUTION: This email originated from outside of the organization. Do not click<br>
> links or open attachments unless you recognize the sender and know the<br>
> content is safe.<br>
><br>
><br>
> On Tue, 3 Aug 2021 13:04:11 +0000 David Deyo <ddeyo@tireprofiles.com> said:<br>
><br>
> ><br>
> ><br>
> > From: David Deyo<<a href="mailto:ddeyo@tireprofiles.com">mailto:ddeyo@tireprofiles.com</a>><br>
> > Sent: Monday, August 2, 2021 3:53 PM<br>
> > To: Pekka Paalanen<<a href="mailto:ppaalanen@gmail.com">mailto:ppaalanen@gmail.com</a>><br>
> > Subject: RE: xrandr and xwayland<br>
> ><br>
> > On Fri, 30 Jul 2021 23:30:38 +0100<br>
> > Carsten Haitzler <raster@rasterman.com> wrote:<br>
> ><br>
> > > On Fri, 30 Jul 2021 16:28:02 +0000 David Deyo <ddeyo@tireprofiles.com><br>
> > > said:<br>
> > ><br>
> > > No - this is up to the compositor itself to do in its own internal ways.<br>
> > > Far too many abuses have happened over the years with xrandr available to<br>
> > > any client anywhere. While in theory a wayland compositor could create an<br>
> > > extension that works like xrandr, it'd be problematic to make it<br>
> > > general-access like xrandr.<br>
> ><br>
> > >>>Indeed.<br>
> ><br>
> > > ><br>
> > > > Hello everyone,<br>
> > > ><br>
> > > > I need to rotate my screen 90 degrees and back to normal in xwayland on<br>
> > > > an iMX8 running gatesgarth distro.<br>
> ><br>
> > >>>Maybe you could explain your top-level use case for this, and the<br>
> > >>>general system architecture (which relevant programs are running and<br>
> > >>>what their responsibilities are)?<br>
> ><br>
> > Distro:<br>
> > I am working on a product that our company is creating. It uses an imx8 som<br>
> > from Boundary. The system is not a normal desktop. The DISTRO is created by<br>
> > yocto using the gatesgarth branch. Just recently we were notified that<br>
> > Xwayland was working, so I don’t expect we will be removing it just yet.<br>
> ><br>
> ><br>
> > Use case:<br>
> > We will have a kiosk-looking desktop. Some of our pages will have the<br>
> > option for the end user to enter text from an on-screen keyboard. Since our<br>
> > display will be so small (68.04mm (2.68") x 120.96mm (4.76")), we will have<br>
> > to turn our unit sideways to make the keyboard fit. We have already done<br>
> > this on a smaller screen (1.0). On our 1.0 product, we used Segger as our<br>
> > graphics library. Compared to Android, and the like, it seems like<br>
> > rotating the screen would be a standard capability.<br>
> ><br>
> > I believe our compositor (Weston) can do it, transform=90, but to use this<br>
> > method, it has to be restarted; causing our gui app to crash and lose all<br>
> > entered data. The client probably needs to drive the orientation.<br>
> > Considering our gui will likely be in python3/tkinter, I will need some way<br>
> > create a page and rotate the display.<br>
> ><br>
> > I am somewhat limited by the packages available to me in my distro.<br>
><br>
> > > > >The right way here is to modify Weston to do on-the-fly rotation<br>
> > > > >without a restart. You also will want a custom protocol from client to<br>
> > > > >compositor to indicate when a client surface wants rotation. This way<br>
> > > > >the compositor can correctly rotate the client content and any other<br>
> > > > >on-screen content at the time<br>
> > > > > (e.g. keyboard) when that client surface is the active visible one<br>
> > > > > (as a kiosk<br>
> > > > >style only one will be active/visible at a time - except for things<br>
> > > > >like keyboard etc.). When you switch which surface is the active one<br>
> > > > >then the compositor can re-evaluate how to draw on the screen based on<br>
> > > > >what that client has requested rotation-wise.<br>
> Thank you,<br>
> A custom protocol makes sense.<br>
><br>
> 1. What’s the best way to communicate with Weston, socket, message,<br>
> function call?<br>
<br>
> > > > > >Wayland protocol. You can create extensions as XML files and use<br>
> > > > > >wayland-scanner to generate C code to handle that protocol.<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Ok, thanks.<br>
<br>
> 2. How would Weston actually rotate the display, in particular on the fly?<br>
> In the Weston documentation, it states that a super-kbd key and middle mouse<br>
> button should rotate the display (if supported). I’d like to find where that<br>
> is, as well.<br>
<br>
> > > > > >Any number of ways. It could modify the KMS device properties for that output<br>
> > > > > >to rotate. It could render rotated (in GL transform the triangle coordinates<br>
> > > > > >when rendering) or in software render the pixels rotated as you read and write<br>
> > > > > >them from one place to another (various algorithms can be used here). Weston<br>
> > > > > >already can do these so it's just a matter of gluing together the code with<br>
> > > > > >your protocol and some logic.<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Excellent, along with rotation, I will also need to keep touch working correctly.<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Does that decide any of the ways over the other?<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">-dwd<br>
<br>
> -dwd<br>
> --<br>
> ------------- Codito, ergo sum - "I code, therefore I am" --------------<br>
> Carsten Haitzler - raster@rasterman.com<br>
><br>
<br>
<br>
--<br>
------------- Codito, ergo sum - "I code, therefore I am" --------------<br>
Carsten Haitzler - raster@rasterman.com<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>