Re: [dev] [dwm] Need help about gray windows of Java applications
On Wed, May 15, 2019 at 01:15:43PM +0200, Przemek Dragańczuk wrote:
> LG3D was a WM written in Java, which maximises the irony.
OK, I didn't know that one. Awesome.
> Java apps
> know how to work on it, so they work fine when they think they are
> running on it. The issue has something to do with reparenting, (which
> I don't know nearly enough about to explain) that some WMs (xfwm4, Gnome
> etc.) do the way Java expects, while others (dwm, qtile, LG3D) do it in
> a different way (or don't do it at all, I'm not sure).
>
Other WMs like to draw a title bar above the window, with some controls,
probably because Windows 3.11 did it this way, and some programmers are
nothing if not sticklers for tradition. But how to implement this in
X11?
Simple: When an application creates a window, it will create the new
window as child of the root window. The WM gets the event for that, and
creates a new window itself, that is a bit bigger than the window just
created. Then the WM tells X11 to make the new application window a
child of the WM's window - that is the reparenting step.
Tiling window managers often don't do this, and the result is a bare
window, only maybe embelished with a border.
I have no idea, how exactly the absence of this event causes Java apps
to blank. I tried to research it once and gave up -- OpenJDK is not the
nicest source code on Earth. Then again, Java is not the nicest language
on Earth. Event-wise it shouldn't make much of a difference either way.
> TL;DR: Java apps are stupid and have to be tricked into thinking
> they're on another WM to work.
>
Worse, the error is in a commonly used library for Java GUI apps (was it
AWT?). Therefore, the application developers can't do anything about
this. It's similar to the problem we have with libxft and colored fonts.
Until libxft is fixed, we're just going to have to crash dwm and dmenu
and st a whole lot.
Except in the latter case we could actually do something about this.
Ciao,
Markus
Received on Wed May 15 2019 - 16:32:45 CEST
This archive was generated by hypermail 2.3.0
: Wed May 15 2019 - 17:00:09 CEST