xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] RE: xforms & dual screen


From: Jens Thoms Toerring
Subject: Re: [XForms] RE: xforms & dual screen
Date: Tue, 18 May 2010 17:17:33 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Vincent,

On Tue, May 18, 2010 at 09:15:03AM -0500, Vincent Magnotta wrote:
> We have developed an application (BRAINS2) that works on Dual displays
> (Linux and Mac). All of the machines that we use have a single screen for
> the entire display. I know that we allow the user to customize the placement
> of the xform windows. We have not had any issue with the Dual screen and can
> have the user place the windows in either screen manually. I have never
> tried to have the windows appear in different screens programmatically
> because we are not guaranteed to have dual displays.

That's good to know! Did you ever experience any problems
with menus or popups coming up on the wrong screen after
you moved a form over to the other screen? That's one thing
which I'm a bit dubious about after having a very cursory
glance at the sources...

> As Jens pointed out, Xforms is not thread safe. Having said that, we
> actually use two threads in our program because we are using both TCL/Tk and
> Xforms. To make this work, we needed to create the threads before
> initializing either windowing toolkit. This allows you to have separate
> event loops for each thread. We then use file descriptors to communicate
> between the two threads.

Yes, definitely, as long as only one of the threads is communi-
cating with the window manager and the two threads don't mess
up the internal state of XForms by uncoordinatedly calling
XForms functions then all should be well (and if one calls
XInitThreads() before fl_initialize() then probably even both
threads could send requests to the X server). But the safest
way is for sure to have only one thread to handle the graphics
stuff and the other should keep away from it. The same holds,
of course, for programs that spawn multiple processes (that
don't then call exec()) - if fl_initialize() is called before
spawning the new process then only one of the processes should
attempt to call XForms functions.

                            Best regards, Jens
-- 
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]