Implementing Copy/Paste using GtkSelection



I have a question about the way GtkSelection works when implementing
Copy.

My understanding is that a widget calls gtk_selection_owner_set to claim
ownership of the clipboard advertising the copied data to be available
to a possible "selection_get" signal. 

The problem is that the lifetime of the clipboard data is tied to the
lifetime of the widget that called gtk_selection_owner_set -- if the
widget goes away, the copy data "disappears" from the clipboard.

In other words if I open say a text editor window, type some text,
select it, do a "Copy" from the menu, close the window, open some other
window, paste, nothing gets pasted.

Is this really broken or am I just missing something?

Pavel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]