Commit Graph

168 Commits

Author SHA1 Message Date
Alexandre Julliard 1e7878cfa5 winex11: Add a helper function to import a Unicode string.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-27 21:43:24 +09:00
Alexandre Julliard 4bbe8f90d4 winex11: Ignore X11 errors happening on the clipboard display connection.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-26 21:54:31 +09:00
Alexandre Julliard a52d09198d winex11: Run a single clipboard manager thread per window station, inside the explorer process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-26 21:53:52 +09:00
Alexandre Julliard a46d736012 winex11: Remove the driver-side clipboard data storage.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-26 20:27:52 +09:00
Alexandre Julliard e9461b4567 winex11: Add a helper function to register builtin clipboard formats.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-26 20:27:51 +09:00
Alexandre Julliard adf96003a5 winex11: Implement the UpdateClipboard entry point to refresh the cache.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 20:30:33 +09:00
Alexandre Julliard a502a36af8 winex11: Store the list of X11 formats when retrieving the TARGETS property.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 20:30:13 +09:00
Alexandre Julliard 548ce58b4f winex11: Reimplement import_targets to go through the format list in the standard way.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 12:33:44 +09:00
Alexandre Julliard df9ff6872c winex11: If multiple clipboard formats can be exported, use the first available one.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 12:20:32 +09:00
Alexandre Julliard 4415406020 winex11: Get rid of support for reigstering Win32 formats without a corresponding atom.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-22 22:24:07 +09:00
Alexandre Julliard 242673589b winex11: Add helper functions to find and register X11 clipboard formats.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-22 22:24:06 +09:00
Alexandre Julliard f4f6353079 winex11: Add helper functions to find and register Win32 clipboard formats.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-22 22:24:06 +09:00
Alexandre Julliard 80d02bc849 winex11: Support import multiple drag&drop properties in a single call.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-22 22:15:10 +09:00
Alexandre Julliard 7f39cc3f2b winex11: Use a standard import function to retrieve the TARGETS property.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-22 12:50:34 +09:00
Alexandre Julliard 96930bdc04 winex11: Use standard clipboard APIs to retrieve the data to export.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-21 21:17:20 +09:00
Alexandre Julliard 8e5ee4474f winex11: Reimplement targets enumeration using standard clipboard APIs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-21 21:17:19 +09:00
Alexandre Julliard d1f539ac00 winex11: Use a standard export function to handle TARGETS requests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-21 21:17:19 +09:00
Alexandre Julliard c6e787232e winex11: Use a standard export function to handle MULTIPLE requests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-21 21:17:19 +09:00
Alexandre Julliard 2215d770c5 winex11: Merge converting the selection and importing it.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-21 21:17:19 +09:00
Alexandre Julliard f88b632142 winex11: Move common code out of the import functions and simplify their usage.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-20 22:50:33 +09:00
Alexandre Julliard fd41ddec0a winex11: Move common code out of the export functions and simplify their usage.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-20 22:50:33 +09:00
Alexandre Julliard 7d0ddff2d8 winex11: Add a helper function to convert the selection.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-20 22:50:33 +09:00
Alexandre Julliard 2df558af9c winex11: Add a helper function to store property data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-20 11:33:51 +09:00
Alexandre Julliard 49a65a3bd7 winex11: Add a debug helper to trace atom names.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-19 23:08:22 +09:00
Alexandre Julliard 13ff291905 winex11: Use the correct data type for property atoms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-19 22:57:01 +09:00
Alexandre Julliard 63201471ab winex11: Add separate export functions for the various string types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-19 10:59:51 +09:00
Alexandre Julliard 9f2ccf315e winex11: Get rid of the X11DRV_CLIPBOARD_SerializeMetafile helper.
THere's no common code between the different branches anyway.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-16 23:05:34 +09:00
Alexandre Julliard 217f05466a winex11: Merge named formats into the builtin clipboard formats table.
Also rename the import/export functions to make the table more readable.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-16 23:05:34 +09:00
Alexandre Julliard ed97fa1cb2 user32/tests: Add more tests for GDI and private clipboard formats.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-09 22:49:27 +09:00
Alexandre Julliard 761d244970 winex11: Remove support for synthesizing clipboard formats.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-07 13:24:36 +09:00
Akihiro Sagawa ce7a98e95c winex11: Return more reliable value from X11DRV_MsgWaitForMultipleObjects.
After processing several X events, X11DRV_MsgWaitForMultipleObjects always
tells us that a new message is available. This is not true for some cases.

