[Top][All Lists]

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

Re: [XForms] RE: xforms & dual screen

From: Vincent Magnotta
Subject: Re: [XForms] RE: xforms & dual screen
Date: Tue, 18 May 2010 09:15:03 -0500
User-agent: Microsoft-Entourage/

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.

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.


On 5/18/10 7:10 AM, "Jens Thoms Toerring" <address@hidden> wrote:

> Hi Nick and Jens,
> On Tue, May 18, 2010 at 12:30:32PM +0200, nick Nieuwkoop wrote:
>> We have an application that runs with XForms. When we
>> add or remove lines of code that should be controlling the xServer, nothing
>> happens. From this we figured out that xForms is Œcontrolling¹ the xServer.
> I don't know what you mean with "controling the X server" but the
> XForms library is basically just a wrapper around the Xlib library.
> And thus programs using this library can't 'control' the X server
> but can only send requests to the X server and listen for replies.
> So could you be a bit more specifiec about the lines "that should
> be controlling the xServer"?
>> Besides this application we have been able to show in standard Xwindows
>> forms ³hello world² in two different size windows, one on the first screen
>> and the other one on the second screen. This uses the xServer library
>> directly. So we know the configurations are correct. Also this confirms that
>> it is definitely possible to use both screens.
> Of course, there must be a way to send windows to two screens
> (oherwise having a second screen wouldn't make much sense;-).
> What do you do in this program (or when starting it) to control
> which screen the window is shown on? As I said in my previous
> mail I never have used a dual-screen setup so you need to help
> me a bit here. And can you also display one window on the one
> screen and another one on the other screen with such a program?
> I would be interested to see how this gets done.
>> Also the current application has used threads before, where one thread
>> handles the input of the buttons from xForms(the callbacks), while the other
>> thread controls the other forms shown on the screen. Would it be possible to
>> use a thread for each screen, maybe even for each form or will this have no
>> effect on the use of the screens.
> XForms is not thread-safe. It was written long before threads
> were available on UNIX (or before Xlib itself became thread-safe
> when, as far as I understand it, XInitThreads() is called at the
> very start), so if you have gotten away with using threads with
> an XForms program then it probably was more die to luck then to
> XForms design.
>                             Best regards, Jens

Associate Professor
Department of Radiology
0453-D JCP
200 Hawkins Drive
Iowa City, IA 52242
E-mail: address@hidden
Phone: 319-356-8255 Fax: 319-353-6275
Website: http://www.radiology.uiowa.edu

reply via email to

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