tag 452404 + patch
thanks
I had trouble with the mouse button not working too with either oroborus
or fvwm.
Nosing around the code I think the main loop may sleep in a select()
when there's still X events in the queue. Does that select do anything?
It looks worryingly like a cut and paste from desklaunch or keylaunch
which re-read their rc file on a signal. Perhaps in deskmenu it's not
needed at all (since the rc file is re-read on each popup).
I also found for some reason the XSelectInput lost from the proxy window
when the popup is run, which made the second and subsequent button press
not work. Dunno why, might have to put it under xmon to see exactly
where is to blame. It helps for me to reinstate it after each popup per
below.
--- deskmenu.c.orig 2013-10-28 16:25:51.000000000 +1100
+++ deskmenu.c 2013-10-28 16:27:49.000000000 +1100
@@ -381,37 +381,10 @@
int
main (int argc, char *argv[])
{
- fd_set readset;
- int x_filedescriptor;
-
initialize (argc, argv);
- x_filedescriptor = XConnectionNumber(dpy);
-
while (1)
{
- FD_ZERO(&readset);
- FD_SET(x_filedescriptor, &readset);
-
-#ifdef DEBUG
- printf ("select xfd:%d \n", x_filedescriptor);
-#endif
-
-INT: if (-1 == select(x_filedescriptor+1, &readset, 0, 0, 0))
- if (errno == EINTR)
- {
-#ifdef DEBUG
- printf ("und n goto...\n");
-#endif
- goto INT;
- }
- else
- {
- perror ("An unexpected error has occcured! (-");
- exit (1);
- }
-
- XPending (dpy);
XEvent ev;
XNextEvent (dpy, &ev);
@@ -419,6 +392,8 @@
{
mode = MODE_MOUSE;
popup_menu (&ev);
+ proxy_win = get_gnome_hint (root, WIN_DESKTOP_BUTTON_PROXY);
+ XSelectInput (dpy, proxy_win, SubstructureNotifyMask);
}
if (ev.type == KeyPress)
{
--
If you book them they will come.