home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x:20473 comp.windows.x.motif:8171
- Newsgroups: comp.windows.x,comp.windows.x.motif
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsk!cbnewsj!daver
- From: daver@cbnewsj.cb.att.com (dave.robertson)
- Subject: Help Request for mwm send.msg
- Organization: AT&T
- Date: Tue, 22 Dec 1992 13:41:47 GMT
- Message-ID: <1992Dec22.134147.18146@cbnewsj.cb.att.com>
- Followup-To: comp.windows.x
- Keywords: Motif, mwm, send.msg, XChangeProperty, Atom
- Lines: 58
-
-
- 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!"
-