[PATCH] selection: send selection events to all connected clients

Pekka Vuorela pvuorela at iki.fi
Mon Apr 15 10:28:19 PDT 2013


On ma, 2013-04-15 at 10:05 -0400, Yichao Yu wrote:
> On Mon, Apr 15, 2013 at 9:44 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:

> >>
> >> Clipboard manager (or all other programs that need clipboard
> >> monitoring) may be special, but I don't see why it is necessary to
> >> break every single toolkits' api by don't allowing them to get
> >> clipboard content without a focus. There is no way to do it (get
> >> clipboard at any time) without breaking the current interface and
> >> without sending out every selection changes.
> >
> > Alright. I'm not too familiar with toolkits, so could you explain why
> > toolkits need to access the selection at arbitrary times (specifically
> > while unfocused), instead of only as a response to direct user input
> > (which in all relevant cases assigns the focus first)?
> 
> What I mean is it breaks the api, the api provided by toolkits to
> access clipboard will not work at any time, a constraint that doesn't
> exist in any other systems.

Breaks how? On Qt you get clipboard by instantiating QClipboard which
takes mode (global clipboard, selection) on constructor. There's even
bool supportsSelection() to check if the environment supports such. Gtk+
similarly appears to have a mode on instantiation phase, and even
assumes getting content might block because of being fetched from the
environment.




More information about the wayland-devel mailing list