Argolance,
Here is a version of ROX-Filer that I have fixed so that you can again use multiple JWM menus without any need for GDK_NATIVE_WINDOWS. It works for me, but I would be grateful if you would test it to see if it works for you.
Backup your current version of /usr/local/apps/ROX-Filer, and replace it with the attached file. You will need to first kill all current instances of ROX-Filer or you may get a "file busy" error. Then start rox with the usual:
Code: Select all
rox -p /root/Choices/ROX-Filer/PuppyPin
I would be grateful to receive additional reports from anyone else who would do me the favor of testing this.
This bug can be seen even when you have only the single JWM menu that comes with Racy 5.2.2.
1. Click the right mouse button on the desktop to bring up the JWM root menu.
2. Click any mouse button on the desktop to dismiss the menu.
3. Click the left mouse button once on an icon. The application should launch. If it does not launch until you click a second time, you have this bug.
Also, you can go through steps 1 and 2 again, then try this for step 3:
3. Click the right mouse button once on an icon. The ROX-Filer menu should come up. If the JWM root menu comes up, you have this bug.
Note that, in both flavors of step 3, the bug will appear even if you click an icon in a ROX-Filer window instead of the desktop.
Here is what I think is happening:
As you may know, each icon on the ROX pinboard has an invisible window floating over it. Back before GTK/GDK 2.18, these windows were real X windows, created by the X server at the request of GDK. Now those windows are created by GDK itself and are what GDK calls "client-side windows". So now, instead of being an X window with a bunch of child X windows, the pinboard is an X window with a bunch of child client-side windows.
What's happening is that when you click the right mouse button on the "desktop", which is actually the ROX pinboard, ROX "grabs" the mouse so that future pointer events will be delivered to the ROX pinboard window, no matter where the pointer moves to. This "grab" is an automatic "passive grab" which happens in any application when a mouse button is pressed, and is automatically released when the mouse button is released.
So far, so good. But because ROX passes the button-press-event to the root window so that JWM can use it, it needs to manually ungrab the mouse. Previously ROX did this with a call to XUngrabPointer(), an Xlib function.
When ROX was using all real X windows, that was fine. When JWM was done, the next button-press-event would go to whatever X window was under the pointer. In fact, it still does. But now, the pinboard has only the one X window, so if the pinboard or any of its icons is under the pointer, the event will go to the pinboard, but not necessarily to the correct client-side child window of the pinboard. It will go to the window that grabbed the pointer in the first place -- either the pinboard window itself, or one of its client-side children.
I replaced the call to the Xlib function, XUngrabPointer(), with a call to the GDK function, gdk_display_pointer_ungrab(). This function will also tell X to release the grab, but it additionally tells GDK to release the grab so that the next button-press event will go to whatever client-side window is under the pointer, not the window that made the grab.
At least that is my best guess -- I've not looked at the GDK source to verify that.
(By the way, since antique versions of Blackbox and Fluxbox required ROX-Filer's "Blackbox root menus hack" option, to allow the right-click root menu to remain displayed until you have selected an item, and since that relates to this ungrab, I dug up an old (circa 2002) Blackbox (
blackbox_0.65.0-5_i386.deb) from the Debian archives and tested it to make sure that this option still worked properly with my change. It does. Note that newer versions of Blackbox and Fluxbox, such as
blackbox-0.70.1.pet and
fluxbox-1.3.2.pet do not need this option.)
The attached file was compiled from the following source (which already contains Barry's patches, including the February patch for the focus bug):
http://bkhome.org/sources/alphabetical/ ... hed.tar.gz
Here is my one change to the source:
Code: Select all
diff -u old/pinboard.c new/pinboard.c
--- old/pinboard.c 2011-10-22 13:48:50.000000000 -0400
+++ new/pinboard.c 2012-03-13 08:00:47.000000000 -0400
@@ -1363,7 +1363,8 @@
{
xev.type = ButtonPress;
if (!o_blackbox_hack.int_value)
- XUngrabPointer(gdk_display, event->time);
+ gdk_display_pointer_ungrab( gdk_x11_lookup_xdisplay( gdk_display ),
+ event->time ) ;
}
else
xev.type = ButtonRelease;
Anyway, Argolance, I hope this works for you with your three JWM menus.
Filename: ROX-Filer.gz
File description: ROX-Filer with ungrab bug fixed