npierce wrote:I have not yet determined if setting GDK_NATIVE_WINDOWS=true will affect only ROX-Filer, or will affect every GTK/GDK application it opens.
The reason that I set it in /usr/local/apps/ROX-Filer/AppRun instead of /root/.xinitrc or earlier, is to, hopefully, limit its effect to ROX-Filer. But it is certainly possible that, once set, all GTK/GDK applications will be affected. I have noticed that when I use ROX-Filer to run urxvt, GDK_NATIVE_WINDOWS does not appear in the environment. So maybe I got lucky.
I found some time to look into this further.
Apparently it works the way I hoped that it would. By setting GDK_NATIVE_WINDOWS in /usr/local/apps/ROX-Filer/AppRun instead of earlier, it is affecting only ROX-Filer, not applications started by ROX-Filer. So other GTK/GDK applications will continue to use "client-side windows", and should not suffer any loss of speed when creating windows.
The effect of GDK_NATIVE_WINDOWS can be seen with help from
xwininfo.
With the unmodified ROX-Filer and libgdk-x11-2.0.so.0.2400.8, running
and clicking on the pinboard (desktop), will result in something like this:
Code: Select all
xwininfo: Window id: 0x800024 "ROX-Filer"
Root window id: 0xaa (the root window) (has no name)
Parent window id: 0xaa (the root window) (has no name)
1 child:
0x800025 (has no name): () 1x1+-1+-1 +-1+-1
The "ROX-Filer" window has only one child. (Yes, it looks like a one pixel window -- I have no idea what it is for.
)
But after killing ROX-Filer, copying the modified AppRun from my earlier post to /usr/local/apps/ROX-Filer/AppRun, and running
Code: Select all
rox -p /root/Choices/ROX-Filer/PuppyPin
xwininfo will report something like this:
Code: Select all
xwininfo: Window id: 0x800024 "ROX-Filer"
Root window id: 0xaa (the root window) (has no name)
Parent window id: 0xaa (the root window) (has no name)
32 children:
0x800056 (has no name): () 58x75+1219+91 +1219+91
0x800055 (has no name): () 58x75+1219+187 +1219+187
0x800054 (has no name): () 58x75+1219+2 +1219+2
0x800053 (has no name): () 58x75+131+91 +131+91
0x800052 (has no name): () 58x75+131+187 +131+187
0x800051 (has no name): () 58x75+259+2 +259+2
0x800050 (has no name): () 58x75+195+91 +195+91
0x80004f (has no name): () 58x75+323+2 +323+2
0x80004e (has no name): () 66x75+383+2 +383+2
0x80004d (has no name): () 58x75+3+91 +3+91
0x80004c (has no name): () 64x75+2+187 +2+187
0x80004b (has no name): () 58x75+131+2 +131+2
0x80004a (has no name): () 58x75+67+2 +67+2
0x800049 (has no name): () 58x75+3+2 +3+2
0x800048 (has no name): () 58x75+3+283 +3+283
0x800047 (has no name): () 68x75+2+379 +2+379
0x800046 (has no name): () 58x75+67+91 +67+91
0x800045 (has no name): () 58x75+67+187 +67+187
0x800044 (has no name): () 58x75+195+2 +195+2
0x800043 (has no name): () 58x75+67+283 +67+283
0x800042 (has no name): () 58x75+3+699 +3+699
0x800041 (has no name): () 58x75+67+699 +67+699
0x800040 (has no name): () 58x75+131+699 +131+699
0x80003f (has no name): () 58x75+195+699 +195+699
0x80003e (has no name): () 58x75+259+699 +259+699
0x80003d (has no name): () 58x75+323+699 +323+699
0x80003c (has no name): () 58x75+387+699 +387+699
0x80003b (has no name): () 58x75+451+699 +451+699
0x80003a (has no name): () 58x75+515+699 +515+699
0x800039 (has no name): () 58x75+579+699 +579+699
0x800038 (has no name): () 58x75+643+699 +643+699
0x800025 (has no name): () 1x1+-1+-1 +-1+-1
Now the "ROX-Filer" window still has the child it had before, plus it has a child for each of the icons on my desktop. This is exactly what "GDK_NATIVE_WINDOWS=true" is supposed to do.
If I then click on the "setup" icon and ask
xwininfo for a report on the children of its window, I get this:
Code: Select all
xwininfo: Window id: 0x4400003 "Puppy Setup"
Root window id: 0xaa (the root window) (has no name)
Parent window id: 0x6b0ffc (has no name)
1 child:
0x4400004 (has no name): () 1x1+-1+-1 +202+221
There is only one child despite all of those buttons. So this application is still using "client-side windows", even though it was launched from ROX-Filer, which is using native X windows.
Apparently, ROX-Filer does not export GDK_NATIVE_WINDOWS to the applications that it starts. So even if that variable is exported to the environment before X is started, it will not pass it along.
But if you launch an application with the JWM menu, or from a terminal that was launched with the JWM menu, GDK_NATIVE_WINDOWS
will be exported to the application.
For instance, if instead of setting GDK_NATIVE WINDOWS=true in /usr/local/apps/ROX-Filer/AppRun it was exported to the environment before starting X, it would affect all GTK/GDK applications launched with the JWM menu, and the
xwininfo report for "Puppy Setup" would look like this:
Code: Select all
xwininfo: Window id: 0x4400003 "Puppy Setup"
Root window id: 0xaa (the root window) (has no name)
Parent window id: 0x6b235e (has no name)
12 children:
0x4400032 (has no name): () 32x24+300+317 +528+564
0x4400031 (has no name): () 26x26+306+286 +534+533
0x4400030 (has no name): () 26x26+306+255 +534+502
0x440002f (has no name): () 27x27+305+223 +533+470
0x440002e (has no name): () 28x28+304+190 +532+437
0x440002d (has no name): () 26x26+306+159 +534+406
0x440002c (has no name): () 26x26+306+128 +534+375
0x440002b (has no name): () 26x26+306+97 +534+344
0x440002a (has no name): () 26x25+306+67 +534+314
0x4400029 (has no name): () 26x26+306+36 +534+283
0x4400028 (has no name): () 26x26+306+5 +534+252
0x4400004 (has no name): () 1x1+-1+-1 +227+246
Now it shows a native X window for each button, plus that mystery one-pixel window. In the case of "Puppy Setup" I don't think that this would cause any problems, but this example shows that exporting GDK_NATIVE_WINDOWS=true before starting X could affect any GTK/GDK application, which could cause performance issues with some applications. It is safer to just set it for ROX-Filer, as done by the modified /usr/local/apps/ROX-Filer/AppRun.
Bottom line: It looks like the modified /usr/local/apps/ROX-Filer/AppRun should not affect anything other than ROX-Filer itself.