Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Looking for xlib programing help....

2 views
Skip to first unread message

Dwayne Dilbeck

unread,
Jan 22, 2008, 7:55:39 PM1/22/08
to
I have an application that was written in "C" and uses xlib. The
application works as expected on Sparc Solaris 7,8,9 and 10.

The application now needs to be ported to red hat 4.0. The obvious changes
to library linking have been made . The original application compiles with
0 Errors and 0 Warnings. But the application does not work. It launches and
hangs in the event loop.

When using a debuger the hang occurs with XNextEvent(...). XNextEvent will
wait if there is nothing in the queue. I rewrote the event algorythm to use
XCheckWindowEvent(...) The resulted in something wierd the code worked as
expected as long as there were not any events. If it recieved an event it
was looking for the program hangs inside of XCheckWindowEvent.

If there is anyone who thinks they can help, respond. I will post or foward
the C code.
I don't want to spam the "C" code until I know I can get some help.


John Tsiombikas

unread,
Jan 22, 2008, 10:19:49 PM1/22/08
to
On 2008-01-23, Dwayne Dilbeck <ddil...@yahoo.com> wrote:
>
> I have an application that was written in "C" and uses xlib. The
> application works as expected on Sparc Solaris 7,8,9 and 10.
>
> The application now needs to be ported to red hat 4.0. The obvious changes
> to library linking have been made . The original application compiles with
> 0 Errors and 0 Warnings. But the application does not work. It launches and
> hangs in the event loop.
>
> When using a debuger the hang occurs with XNextEvent(...). XNextEvent will
> wait if there is nothing in the queue. I rewrote the event algorythm to use
> XCheckWindowEvent(...) The resulted in something wierd the code worked as
> expected as long as there were not any events. If it recieved an event it
> was looking for the program hangs inside of XCheckWindowEvent.
>

XNextEvent is supposed to block until there is at least one X event. I
really doubt that it works otherwise on Solaris :) If you want to poll
events, you may use the XPending() function in a loop, so that you call
XNextEvent only if there are pending events, thus XNextEvent wouldn't
block.

I don't think I can help any more without any more information on the
expected behaviour, how it's supposed to work, and what it's actually
doing. Of course a *minimal* code sample that duplicates your problem
would be helpful as well.

P.S. Such questions are mostly topical on comp.windows.x. I did set
followup-to accordingly.

--
John Tsiombikas (Nuclear / Mindlapse)
http://nuclear.sdf-eu.org/

0 new messages