home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!sgiblab!nec-gw!nec-tyo!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
- From: daver@cbnewsj.cb.att.com (dave.robertson)
- Newsgroups: fj.mail-lists.x-window
- Subject: Help Request for mwm send.msg
- Message-ID: <1992Dec22.154204.648@sm.sony.co.jp>
- Date: 22 Dec 92 15:42:04 GMT
- Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
- Distribution: fj
- Organization: AT&T
- Lines: 63
- Approved: michael@sm.sony.co.jp
-
- Date: Tue, 22 Dec 1992 13:41:47 GMT
- Message-Id: <1992Dec22.134147.18146@cbnewsj.cb.att.com>
- Newsgroups: comp.windows.x,comp.windows.x.motif
- Sender: xpert-request@expo.lcs.mit.edu
-
-
- I tried posting this last week, but received no response or suggestions
- from the motif newsgroup, and so I am re-posting and also cross-posting
- to comp.windows.x .........
-
- I am having problems trying to use the send_msg function in mwm.
- I need to add an application specific capability to each window
- manager menu, and I believe that this can be achieved in this manner.
-
- Firstly in my mwm configuration file I define the menu as follows :
-
- Menu DefaultWindowMenu MwmWindowMenu
- {
- MyFunc f.send_msg 123
- Restore f.normalize
- Minimize f.minimize
- Maximize f.maximize
- Lower f.lower
- no-label f.separator
- Close f.kill
- }
-
- where MyFunc is my application specific capability.
- On startup, I do the following:
-
- Atom wm_motif_messages;
-
- wm_motif_messages = XInternAtom(dpy, "_MOTIF_WM_MESSAGES", FALSE);
-
- Then, when windows are created:
-
- static int helpmsg = 123;
-
- XChangeProperty(dpy, win, wm_motif_messages, XA_INTEGER, 32,
- PropModeReplace, (unsigned char *) &helpmsg, 1);
-
- I then check for the appropriate ClientMessage event while the application
- is running.
-
- My problem is that MyFunc is always dimmed. What am I doing wrong?
- I suspect that my XChangeProperty() call may be at fault and I have
- tried a few variations on the above. If I run xprop on one of my windows
- then it appears that the message number 123 has been correctly registered
- with the _MOTIF_WM_MESSAGES property.
-
- One further point, I am not using the Motif toolkit but instead a
- proprietary Xlib based class library. The principles ought to be the
- same though.
-
- If anyone has done this before and has code segments that they don't
- mind sharing, or any suggestions, I'd really appreciate it.
-
- Dave Robertson
- Consultant att!mtnms!dar
- AT&T Paradyne
- Middletown, NJ (908) 957 3925
-
- // "All I want for Christmas is for my send.msg to work!"
-