From: Gustavo S. B. <bar...@pr...> - 2009-07-14 11:08:35
|
2009/7/13 Vincent François <vin...@gm...>: > On Sat, 11 Jul 2009 11:51:04 -0300 > Gustavo Sverzut Barbieri <bar...@pr...> wrote: > >> Hi Vincent, sorry taking so long, but patch is in svn. See comments below: >> >> On Mon, Jun 29, 2009 at 8:49 PM, Vincent >> Francois<vin...@gm...> wrote: >> > Vincent Francois <vin...@gm...> >> > >> > Hello, >> > >> > I am writing to inform of a change in the systray module. >> > >> > When using the module, some icons are incorrectly placed (Google Desktop, VideoLan, Claw-Mails ...). >> > >> > The problem stems from the need to capture the event XConfigureEvent and then apply the new geometry of the embedded window. >> > >> > Below, I describe the changes applied to the file e/src/modules/systray/e_mod_main.c. >> > >> > // modify _Instance structure >> > >> > struct _Instance >> > { >> > ... >> > struct >> > { >> > ... >> > Ecore_Event_Handler *configure; >> > } handler; >> > ... >> > }; >> > >> > // new callback function >> > >> > static int >> > _systray_cb_window_configure(void *data, int type __UNUSED__, void *event) >> > { >> > Ecore_X_Event_Window_Configure *ev = event; >> > Instance *inst = data; >> > Icon *icon; >> > Eina_List *l; EINA_LIST_FOREACH(inst->icons, l, icon) >> > if (icon->win == ev->win) >> > { >> > _systray_icon_geometry_apply(icon); >> > break; >> > } >> > >> > return 1; >> > } >> > >> > // add handler >> > >> > static E_Gadcon_Client * >> > _gc_init(...) >> > { >> > ... >> > inst->handler.configure = ecore_event_handler_add >> > (ECORE_X_EVENT_WINDOW_CONFIGURE, _systray_cb_window_configure, inst); >> > ... >> > } >> > >> > ********* >> > >> > After several tries, I can say that this method is successful. >> > >> > A patch file is included with this email. To create the patch I used this command : >> > >> > $ svn diff e_mod_main.c > e_mod_main.c.patch >> >> >> Okay, patch applied with minor changes: >> - important: delete the event handler when gadget is removed! >> Failing to do so will lead to callback being called to already dead >> object and possibly code if we unload the module. >> - remove stdio.h as it's not required, probably you used it to debug >> with printf() >> - fixed indentation on new code >> >> Also, next time you don't need to describe your patch, just code is >> enough, I can understand it. Just need to comment if patch is very >> different or unexpected. >> >> >> > I hope that my help will be most useful. If you are looking for a programmer specializing in low-level programming X11, think of me :) >> >> Good :-) >> >> >> > I would like to participate in the adventure Enlightenment. >> >> Already doing it :-) Welcome aboard. More patches are welcome. >> > > Hello Gustavo, > > I appreciate your comments relevant. > Without thinking back, in the bug the bug report via the Trac interface (http://trac.enlightenment.org/e/ticket/360), the appropiate modifications of the patch were carried out. > But I agree, I should have check before ... > > PS: Can you remove the Trac ticket number #360 ? Just mark it as fixed, I'll do it now. Thanks for the patch! -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: bar...@gm... Skype: gsbarbieri Mobile: +55 (19) 9225-2202 |