For instance, when we call DestroyWindow, the X queues DestroyEvent. Then,
X11DRV_MsgWaitForMultipleObjects handles the event only; none is posted or
sent as hwnd for destroyed window is unavailable. However, the function
states "new message is available" by returning count - 1 value.

This is an issue for CoWaitForMultipleHandles because it expects a new
message in the queue and consumes the message.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 22:27:40 +09:00
Alexandre Julliard 13fbbfac1c winex11: Don't try to free custom GDI formats at all.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-24 00:16:42 +09:00
Alexandre Julliard 99d5b75c7d winex11: Don't disallow replacing unowned formats.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-23 18:05:48 +09:00
Alexandre Julliard d9df977006 user32: Don't disallow delayed rendering even when not the clipboard owner.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-23 17:57:50 +09:00
Alexandre Julliard 60f8b516e2 winex11: Allocate clipboard data as GMEM_FIXED.
Based on a patch by Rafał Harabień.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 20:57:51 +09:00
Alexandre Julliard 228d855907 winex11: Correctly free CF_DIB format, and don't free unknown GDI formats.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 20:42:06 +09:00
Alexandre Julliard 6da991c75b winex11: Don't crash when getting an invalid window in SelectionRequest.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:36 +09:00
Nikolay Sivov a6a20ccc3c winex11: Simplify XGetWindowProperty return code checks (Clang).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-26 13:19:43 +09:00
Thomas Faller 587733855b winex11.drv: Fix use of uninitialized memory. 2015-10-01 23:14:39 +09:00
Alexandre Julliard 070a82e743 user32: Merge the AcquireClipboard and EmptyClipboard driver entry points. 2015-06-03 18:46:53 +09:00
Alexandre Julliard b7c340de73 user32: Get rid of the unused parameter in the EmptyClipboard driver entry point. 2015-06-03 18:46:53 +09:00
Alexandre Julliard 6fec7d658b winex11: Remove unnecessary CLIPBOARDINFO structure. 2015-05-04 18:30:39 +09:00
Vincent Povirk 14eff7b92a winex11.drv: Report failure when we can't convert a selection. 2015-05-04 16:37:22 +09:00
Marcus Meissner ab854893aa winex11.drv: Free uriList (Coverity). 2015-02-16 19:18:45 +09:00
Damjan Jovanovic c60d6c46bf winex11.drv: Allow the clipboard to copy files to other X11 apps. 2014-07-18 19:13:34 +02:00
Damjan Jovanovic 026fe4d08e winex11.drv: Migrate importing text/uri-list XDND selections to the clipboard. 2014-06-13 16:02:47 +02:00
Damjan Jovanovic c2f73b9780 winex11.drv: Import text/plain XDND selections through the clipboard. 2014-06-13 16:02:38 +02:00
Damjan Jovanovic e339e0d476 winex11.drv: Use the clipboard functions and formats to import selections that XDND doesn't support. 2014-06-12 18:09:34 +02:00
Vincent Povirk 9dcc21e3e7 winex11.drv: Don't join INCR data until the transfer finishes. 2013-01-15 12:09:43 +01:00
Vincent Povirk 47217eaa83 winex11.drv: Flush property notify events before deleting properties. 2013-01-04 12:00:15 +01:00
Vincent Povirk 4013dc85e9 winex11.drv: Select property change events on selection request windows. 2013-01-04 12:00:08 +01:00
André Hentschel 574cf27f2a winex11: Avoid memory leaks (coverity). 2012-11-05 11:11:37 +01:00
André Hentschel 585a66a463 winex11: Avoid memory leaks (coverity). 2012-10-31 16:12:27 +01:00
Alexandre Julliard 988f2fde86 winex11: Store the full visual info for the default visual. 2012-09-26 14:40:39 +02:00
Alexandre Julliard cf1be58706 winex11: Remove the remaining X11 locking calls. 2012-08-16 16:48:00 +02:00
Alexandre Julliard f9a383323f winex11: Remove unnecessary cleanups on process exit. 2012-08-15 14:24:20 +02:00
Alexandre Julliard 6bfcb347bf winex11: Remove X11 locking around simple X calls. 2012-08-14 15:13:08 +02:00
Alexandre Julliard e85895e4c5 winex11: Use the create_pixmap_from_image helper to export XA_PIXMAP clipboard formats. 2012-05-15 17:02:08 +02:00
Alexandre Julliard 95de085e5e winex11: Use the get_pixmap_image helper to import XA_PIXMAP clipboard formats. 2012-05-14 14:17:29 +02:00
Alexandre Julliard 49b73d53cf winex11: Move the clipboard DIB creation functions to clipboard.c. 2012-01-10 20:12:16 +01:00
Pierre Schweitzer 747a26d9a0 winex11.drv: Fix handle leak. 2012-01-03 12:37:35 +01:00
Andrew Talbot 42df50ab66 winex11.drv: Remove unneeded address-of operator from function name. 2011-08-30 11:56:54 +02:00
Kusanagi Kouichi 806e407193 winex11.drv: Fix a memory leak. 2011-08-04 18:27:36 +02:00
Alexandre Julliard 7879b8e349 user32: Get rid of the RegisterClipboardFormat driver entry point. 2011-03-07 17:06:50 +01:00
Alexandre Julliard 59fb0ad174 winex11: Register clipboard formats only once they are actually used. 2011-03-07 17:06:42 +01:00
Alexandre Julliard c7d2a4dddf winex11: Remove the unused clipboard format flags. 2011-03-07 16:59:39 +01:00
Alexandre Julliard 383d8ac105 user32: Remove GetClipboardFormatName from the user driver interface. 2011-03-04 16:25:52 +01:00
Alexandre Julliard 57921fec3a winex11: Always reference clipboard formats by atom instead of name. 2011-03-04 10:52:25 +01:00
Alexandre Julliard f15e91a883 winex11: Pre-register atoms for all the built-in clipboard formats. 2011-03-03 21:27:34 +01:00
Alexandre Julliard ade3b4f148 winex11: Add a debug helper for printing clipboard formats. 2011-03-03 21:16:34 +01:00
Alexandre Julliard 7aa4acb80a winex11: Convert the clipboard format list to a standard Wine list. 2011-03-03 20:56:21 +01:00
Alexandre Julliard bfa753ba55 winex11: Convert the clipboard data list to a standard Wine list. 2011-03-03 20:56:05 +01:00
Alexander Scott-Johns 356eaa1ee2 winex11.drv: Improve error handling in bitmap synthesizing code. 2011-01-31 17:39:51 +01:00
Alexander Scott-Johns d2d4fe67be winex11.drv: Remove unused constant, and fix a comment. 2011-01-31 17:39:51 +01:00
Alexander Scott-Johns e81e49787c winex11.drv: Remove broken HeapFree call. 2011-01-31 14:05:39 +01:00
Alexander Scott-Johns 42fc3b6430 winex11.drv: Implement synthesizing the CF_ENHMETAFILE clipboard format from CF_METAFILEPICT. 2011-01-28 17:41:51 +01:00
Ken Thomases b952751158 winex11: Pass window property to server in 64KB chunks.
Large clipboard contents, like images, can exceed the maximum X request size
if sent all at once, which can cause the X server to kill the connection.
2010-08-24 15:22:34 +02:00
Gerald Pfeifer f6a79921ae winex11: Remove variable size which is not really used from X11DRV_CLIPBOARD_SerializeMetafile. 2010-04-26 07:01:54 -05:00
Gerald Pfeifer ad71430328 winex11: Remove variable datasize which is not really used from X11DRV_CLIPBOARD_ExportTextHtml. 2010-04-26 07:01:37 -05:00
Vincent Povirk 1eff311e8d winex11.drv: ReadSelectionData should fail if the import function fails. 2010-03-18 10:22:55 +01:00
Rob Shearman e4888b0e3c winex11.drv: Empty clipboard cache on process unload to avoid false positives being reported for memory leaks. 2009-12-30 13:39:55 +01:00
Michael Stefaniuc 425cc7e033 winex11.drv: Remove some explicit LPARAM/WPARAM casts. 2009-12-28 12:27:13 +01:00
Alexandre Julliard 83b66549da user32: Get rid of 16-bit handles in the driver clipboard interface. 2009-12-23 14:27:31 +01:00
Rob Shearman b894925b0e winex11.drv: Make sure that the selectionAcquired flag has been set before returning from X11DRV_AcquireClipboard.
X11DRV_CLIPBOARD_UpdateCache depends on selectionAcquired being set if
the current process is the selection owner, otherwise it will defer to
getting the clipformats from X, manufacturing extra formats that the
app may not be expecting, having just set the formats itself. Worse
still, since selectionAcquired is set in another thread this behaviour
is not predicatable and it may sometimes use the clipformats already
set and other times defer to X.
2009-12-01 15:10:37 +01:00
Vincent Povirk 1bd13dec61 winex11.drv: Generate text/html clipboard data from HTML Format. 2009-11-23 13:34:15 +01:00
Vincent Povirk 56b8536336 winex11.drv: Remove the HTML Format -> text/html clipboard mapping.
The two formats do not match exactly.
2009-11-23 13:34:09 +01:00
Yuri Khan f1c131ba27 winex11.drv: Handle clipboard on an auxiliary thread for windowless apps. 2009-07-13 10:48:56 +02:00
Vincent Povirk 6259aeaacb winex11.drv: Link the windows JFIF format to the X image/jpeg format. 2009-06-22 11:22:23 +02:00
Vincent Povirk e4663206be winex11.drv: Link the windows PNG format to the X image/png format. 2009-06-22 11:22:19 +02:00
Vincent Povirk cedc8e7099 winex11.drv: Don't use XEvents uninitialized when waits time out. 2009-06-04 12:11:47 +02:00
Vincent Povirk 56a3e788ea winex11.drv: Export copied images as image/bmp. 2009-05-04 12:49:54 +02:00
Vincent Povirk 272e2d2251 winex11.drv: Convert image/bmp X selections to Windows DIB. 2009-05-01 13:19:20 +02:00
Huw Davies 3f7b2b9932 winex11.drv: Print clipboard formats in hex. 2009-04-24 15:02:20 +02:00
Huw Davies 0b6d74c428 winex11.drv: Fix typo so that emf -> mfpict synthesis works. 2009-04-20 14:13:46 +02:00
Huw Davies 0d4451a85d winex11.drv: Fix ordering of synthesized text formats. 2009-04-20 14:13:40 +02:00
Kusanagi Kouichi bcdf8f6edd winex11.drv: Make import/export functions static. 2009-03-25 12:17:56 +01:00
Maarten Lankhorst 0a6459598a user32/winex11.drv: Change all user32 operations to use CDECL. 2008-12-23 13:06:04 +01:00
Alexandre Julliard 7fdadbb377 server: Add functions for conversions between server user handles and pointer-style handles. 2008-12-08 16:58:20 +01:00
Vitaly Lipatov 934aa492b4 winex11: Add check for XmbTextPropertyToTextList result. 2008-12-03 12:16:40 +01:00
Michael Stefaniuc 82a3c433b3 winex11.drv: Remove some superfluous casts. 2008-12-01 12:57:00 +01:00