Closed
Bug 508045
Opened 15 years ago
Closed 6 years ago
Cannot copy image data to clipboard using keyboard shortcut (ctrl-c or ctrl-x)
Categories
(Core Graveyard :: Embedding: GTK Widget, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: erik.staats, Unassigned)
References
Details
Attachments
(1 file)
6.31 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.12) Gecko/2009070609 Firefox/3.0.12 Build Identifier: Songbird 1.2.0a, Build 1086 (20090512013031) Attempting to use a keyboard shortcut (ctrl-c or ctrl-x) to copy image data to the clipboard results in an empty clipboard. Most applications only provide a context menu for copying image data to the clipboard. Songbird provides a keyboard shortcut in the track metadata editor when the album art is selected (see http://bugzilla.songbirdnest.com/show_bug.cgi?id=16406). Reproducible: Always Steps to Reproduce: TEST BUILD : Songbird 1.2.0a, Build 1086 (20090512013031) OS : Ubuntu 8.10 Steps to Perform: 1. Select track in a library and choose Edit Metadata from contextual menu 2. Ensure file has artwork image available 3. Click on image and use Ctrl+C on a keyboard. Actual Results: This process works with Copy from the context menu, and pastes successfully into GIMP. However, using the keyboard shortcut, you get the following error message from GIMP : "There is no image data in the clipboard to paste." Expected Results: Expected Results: 1. Image should be available on OS clipboard. To verify, paste image into a document. This bug occurs because the gtk2 nsClipboard::SetData implementation starts by setting the selection owner using the global current time (GDK_CURRENT_TIME). When setting image data, SetData subsequently calls gtk_clipboard_set_image, and this causes gtk_selection_owner_set_for_display to be called via gtk_clipboard_set_contents. When setting the selection owner, gtk_clipboard_set_contents does not always use GDK_CURRENT_TIME. If there is a current event, the event time stamp is used when setting the selection owner. This only appears to be the case when using a keyboard shortcut. In this situation, the event time stamp is before the current time, so setting the owner fails, and the image is never transferred to the clipboard. gtk_clipboard_set_image does all the required work for setting the clipboard data including setting the selection owner and target list. When setting clipboard image data, nsClipboard::SetData should just call gtk_clipboard_set_image first and then return. Any other code can interfere with setting the clipboard data.
Reporter | ||
Comment 1•15 years ago
|
||
Changed gtk2 nsClipboard::SetData to just use the GTK clipboard functions for images and not do any further processing. Since the GTK clipboard image functions set the selection owner and target list, nsClipboard::SetData should not manipulate the selection at all when given an image.
Comment 2•15 years ago
|
||
Erik, can you update this patch because of bug 311340?
Comment 4•14 years ago
|
||
Ah, sorry, looks like a different problem, at least in Firefox. Even if an image is selected on page and pasted, only image name is insered to clipboard. If you want to copy graphics data you have to explicitly choose "Copy Image" in content menu.
Assignee | ||
Updated•12 years ago
|
Product: Core → Core Graveyard
Comment 6•6 years ago
|
||
Embedding: GTK Widget isn't a thing, closing.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•