<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>Adding OpenJDK quality-discuss group.</p>
Regards<br>
Deepak<br>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 15/01/21 5:23 pm,
<a class="moz-txt-link-abbreviated" href="mailto:deepak.n.damodaran@oracle.com">deepak.n.damodaran@oracle.com</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:56d7e449-6773-79af-5109-1f75ff413b71@oracle.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<p>Hi <span lang="EN-US">Sjoerd Brauer,</span></p>
<p><span lang="EN-US">Could you please post this in AWT dev group
- <a moz-do-not-send="true"
href="https://mail.openjdk.java.net/pipermail/awt-dev/">https://mail.openjdk.java.net/pipermail/awt-dev/</a>
?<br>
</span></p>
<span lang="EN-US">Regards</span><br>
<span lang="EN-US">Deepak<br>
</span>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 13/01/21 2:26 pm, Sjoerd Brauer
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BN7PR08MB609938A72E53263BBE8D3D8D9AA90@BN7PR08MB6099.namprd08.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}@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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}ol
{margin-bottom:0cm;}ul
{margin-bottom:0cm;}</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]-->
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="mso-fareast-language:NL" lang="EN-US">From:</span></b><span
style="mso-fareast-language:NL" lang="EN-US"> Sjoerd
Brauer <br>
<b>Sent:</b> woensdag 13 januari 2021 09:54<br>
<b>To:</b> '<a class="moz-txt-link-abbreviated"
href="mailto:quality-discuss@openjdk.java.net"
moz-do-not-send="true">quality-discuss@openjdk.java.net</a>'
<a class="moz-txt-link-rfc2396E"
href="mailto:quality-discuss@openjdk.java.net"
moz-do-not-send="true"><quality-discuss@openjdk.java.net></a><br>
<b>Subject:</b> suggestions to improve AWT (mostly
Linux related)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Dear all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I’ve been working with
a Raspbian CLI environment for a while and notice some
unexpected behavior from AWT.Robot.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Java registers the
Raspbian CLI as a headless environment even though it can
be accessed directly through a keyboard and mouse (I did
as well).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">When fooling the java
environment by setting the headless property to false it
throws X11 errors because it relies on an X server to do
the IO stuff.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This is the part where
I believe AWT can be improved.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Yes I understand AWT
exists for creating a GUI and CLI is not considered a GUI.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Yes I understand and
agree that because using a CLI some AWT related stuff
should not work.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Even though this is
the case there already exists some exceptions of using AWT
in a headless environment as described by Oracle:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a
href="https://www.oracle.com/technical-resources/articles/javase/headless.html"
moz-do-not-send="true">https://www.oracle.com/technical-resources/articles/javase/headless.html</a>
(I’m assuming OpenJDK shares this behavior but I didn’t
test this).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I suggest the
following improvements to the AWT.<o:p></o:p></span></p>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph"
style="margin-left:0cm;mso-list:l1 level1 lfo3"><span
lang="EN-US">Don’t make IO simulation classes like
AWT.Robot rely on the X-Server but make it work directly
on the OS IO system.<o:p></o:p></span></li>
<ul style="margin-top:0cm" type="circle">
<li class="MsoListParagraph"
style="margin-left:0cm;mso-list:l1 level2 lfo3"><span
lang="EN-US"><a
href="https://pypi.org/project/keyboard/"
moz-do-not-send="true">https://pypi.org/project/keyboard/</a>
is a great example on how you could do this (albeit
written in python).<o:p></o:p></span></li>
</ul>
<li class="MsoListParagraph"
style="margin-left:0cm;mso-list:l1 level1 lfo3"><span
lang="EN-US">Separate the headless exception into
headless and a new CLIEnvironment exception.<o:p></o:p></span></li>
</ul>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Because the AWT is
part of the Java Foundation Classes I’m writing this to
you.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Hopefully you find my
feedback useful.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Sjoerd Brauer <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div> Legal Disclaimer :<br>
The information contained in this message may be privileged
and confidential. <br>
It is intended to be read only by the individual or entity to
whom it is addressed <br>
or by their designee. If the reader of this message is not the
intended recipient, <br>
you are on notice that any distribution of this message, in
any form, <br>
is strictly prohibited. If you have received this message in
error, <br>
please immediately notify the sender and delete or destroy any
copy of this message!<br>
</div>
</blockquote>
</blockquote>
</body>
</html>