Commit graph

31 commits

Author SHA1 Message Date
fredkiefer
40fc6bfe72 * Tools/xpbs.m (-xProvideSelection:): Leave enough space for all
possible types.
* Source/x11/XGDragView.m: Simplify D&D window detection code.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37457 72102866-910b-0410-8b05-ffd578937521
2013-12-13 12:58:09 +00:00
ericwa
e65aa1f9f9 * Tools/xpbs.m: Add some more comments
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33709 72102866-910b-0410-8b05-ffd578937521
2011-08-07 21:49:43 +00:00
ericwa
defca0e36e * configure.ac: Test for Xfixes
* configure: Regenerate
* config.h.in: Regenerate
* Tools/xpbs.m: If Xfixes is available, use it to receive notifications when the
owner of an X11 selection changes.

In the future we should invalidate the list of cached pasteboard types when this
happens, so, e.g. copying text from gnome-terminal, the general pasteboard will only
have the text type, but subsequently copying text from OpenOffice.org, the general
pasteboard will have plain text and RTF types (currently we don't do this, so
you can't paste RTF contents unless it is in the clipboard when gpbs starts.)

The above problem is also why DND from X to GNUstep doesn't work - the dragging
pasteboard types are never updated.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33708 72102866-910b-0410-8b05-ffd578937521
2011-08-07 21:38:42 +00:00
ericwa
66c1fa999a * Tools/xpbs.m: Get copy and paste of rich text from OpenOffice.org
to Ink working.

- OOo uses the MIME type "text/richtext", so make that another alias for RTF
- Fix an obscure bug in measuring the size of the return buffer of
XGetWindowProperty. When an array of Atom's is returned xlib will claim
that they are 32-bit when in fact they may be 64-bit. This was causing
xpbs to miss half of the available types for a clipboard on 64-bit systems.
- Don't use 'True' for the delete paramater of XGetWindowProperty. I'm not sure
why we were deleting window properties before. gtk doesn't do that.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33695 72102866-910b-0410-8b05-ffd578937521
2011-08-05 00:13:25 +00:00
fredkiefer
c5e5d1d202 Fixes warnings reported by clang.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32823 72102866-910b-0410-8b05-ffd578937521
2011-04-09 17:10:49 +00:00
fredkiefer
f4de37421d * Tools/xpbs.m (-pasteboard:provideDataForType:, -availableTypes)
(-xSelectionNotify:): Better handling of plain text data types.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32694 72102866-910b-0410-8b05-ffd578937521
2011-03-23 19:44:46 +00:00
wlux
09fa98f760 Fix race condition where gpbs could time out waiting for a property
change notification from the X server, which is already present in the
X event queue.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32457 72102866-910b-0410-8b05-ffd578937521
2011-03-05 14:40:22 +00:00
fredkiefer
ce071a0bd5 Add missing comma after name of selection atom.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29270 72102866-910b-0410-8b05-ffd578937521
2010-01-12 21:28:01 +00:00
wlux
eb084d0f64 Prevents an issue where gpbs could block in XNextEvent and other
applications contacting the pasteboard server become unresponsive.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27056 72102866-910b-0410-8b05-ffd578937521
2008-11-14 21:36:30 +00:00
fredkiefer
e8f4f76ae1 Use XInternAtom when XInternAtoms isn't available.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26962 72102866-910b-0410-8b05-ffd578937521
2008-10-24 17:04:10 +00:00
fredkiefer
e6bb6f08ad Improve RTF format handling and add TIFF handling in X pasteboard.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26015 72102866-910b-0410-8b05-ffd578937521
2008-01-31 21:27:36 +00:00
fredkiefer
dfed2b09c7 Add some RTF support to X clipboard.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26011 72102866-910b-0410-8b05-ffd578937521
2008-01-29 01:47:04 +00:00
fredkiefer
8dc49e44e2 Add secondary selection support. Define some more
MIME types and add support for more standard targets. 


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26005 72102866-910b-0410-8b05-ffd578937521
2008-01-26 17:17:41 +00:00
fredkiefer
fa6e35e2f8 Change files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25538 72102866-910b-0410-8b05-ffd578937521
2007-10-29 23:25:10 +00:00
fredkiefer
cda1672a5c Add more EWMH methods and helper methods.
Simplify dragging support code.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25389 72102866-910b-0410-8b05-ffd578937521
2007-08-14 22:44:40 +00:00
CaS
97aecfddb2 Coding style fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@22020 72102866-910b-0410-8b05-ffd578937521
2005-11-16 11:40:31 +00:00
fedor
faaebcda2a Update FSF Address
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@21263 72102866-910b-0410-8b05-ffd578937521
2005-05-26 22:51:53 +00:00
FredKiefer
12ed47055f Small imporvements for Cairo backend.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@20037 72102866-910b-0410-8b05-ffd578937521
2004-09-08 22:08:15 +00:00
alexm
256c64b974 2004-09-04 23:59 Alexander Malmberg <alexander@malmberg.org>
* Tools/GNUmakefile.preamble: Compile with -Wall.
	* Tools/xpbs.m: Rename to +initializePasteboard. Return NO iff
	XOpenDisplay fails.
	* Tools/win32pbs.m (+initialize): Rename to +initializePasteboard.
	Return YES.
	* Tools/gpbs.m ([PasteboardServer -init]): Call	+initializePasteboard
	instead of +class. Set xPbClass to nil if the call fails.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@19992 72102866-910b-0410-8b05-ffd578937521
2004-09-04 22:08:18 +00:00
alexm
1ed6a22785 (-xProvideSelection:): Copy all characters and the terminating nul in XG_COMPOUND_TEXT handling.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17943 72102866-910b-0410-8b05-ffd578937521
2003-10-20 18:11:58 +00:00
alexm
a140438d5c (+xSelectionNotify:): Don't call XGetAtomName() if the property is None.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17941 72102866-910b-0410-8b05-ffd578937521
2003-10-20 14:22:53 +00:00
FredKiefer
c83fede688 Made all calls to XGetAtomName() free their memory later on.
Removed function osTypeToX(). Extracted method
[getSelectionData:type:] from [xSelectionNotify:].
[xSelectionNotify:] now supports incremental data transfer and is
save against failing string conversions. Complete rewrite of
[xProvideSelection:] to better follow the ICCCM
specification. This now implements TIMESTAMP, MULTIPLE and
COMPOUND_TEXT (all untested!)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17606 72102866-910b-0410-8b05-ffd578937521
2003-09-02 22:17:40 +00:00
FredKiefer
4247639f19 Made some of the NSLog messages more explicit on what did go wrong.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17495 72102866-910b-0410-8b05-ffd578937521
2003-08-19 17:42:18 +00:00
FredKiefer
106b9d14cb [XPbOwner requestData:] added loop to get data of size bigger that 32K
bytes. [XPbOwner pasteboard:provideDataForType:] and
[XPbOwner pasteboardChangedOwner:] removed the remaining ifdef tests for
X_HAVE_UTF8_STRING. Removed function xTypeToOs() as this was not used.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17490 72102866-910b-0410-8b05-ffd578937521
2003-08-18 13:45:34 +00:00
FredKiefer
219b9d6e36 Reworked the X interaction so that both STRING and UTF8_STRING are
supported both ways.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17460 72102866-910b-0410-8b05-ffd578937521
2003-08-08 22:59:37 +00:00
FredKiefer
096b378dfb [XPbOwner initialize] switched the usage of PRIMARY and CLIPBOARD.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17454 72102866-910b-0410-8b05-ffd578937521
2003-08-08 10:32:18 +00:00
fedor
05423e535b * Tools/xpbs.m: Multi-lingual cut & paste support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17420 72102866-910b-0410-8b05-ffd578937521
2003-08-03 03:54:27 +00:00
FredKiefer
40217bd6eb [XPbOwner xSelectionNotify:] and [XPbOwner xProvideSelection:]
explicit conversion of transferd strings from/to
NSISOLatin1StringEncoding.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17229 72102866-910b-0410-8b05-ffd578937521
2003-07-15 23:46:04 +00:00
FredKiefer
f814005a07 Removed include for file GSPasteboardServer.h to remove some
compiler warnings.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@16946 72102866-910b-0410-8b05-ffd578937521
2003-06-17 13:36:26 +00:00
CaS
a2003e19a3 Bugfix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@16554 72102866-910b-0410-8b05-ffd578937521
2003-04-27 08:27:28 +00:00
fedor
685bcf200f Initial revision
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@13249 72102866-910b-0410-8b05-ffd578937521
2002-03-27 23:44:41 +00:00