Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » DBus integration -- need help (Adding DBus to an existing U++ app on Linux -- need help on main event loop)
DBus integration -- need help [message #48544] Thu, 20 July 2017 17:30 Go to previous message
jlfranks is currently offline  jlfranks
Messages: 55
Registered: May 2007
Location: Houston, TX, USA
Member
We are trying to add a DBus server to existing large U++ application that runs only on Linux.
I've converted from X11 to GTK for Upp project config to be compatible with GIO dbus library.

I've created a separate thread for the DBus server and ran into problems with event loop.
I've gutted my DBus server code of everything except what is causing an issue.
DBus GIO examples use GMainLoop in order for DBus to service asynchronous events.

Everything compiles and runs except the main UI is not longer visible. There must be a
GTK main loop already running and I've stepped on it with this code. Is there a way for
me to obtain a pointer to the UI main loop and use it with my DBus server?

How/where can I do that?

Code snipped example as follows:

---- code snippet ----

myDBusServerMainThread()
{
//========================================================== =====
//
// Enter main service loop for this thread
//
while (not needsExit ()) { // colaborate with join()

GMainLoop *loop;

loop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(loop);
}
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GLCtrl problem
Next Topic: [Bug (minor)]: CenterScreen not working
Goto Forum:
  


Current Time: Tue Jan 28 03:00:55 CET 2020

Total time taken to generate the page: 0.01182 seconds