You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Linux Framebuffer] Change the display orientation at runtime #25058
A way to change the Linux framebuffer host's display orientation while the app is running.
Today the orientation can only be chosen at startup, through FramebufferHostBuilder.Orientation(...). It is fixed for the lifetime of the app.
Proposed API: an overload of the existing builder method that also hands the app a setter to keep:
Action<DisplayOrientations>?setOrientation=null;varhost=UnoPlatformHostBuilder.Create().App(()=>newApp()).UseLinuxFrameBuffer(fb =>fb.Orientation(DisplayOrientations.Landscape,outsetOrientation)).Build();// later, from any thread; applied on the UI threadsetOrientation?.Invoke(DisplayOrientations.Portrait);
A change should:
rotate rendering;
remap pointer and touch input;
update the window bounds (raising SizeChanged when width and height swap);
report the new value through DisplayInformation.CurrentOrientation;
raise DisplayInformation.OrientationChanged.
Why is this needed? 🤔
Embedded and kiosk devices running on the framebuffer often need to rotate their UI after startup. For example, a device can be mounted in a different position, or switch its layout from a settings screen. Currently this requires restarting the app with a different builder option.
Related: DisplayInformation.CurrentOrientation always reports Landscape on the framebuffer, even when the builder sets another orientation, and OrientationChanged is never raised there.
Activity
feat(framebuffer): Change orientation at runtime
feat(framebuffer): Change orientation at runtime