Does Motif need a clipboard manager?

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

5 posts / 0 new
Last post
Does Motif need a clipboard manager?

Submitted by RobArthan on Wed, 02/03/2010 - 17:31. General Questions
I use and develop Motif applications with text widgets and the cut/copy/paste feature is behaving oddly on Mac OS X 10.6.2. I am using the X11 installation that comes with Snow Leopard. What I find is that paste doesn't work at all if I enable syncing of the OSX pasteboard and the X11 clipboard (cut deletes the text, but paste never inserts anything). If I disable syncing, paste works within one process, but if I start up another process, paste doesn't work from one process to another unless I run xclipboard. Is this expected behaviour? I.e., does Motif rely on a clipboard manager for cut/copy/paste to work?

Regards,

Rob.

fredk

I find that I have to add these translations to all XmText and XmTextField widgets to guarantee that cut/copy/paste work properly:

?*XmText.translations: #override \n\
CtrlC : copy-clipboard() \n\
CtrlV : paste-clipboard() \n\
CtrlX : cut-clipboard()

--
Fred K

dpeterc

Thanks for the great tip!
In OpenMotif 2.3 I had to add < Key > after the Ctrl in order for it to parse correctly.
I think you did as well, but the bulletin board software apparently takes it as a tag and filters it out.
So this is the correct sequence:

*XmText.translations: #override \n\
Ctrl< Key >c : copy-clipboard() \n\
Ctrl< Key >v : paste-clipboard() \n\
Ctrl< Key >x : cut-clipboard()

but you need to delete the spaces before and after the "Key".

RobArthan

Thanks for the suggestion, but that isn't the source of the problem (what you are doing is binding the keys to the text widget's actions, but I am seeing the problem regardless of how the cut/copy/paste functionality is invoked, e.g., from an edit menu).

May I repeat that the problem seems to be new in Snow Leopard and the symptom is that pasting from one instance of a Motif application to another works if xclipboard is running but not if it isn't. Is that expected behaviour?

Regards,

Rob.

fredk

Cut/copy/paste work fine on all the platforms I tried (Hp, SGI, AIX, and various Linux implementations, plus a PC using eXceed) without xclipboard running.

(and yes, I did try to include the < Key > description)
--
Fred K