Blog
Lgi/Scribe/Linux News
Date: 21/12/2007
After months of tinkering with Lgi on linux, trying to get it to play nicely with Gnome I've worked out what was going on and made a work around for the issue.

If you initialize Gnome in UI mode, i.e.
gnome_program_init("Lgi", "2.0.0", LIBGNOMEUI_MODULE, Args, Arg, NULL, NULL);
Then it registers atexit handlers so the library image must remain in memory till the application exits, otherwise it'll try and call the atexit hooks back into Gnome (which has been unloaded) and it crashes. So I added a return parameter to the WmExit method that the parent Lgi app calls before unloading the window manager helper shared object and the WM helper can select to stay in memory.

There is still some question on how to read the right settings out using the Gnome API, but that is a minor issue compared to the ones I've already solved.

I know I could've shipped a build of Scribe without any WM support, but I've been a) too busy or b) too sick to do a lot of Linux work lately. I had a virus a few weeks ago where I spent the entire week in bed. Which is unusual for me, as I normally recover quickly from such minor things. Maybe I'm just slowing down a bit in my 30's :)

Speaking of intractable coding issues, I recently fixed (some) of the weird focus issues in Scribe. The recently releases were waiting on that fix. Basically I'm a dill and called SetFocus in the WM_CREATE handler if Focus(true) had been called before the view was attached. The problem with that is, if the view had the focus, you detach it, and then re-attach it later it takes the focus again. Which in my case was NOT what I wanted. But after some months of trying different things to work out the problem I hit on the issue and fixed it.

And of course... what of the Mac port? Ah... the Mac port. Yes yes. Well that has it's own thorny issue that has me mostly beat. I'm losing messages between the worker thread and the GUI thread and I don't know why. Unbelievably painful. *sigh*
 
Reply
From:
Email (optional): (Will be HTML encoded to evade harvesting)
Message:
 
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.
BBcode:
[q]text[/q]
[url=link]description[/url]
[img]url_to_image[/img]
[pre]some_code[/pre]
[b]bold_text[/b]