FW: xrandr and xwayland
David Deyo
ddeyo at tireprofiles.com
Tue Aug 3 13:40:25 UTC 2021
From: Carsten Haitzler<mailto:raster at rasterman.com>
Sent: Tuesday, August 3, 2021 8:13 AM
To: David Deyo<mailto:ddeyo at tireprofiles.com>
Cc: wayland-devel at lists.freedesktop.org<mailto:wayland-devel at lists.freedesktop.org>
Subject: Re: FW: xrandr and xwayland
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.
On Tue, 3 Aug 2021 13:04:11 +0000 David Deyo <ddeyo at tireprofiles.com> said:
>
>
> From: David Deyo<mailto:ddeyo at tireprofiles.com>
> Sent: Monday, August 2, 2021 3:53 PM
> To: Pekka Paalanen<mailto:ppaalanen at gmail.com>
> Subject: RE: xrandr and xwayland
>
> On Fri, 30 Jul 2021 23:30:38 +0100
> Carsten Haitzler <raster at rasterman.com> wrote:
>
> > On Fri, 30 Jul 2021 16:28:02 +0000 David Deyo <ddeyo at tireprofiles.com> said:
> >
> > No - this is up to the compositor itself to do in its own internal ways. Far
> > too many abuses have happened over the years with xrandr available to any
> > client anywhere. While in theory a wayland compositor could create an
> > extension that works like xrandr, it'd be problematic to make it
> > general-access like xrandr.
>
> >>>Indeed.
>
> > >
> > > Hello everyone,
> > >
> > > I need to rotate my screen 90 degrees and back to normal in xwayland on
> > > an iMX8 running gatesgarth distro.
>
> >>>Maybe you could explain your top-level use case for this, and the
> >>>general system architecture (which relevant programs are running and
> >>>what their responsibilities are)?
>
> Distro:
> I am working on a product that our company is creating. It uses an imx8 som
> from Boundary. The system is not a normal desktop. The DISTRO is created by
> yocto using the gatesgarth branch. Just recently we were notified that
> Xwayland was working, so I don’t expect we will be removing it just yet.
>
>
> Use case:
> We will have a kiosk-looking desktop. Some of our pages will have the option
> for the end user to enter text from an on-screen keyboard. Since our display
> will be so small (68.04mm (2.68") x 120.96mm (4.76")), we will have to turn
> our unit sideways to make the keyboard fit. We have already done this on a
> smaller screen (1.0). On our 1.0 product, we used Segger as our graphics
> library. Compared to Android, and the like, it seems like rotating the
> screen would be a standard capability.
>
> I believe our compositor (Weston) can do it, transform=90, but to use this
> method, it has to be restarted; causing our gui app to crash and lose all
> entered data. The client probably needs to drive the orientation.
> Considering our gui will likely be in python3/tkinter, I will need some way
> create a page and rotate the display.
>
> I am somewhat limited by the packages available to me in my distro.
> > > >The right way here is to modify Weston to do on-the-fly rotation without a
> > > >restart. You also will want a custom protocol from client to compositor to
> > > >indicate when a client surface wants rotation. This way the compositor can
> > > >correctly rotate the client content and any other on-screen content at the time
> > > > (e.g. keyboard) when that client surface is the active visible one (as a kiosk
> > > >style only one will be active/visible at a time - except for things like
> > > >keyboard etc.). When you switch which surface is the active one then the
> > > >compositor can re-evaluate how to draw on the screen based on what that client
> > > >has requested rotation-wise.
Thank you,
A custom protocol makes sense.
1. What’s the best way to communicate with Weston, socket, message, function call?
2. How would Weston actually rotate the display, in particular on the fly?
In the Weston documentation, it states that a super-kbd key and middle mouse button should rotate the display (if supported).
I’d like to find where that is, as well.
-dwd
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - raster at rasterman.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20210803/c3082eea/attachment.htm>
More information about the wayland-devel
mailing list