Subject: ModuleSynchronous FvwmWinList

From: Olivier Chapuis <[email-masked]>
Date: Sat, 16 Oct 1999 19:56:18 +0200

Hello,

If you do ModuleSynchronous FvwmWinList with the current cvs,
then you lock fvwm (in my machine, try with a Timeout !).
The reason is that FvwmWinList is Lock on send and that
WinList "SendFvwmPipe("Send_WindowList",0);" before it 
"SendFinishedStartupNotification(Fvwm_fd);". I do not go in the
details but a simple fix is to invert the two above lines.

May be it will be useful to be able to can cancel a ModuleSynchronous
command by a Ctrl-Alt-Escape (I will send a patch soon if you want).

Olivier
-- 
[email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Olivier Chapuis <[email-masked]>
Date: Sun, 17 Oct 1999 11:47:04 +0200

> details but a simple fix is to invert the two above lines.

A better solution is attached to this message: Send that we
are lock on send after SendFinishedStartupNotification.

The change log is here (modules/ChangeLog)

*FvwmWinList.c (main): Fix a problem if we start WinList with
ModuleSynchronous.

Olivier

Index: FvwmWinList.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmWinList/FvwmWinList.c,v
retrieving revision 1.47
diff -u -b -B -u -r1.47 FvwmWinList.c
--- FvwmWinList.c	1999/10/12 00:52:31	1.47
+++ FvwmWinList.c	1999/10/17 09:48:42
@@ -166,6 +166,7 @@
 int main(int argc, char **argv)
 {
   char *temp, *s;
+  unsigned long mask;
 #ifdef HAVE_SIGACTION
   struct sigaction  sigact;
 #endif
@@ -251,15 +252,17 @@
   /* Request a list of all windows,
    * wait for ConfigureWindow packets */
 
-  SetMessageMask(Fvwm_fd,
+  mask = 
 #ifdef MINI_ICONS
 		 M_MINI_ICON |
 #endif
-		 M_CONFIGURE_WINDOW | M_ADD_WINDOW | M_DESTROY_WINDOW |\
-		 M_WINDOW_NAME | M_ICON_NAME | M_DEICONIFY | M_ICONIFY |\
-		 M_END_WINDOWLIST | M_NEW_DESK | M_FOCUS_CHANGE |\
-		 M_CONFIG_INFO | M_SENDCONFIG | M_LOCKONSEND);
+		 M_CONFIGURE_WINDOW | M_ADD_WINDOW | M_DESTROY_WINDOW |
+		 M_WINDOW_NAME | M_ICON_NAME | M_DEICONIFY | M_ICONIFY |
+		 M_END_WINDOWLIST | M_NEW_DESK | M_FOCUS_CHANGE |
+		 M_CONFIG_INFO | M_SENDCONFIG;
 
+  SetMessageMask(Fvwm_fd,mask);
+
   SendFvwmPipe("Send_WindowList",0);
 
   /* Recieve all messages from Fvwm */
@@ -267,6 +270,9 @@
 
   /* tell fvwm we're running */
   SendFinishedStartupNotification(Fvwm_fd);
+
+  /* Need to lock on send here because of ModuleSynchronous */
+  SetMessageMask(Fvwm_fd, mask | M_LOCKONSEND);
 
   MainEventLoop();
 #ifdef FVWM_DEBUG_MSGS

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 18 Oct 1999 11:58:33 +0200

> are lock on send after SendFinishedStartupNotification.

Applied.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]