<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 21, 2021 at 12:33 AM Sergey Bylokhov <<a href="mailto:serb@openjdk.java.net">serb@openjdk.java.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 19 May 2021 10:23:01 GMT, Maxim Kartashev <<a href="http://github.com" rel="noreferrer" target="_blank">github.com</a>+<a href="mailto:28651297%2Bmkartashev@openjdk.org" target="_blank">28651297+mkartashev@openjdk.org</a>> wrote:<br>
<br>
> This commit introduces a new client property xawt.mwm_decor_title implementing JDK-8267307. The property can be set prior to showing a window or after the window has been displayed, in which case the window will have to be hidden/shown (re-mapped) for the property to take effect.<br>
> <br>
> The general idea is to provide control over the "decorations" part of the X11 window property called _MOTIF_WM_HINTS. Those "decoration" bits are set to 1 (XWindowAttributesData.AWT_DECOR_ALL) to show all the decorations or 0 (XWindowAttributesData.AWT_DECOR_NONE) to ask the window manager (WM) not to decorate with anything, even borders or resize handles. With xawt.mwm_decor_title property set to "true", this commit adds the ability to set the bits to 2 (XWindowAttributesData.AWT_DECOR_BORDER), which some WMs take as "decorate with only a border", thus effectively removing the window's title bar, but still leaving the resize capability.<br>
> <br>
> This feature was tested and works correctly on "vanilla" Ubuntu 20.04 with the "GNOME Shell" window manager. It was also tested with Xfwm4 and KDE, where it did not have any effect; these two WMs have limited respected for the "decorations" bits of the _MOTIF_WM_HINTS window property.<br>
<br>
Hello, thank you for your contribution, One initial question: what the name "mwm_" of this property actually means?<br></blockquote><div>The name's historical: it's from the _MOTIF_WM_HINTS property of X11 that has "decorations" bits in it (the 3rd word of the structure). For instance, this is from a Firefox window in GNOME that does not have a title bar:</div><div>
<pre class="gmail-wikicode gmail-prettyprint gmail-prettyprinted"><code><span class="gmail-pln">$ xprop </span><span class="gmail-pun">-</span><span class="gmail-pln">id </span><span class="gmail-lit">0x2600003</span><span class="gmail-pln"> </span><span class="gmail-pun">|</span><span class="gmail-pln"> grep </span><span class="gmail-pun">-</span><span class="gmail-pln">i MOTIF_WM_HINTS
_MOTIF_WM_HINTS</span><span class="gmail-pun">(</span><span class="gmail-pln">_MOTIF_WM_HINTS</span><span class="gmail-pun">)</span><span class="gmail-pln"> </span><span class="gmail-pun">=</span><span class="gmail-pln"> </span><span class="gmail-lit">0x2</span><span class="gmail-pun">,</span><span class="gmail-pln"> </span><span class="gmail-lit">0x0</span><span class="gmail-pun">,</span><span class="gmail-pln"> </span><span class="gmail-lit">0x2</span><span class="gmail-pun">,</span><span class="gmail-pln"> </span><span class="gmail-lit">0x0</span><span class="gmail-pun">,</span><span class="gmail-pln"> </span><span class="gmail-lit">0x0<br><br></span></code></pre></div><div> Despite the name ("motif"), this property has apparently become a de-facto standard way to communicate client wishes about its window decoration to any window manager currently in charge.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-------------<br>
<br>
PR: <a href="https://git.openjdk.java.net/jdk/pull/4113" rel="noreferrer" target="_blank">https://git.openjdk.java.net/jdk/pull/4113</a><br>
</blockquote></div></div>