Re: SelectionNotify and GtkText, etc...




	Well, I am writing an application that needs to paste selections
without clients having asked for them.  For some reason I just assumed
that everyone would have written their widgets as "event driven" so that
they did not actually know the difference between receiving a
SelectionNotify, or receiving a SelectionNotify after having called
XConvertSelection().  I just envisioned everything having a case for that
event, regardless.  Upon testing I noticed that some clients accept random
SelectionNotify events while most don't.  rxvt handles the situation like
I want it to, gtk and xterm don't.  (Actually, I think xterm still uses
cut buffers or something)  I suppose you are correct, upon further
inspection, ICCCM doesn't seem to imply that receiving random
SelectionNotify events is called for.
	So I guess my new question is, how would I go about hacking this
functionality?  When does GtkText call XConvertSelection()?  I can't seem
to make it call XConvertSelection() by sending it a button2 XButtonEvent.

			Thanks,

				- Mike

---------------------------------------------------------------------------
"A totalitarian state thrives on propaganda, and there is no more effective
way to limit thought than to control the language itself.  By changing
definitions of words through continual association, any serious discussion
involving the concepts that the words represent becomes hopelessly muddled."
---------------------------------------------------------------------------
Moxie  - moxie@thoughtcrime.org / moxie@vivid.net
http://www.thoughtcrime.org

On 2 Dec 1999, Owen Taylor wrote:

> 
> Mike Benham <moxie@vivid.net> writes:
> 
> > 	When a GtkText widget receives a proper (xlib) SelectionNotify
> > event without having previously requested a selection by sending a
> > SelectionRequest event or calling XConvertSelection(), it responds by
> > promptly doing nothing.  Why is this?  Is there any way to make a Gtk
> > widget receive a selection without it having asked for it?
> 
> Should there be? What use would this feature be?
> 
> (The ICCCM certainly doesn't imply that you should handle random
>  SelectionNotify events; I don't think that other toolkits do so
>  either, though I never even thought of investigating the possibility.)
> 
> Regards,
>                                         Owen
> 
> 
> -- 
>          To unsubscribe: mail gtk-devel-list-request@redhat.com with 
>                        "unsubscribe" as the Subject.
> 
> 
> 






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