Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with non-reparenting window manager support. #22

Open
pejorativefox opened this issue Dec 4, 2014 · 6 comments
Open

Problems with non-reparenting window manager support. #22

pejorativefox opened this issue Dec 4, 2014 · 6 comments

Comments

@pejorativefox
Copy link

Running swing-htabs-v0.0.jar while using a non-reparenting window manage like AwesomeWM, Xmonad, or dwm only a grey box is shown. This seems to be a problem with java having a hard coded list of window managers that support this parenting strategy. Some apps like minecraft have fixed this issue in current versions, but was present in earlier versions.

There are solutions and tools for users to fix this behavior. OpenJDK supports an environment variable, and there are a few tools that can 'fudge' the name of the window manager to one supported on the list.

Info from arch wiki's XMonad page: "The standard Java GUI toolkit has a hard-coded list of "non-reparenting" window managers. Since xmonad is not in that list, there can be some problems with running some Java applications. One of the most common problems is "gray blobs", when the Java application renders as a plain gray box instead of rendering the GUI."

This is reproducible for sure on Ubuntu 14.04 64bit under the Awesome window manager using java version "1.7.0_72", but I think it's present on all combinations and versions.

@hrj
Copy link
Member

hrj commented Dec 4, 2014

According to @chris-statzer the default LAF does works fine.

@pejorativefox
Copy link
Author

With system LAF as default

java_awesome_parenting

@pejorativefox
Copy link
Author

With cross-platform LAF as default

... and later switched to GTK+
java_awesome_parenting_working

@hrj hrj added the help wanted label Dec 5, 2014
@hrj
Copy link
Member

hrj commented Dec 5, 2014

@chris-statzer has some workarounds on the environment side, that he says will share later.

On our side, we could provide a property or command-line parameter that stops use of the system LAF upon startup.

Since this is a demo app, it's not a big deal, but the discussion here will be also useful in gngr, since we are using the system LAF there too.

@hrj
Copy link
Member

hrj commented Dec 20, 2014

I was able to reproduce this problem on

debian + xmonad + openjdk8 + gngr-v0-0-0.jar

I guess it is similar to the problem that @chris-statzer faced with swing-htabs.

Both the workarounds mentioned in this wiki page worked fine:

  1. Setting the environment variable _JAVA_AWT_WM_NONREPARENTING=1
  2. calling SetWMName with LG3D

I have not tried other tiling WM yet.

@hrj
Copy link
Member

hrj commented Dec 20, 2014

wmname seems to achieve the same effect as the second workaround above.

(tip from @chris-statzer on IRC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants