On Sat, 11 Jul 2009 15:35:56 -0300 Thiago <[email protected]> said:
elm_widget_type_get() :) this checks if its a elm_widget smart type (if not
returns "") and if so... returns the type. this is really whats should be added
to checks everywhere:
if (elm_widget_type_get()[0]) {
it's an elm widget!
}
nb - also you are assuming its an ecore_evas too to get the win too. so
basically you aleady re-implemented the magic stuff that evas does :)
(elm_widget_type_get() is using it).
> Hi guys,
>
> I'm currently working on an IM client plugin for Canola in GSoC. This is my
> first proposed patch for enlightenment.
>
> The problem begun when I tried to embed a elm widget inside canola. Every
> time I created a widget, with a Edje smart object as parent, I got
> segfaults. So I started investigating why it happaned inside the binding.
> Nothing was wrong with it. Then I looked inside the code for elementary.
> There I found it. All widgets suppose their top father is an evas smart
> object containing a Elm_Win structure as the data field. Thats not true in
> my case. So the patch changes the function elm_win_xwindow_get() inside
> elm_win.c in a way that it get the xwindow reference from the evas of the
> object, avoiding the corruption of data done by calling
> _elm_win_xwindow_get(). See code for more details. That fixed the first
> problem.
>
> But I kept getting segfaults when I used an entry widget, after I gave it
> the focus. Problem was _on_focus_hook() (elm_entry.c) calling
> elm_win_keyboard_mode_set(). This would also currupt a non-Elm_Win structure
> pointed by data. So I proposed the creation of a magic field inside Elm_Win
> to be tested before doing any operations that needs the smart object to be
> attached to Elm_Win.
>
> The patch is working with tests and everything is working for me! I don't
> know if this is the best solution, but at least it is one.
>
> Waiting on comments!
>
> Thanks.
>
> --
> Thiago 'bolaum' Borges Abdnur
> ----------------------------------
> "Trust no one..."
> - Deep Throat (The X-Files)
>
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) [email protected]
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel