> -----Original Message-----
> From: Gustavo Sverzut Barbieri [mailto:barbi...@profusion.mobi]
> Sent: 7 wrzeĊ›nia 2012 17:08
> To: Enlightenment developer list
> Subject: Re: [E-devel] [Patch] Allow to send SelectionNotify event if
> there is no data from XGetWindowProperty.
> 
> On Friday, September 7, 2012, Michal Pakula Vel Rutka wrote:
> 
> >
> > Dear EFL developers,
> >
> > I am currently working on implementation of a clipboard for WebKit-
> EFL.
> > WebKit?s architecture and test framework requires that system
> > clipboard has to work synchronously.
> 
> 
> The WebKit tests considers your platform to your definition. It does
> not mean X11 or Elementary, as per WebKit-EFL it does NOT know what
> Elementary is.
> 
> I've explained to you before and your fellow coworker yesterday: just
> expose the functions pointers (vurtuals) in Ewk_View smart class.
>    In your WebKit TEST you do using a global pointer to a "clipboard"
> string. This is simple, fast and CLEAN as you are sure about the state,
> unlinke rea x11l clipboard that 1)would require Xserver to run and 2)
> could be changed by someone else during the test.
>    Of course you should implement those virtuals  in elm_web.c using
> elm_cnp.
> 

Just to keep everything clear: I remember our discussion, I fully
understand your approach and I do not want broke EFL port by including
Elementary. I have prepared a test patch for WebKit1 using function 
pointers in ewk smart class, with:
- "fake" clipboard in DumpRenderTree storing clipboard data as strings
- elementary implementation in eve browser using elm_cnp_selection_get
and set functions, but using a nested main loops,
as you told me in our discussion.

> 
> 
> > Elementary paste implementation (elm_cnp_selection_get) works
> > asynchronously returning data using paste callback passed as one of
> > elm_cnp_selection_get function.
> > An introduction of nested main loop will help making clipboard in
> > WebKit-EFL work synchronously (more or less similar mechanism is used
> > in
> > GTK+ WebKit port), but the main problem is that elementary clipboard
> > GTK+ does
> > not return paste callback if selection does not contain any data.
> 
> 
> Ouch WebKit people, seems you don't learn :-/
> 
> While you did spot a real bug of the async selection not returning in
> the case of an empty clipboard, there should never be such
> "synchronous"
> requests
> 
> WebKit folks looove to do such broken API, such as the JavaScript
> alert() that is synchronous in JS but does not need to be like that in
> C++, yet they force it!
>    Just fill a bug and have them to fix the clipboard to be
> asynchronous.
> If possible do patches to that.
> 
> And inner main loops are broken concept. As elaborated by raster in
> this list many times.
> 
> 

So summing up my approach to clipboard implementation in WebKit-EFL by
introducing nested main loops and making clipboard synchronous is wrong.
Anyway changing WebKit pasteboard to asynchronous seems to be a huge
thing.

How about a bug I found and a solution I proposed, does it make sense
to you?

> 
> 
> > Currently when ecore_x_window_prop_property_get function is called
> > asking for AnyProperty it returns 0 if there is no data (number of
> > items stored equals 0). This causes
> > ecore_x_event_handle_selection_notify to exit before SelectionNotify
> > event is added and eventually elementary paste callback is not fired.
> > My patch removes this condition and changes behaviour of this
> function
> > by allowing to add SelectionNotify event even if data returned is
> empty.
> >
> >
> > BR,
> > Michal
> >
> 
> 
> --
> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --------------------------------------
> MSN: barbi...@gmail.com
> Skype: gsbarbieri
> Mobile: +55 (19) 9225-2202
> -----------------------------------------------------------------------

Best Regards,
Michal



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to