This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: xwinclip re selection polling
- From: Jehan <nahor at bravobrava dot com>
- To: cygwin-xfree at cygwin dot com
- Date: Fri, 30 Aug 2002 08:44:40 -0700
- Subject: Re: xwinclip re selection polling
- Newsgroups: gmane.os.cygwin.xfree
- References: <F246ghNHAxfPNnDx0mK0001f264@hotmail.com>
- Reply-to: cygwin-xfree at cygwin dot com
Chris Twiner wrote:
I think until it's integrated within XWin (still think Harolds right
about the closing of connection, I can test for the Cygwin/XFree86
window being closed, I can even stop it but I can't catch the xlib
bombing out on a send/receive) it must have a windows window not a
console to close properly. This would allow the proper trapping of the
messages. It doesn't need to show anything in the window just to be a
visible one. Of course it doesn't stop someone killing the process but
it does at least make the close work.
Wouldn't a window with a "shape window" (ala xeyes), where the shape
leaves nothing visible, work? Or a window that always stay out of the
screen boundaries.
Maybe having a window visible isn't a bad idea. This give the choice to
the user to kill xwinclip if it doesn't want to share the clipboards
anymore.
The window could also always stay minimized.
Or xwinclip could become some sort of extended xclipboard. Storing
multiple X and Windows content.
Good un. Although I'm not sure it's entirely wanted behaviour. What if
you just start xwinclip between selection operations on the XWin x
clients? Should it automatically clear them or is the reason you're
starting xwinclip because you want to give them the windows clipboard.
I think it's the latter, I'll put it in (means owning XA_PRIMARY when it
starts up, no biggy).
I guess that usually, xwinclip is started in the same script than XWin.
But in any case, the best solution may then be to check if one of the
clipboard is empty (either Windows or X) and copy the content of the
other. If both are full we have to make an arbitrary choice. Feeble
excuses are:
- when we start xwinclip and X alreay has a selection, it's likely that
XWin is active. As such, it's easier to reselect what is in X if
necessary than having to switch to a Windows application (in favor of
using the Windows clipboard).
- The selection in Windows in permanent while in X it isn't. So it would
be easier to recover the Windows clipboard than the X one (just need to
copy what is already selected, while in X, we would need to reselect it
first) (in favor of using X content).
- AFAIK, there is no "cut" operation in X, only paste while in Windows,
we have a "cut". So if the content of the Windows clipboard has been
cut, there is no way to recover it once lost (except if the application
has an "undo" feature). (in favor of Windows).
- I threw a coin and it said to use Windows (in favor of Windows).
- I threw a another coin and it said to use X (in favor of X).
Ok, that's all I can think of for now. The choice is yours :)
Jehan