Re: [dev] [dwm] Need help about gray windows of Java applications
On Wed, May 15, 2019 at 8:59 PM Markus Wichmann wrote: > > 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. I haven't got any clue, but I asked one of my professors and he said he mostly saw this problem with Java Swing apps. But he also didn't know where particularly the problem originates. And by the way, I am a huge fool. `$ man dwm` has a nice entry at the very last. I should've given it a read before asking for help. Will remember to do that next time. Regards, Enan Ajmain
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
Re: [dev] [dwm] Need help about gray windows of Java applications
I have it in my .xinitrc, .zprofile (.bash_profile) and in my .zshrc (.bashrc). I can never remember where it should be, so that way I know it works somewhere. LG3D was a WM written in Java, which maximises the irony. 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). TL;DR: Java apps are stupid and have to be tricked into thinking they're on another WM to work. On 14/05/19 04:37, Enan Ajmain wrote: > Thanks. It worked. > > I've added `wmname LG3D` in xinitrc, but it doesn't work for some > reason. But I invoked in manually from bash before launching logisim > and it worked fine. I don't care about xinitrc, because I would have > liked to use this method only for that one application only anyway. > > I have checked the page for wmname in suckless.org and found this > method listed there. Would you mind explaining what LG3D is and why > this was chosen as opposed to anything else? And one more thing, if I > invoke `wmname LG3D` from one bash instance, it would not manipulate > the other windows, right? I mean, the other windows I open are not > gonna have wmname property of LG3D, only the logisim window (launched > from the bash instance where `wmname LG3D` was invoked) would get that > property, right? > > Thanks again for your help, > Enan Ajmain > > On Sun, May 12, 2019 at 7:29 PM Przemek DragaDczuk > wrote: > > > > In the terminal, as part of your shell's RC file (.bashrc, > > .zshrc etc.) or in .xinitrc. I have it in a startup script that > > is executed from .xinitrc when dwm starts. > > On 12/05/19 06:13, Enan Ajmain wrote: > > > Where do I run `wmname LG3D`? > > > > > > On Sun, May 12, 2019 at 4:41 PM Przemek DragaDczuk > > > wrote: > > > > > > > > Running `wmname LG3D` should help with that. I've had similar issue and > > > > that fixed it for me. > > > > On 12/05/19 03:09, Enan Ajmain wrote: > > > > > Hi, > > > > > > > > > > I need to use logisim, a tool for designing and simulating logic > > > > > circuits. But the problem is that logisim is built in Java, and due to > > > > > well-known issue in Java it doesn't launch properly in dwm. I just > > > > > installed xfce4 and checked that logisim works perfectly fine with it. > > > > > After moving around in xfce4 for an hour and due to previous usage, > > > > > I'm thinking of switching back to xfce. I wouldn't even think about it > > > > > if it was not so difficult to install xfce from source. > > > > > > > > > > Anyway, I'd like to keep using dwm, but it doesn't lauch the > > > > > previously mentioned tool because it was built in Java. I have tried > > > > > the following solution suggested by ArchWiki, but it doesn't work for > > > > > logisim. If anyone else has any idea, please let me know. > > > > > > > > > > ``` > > > > > export _JAVA_AWT_WM_NONREPARENTING=1 > > > > > ``` > > > > > > > > > > Thanks, > > > > > Enan Ajmain > > > > > > > > > > > > > Sent via Migadu.com, world's easiest email hosting > > > > > > > > > > > Sent via Migadu.com, world's easiest email hosting > > > Sent via Migadu.com, world's easiest email hosting
Re: [dev] [dwm] Need help about gray windows of Java applications
On Tue, May 14, 2019 at 6:01 PM Storkman wrote: > > > > On May 14, 2019 10:37:57 AM UTC, Enan Ajmain <3nan.ajm...@gmail.com> wrote: > >Thanks. It worked. > > > >I've added `wmname LG3D` in xinitrc, but it doesn't work for some > >reason. But I invoked in manually from bash before launching logisim > >and it worked fine. I don't care about xinitrc, because I would have > >liked to use this method only for that one application only anyway. > > Perhaps because you're not using xinit to start X? I am using xinit. I login my account after booting and launch `startx`. Isn't that the default way that xinit is supposed to be used? > >I have checked the page for wmname in suckless.org and found this > >method listed there. Would you mind explaining what LG3D is and why > >this was chosen as opposed to anything else? And one more thing, if I > >invoke `wmname LG3D` from one bash instance, it would not manipulate > >the other windows, right? > > As the suckless.org page states, it is a property of the root window, so no. > It will affect everything forever... until you restart X, or change the > property again. > > That being said, I've had wmname LG3D in my .xinitrc for years now, and it's > never interfered with anything as far as I can tell. > > As for what "LG3D" is, apparently it used to be some wacky Java 3D window > manager back in the magical times when that sounded like a good idea. > > > -- > Storkman >
Re: [dev] [dwm] Need help about gray windows of Java applications
On May 14, 2019 10:37:57 AM UTC, Enan Ajmain <3nan.ajm...@gmail.com> wrote: >Thanks. It worked. > >I've added `wmname LG3D` in xinitrc, but it doesn't work for some >reason. But I invoked in manually from bash before launching logisim >and it worked fine. I don't care about xinitrc, because I would have >liked to use this method only for that one application only anyway. Perhaps because you're not using xinit to start X? >I have checked the page for wmname in suckless.org and found this >method listed there. Would you mind explaining what LG3D is and why >this was chosen as opposed to anything else? And one more thing, if I >invoke `wmname LG3D` from one bash instance, it would not manipulate >the other windows, right? As the suckless.org page states, it is a property of the root window, so no. It will affect everything forever... until you restart X, or change the property again. That being said, I've had wmname LG3D in my .xinitrc for years now, and it's never interfered with anything as far as I can tell. As for what "LG3D" is, apparently it used to be some wacky Java 3D window manager back in the magical times when that sounded like a good idea. -- Storkman
Re: [dev] [dwm] Need help about gray windows of Java applications
In the terminal, as part of your shell's RC file (.bashrc, .zshrc etc.) or in .xinitrc. I have it in a startup script that is executed from .xinitrc when dwm starts. On 12/05/19 06:13, Enan Ajmain wrote: > Where do I run `wmname LG3D`? > > On Sun, May 12, 2019 at 4:41 PM Przemek DragaDczuk > wrote: > > > > Running `wmname LG3D` should help with that. I've had similar issue and > > that fixed it for me. > > On 12/05/19 03:09, Enan Ajmain wrote: > > > Hi, > > > > > > I need to use logisim, a tool for designing and simulating logic > > > circuits. But the problem is that logisim is built in Java, and due to > > > well-known issue in Java it doesn't launch properly in dwm. I just > > > installed xfce4 and checked that logisim works perfectly fine with it. > > > After moving around in xfce4 for an hour and due to previous usage, > > > I'm thinking of switching back to xfce. I wouldn't even think about it > > > if it was not so difficult to install xfce from source. > > > > > > Anyway, I'd like to keep using dwm, but it doesn't lauch the > > > previously mentioned tool because it was built in Java. I have tried > > > the following solution suggested by ArchWiki, but it doesn't work for > > > logisim. If anyone else has any idea, please let me know. > > > > > > ``` > > > export _JAVA_AWT_WM_NONREPARENTING=1 > > > ``` > > > > > > Thanks, > > > Enan Ajmain > > > > > > > Sent via Migadu.com, world's easiest email hosting > > > Sent via Migadu.com, world's easiest email hosting
Re: [dev] [dwm] Need help about gray windows of Java applications
Running `wmname LG3D` should help with that. I've had similar issue and that fixed it for me. On 12/05/19 03:09, Enan Ajmain wrote: > Hi, > > I need to use logisim, a tool for designing and simulating logic > circuits. But the problem is that logisim is built in Java, and due to > well-known issue in Java it doesn't launch properly in dwm. I just > installed xfce4 and checked that logisim works perfectly fine with it. > After moving around in xfce4 for an hour and due to previous usage, > I'm thinking of switching back to xfce. I wouldn't even think about it > if it was not so difficult to install xfce from source. > > Anyway, I'd like to keep using dwm, but it doesn't lauch the > previously mentioned tool because it was built in Java. I have tried > the following solution suggested by ArchWiki, but it doesn't work for > logisim. If anyone else has any idea, please let me know. > > ``` > export _JAVA_AWT_WM_NONREPARENTING=1 > ``` > > Thanks, > Enan Ajmain > Sent via Migadu.com, world's easiest email hosting
[dev] [dwm] Need help about gray windows of Java applications
Hi, I need to use logisim, a tool for designing and simulating logic circuits. But the problem is that logisim is built in Java, and due to well-known issue in Java it doesn't launch properly in dwm. I just installed xfce4 and checked that logisim works perfectly fine with it. After moving around in xfce4 for an hour and due to previous usage, I'm thinking of switching back to xfce. I wouldn't even think about it if it was not so difficult to install xfce from source. Anyway, I'd like to keep using dwm, but it doesn't lauch the previously mentioned tool because it was built in Java. I have tried the following solution suggested by ArchWiki, but it doesn't work for logisim. If anyone else has any idea, please let me know. ``` export _JAVA_AWT_WM_NONREPARENTING=1 ``` Thanks, Enan Ajmain