[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: Re: XtDisplayToApplicationContext fails with "Error: Couldn't find
From: Tristan Schmelcher <tschmelcher () google ! com>
Date: 2009-02-03 17:46:57
Message-ID: 5323d74a0902030946w3e64c140p55946f1d065fbed5 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
I've already verified that the display is not NULL. I'll try the experiment
you suggested though. Thanks.
2009/2/3 Dan Nicholson <dbn.lists@gmail.com>
> On Thu, Jan 29, 2009 at 5:08 PM, Tristan Schmelcher
> <tschmelcher@google.com> wrote:
> > Hello all. Sorry if this is not the right place to send this, but I'm
> > developing a plugin for Firefox on Linux and I've run up against a
> > roadblock. In my plugin I'm being passed a pointer to an X "Display"
> struct
> > (in NPP_SetWindow, for those of you that know NPAPI) and I'm calling
> > XtDisplayToApplicationContext on it to get an app context to use in
> various
> > Xt calls. Now on most systems this works fine--e.g., Ubuntu Dapper 32-bit
> > with FF2 and Intrepid 32-bit with FF3 both work flawlessly. However, when
> I
> > build a 64-bit version and try it on Ubuntu Hardy 64-bit with FF3, it
> > doesn't work. When it enters XtDisplayToApplicationContext, I get "Error:
> > Couldn't find per display information" on the console and the program
> exits.
>
> I think that happens when you pass a NULL Display to
> XtDisplayToApplicationContext.
>
> I can't say I know anything about Xt, but does it fail in a simple
> testcase?
>
> #include <X11/Xlib.h>
> #include <X11/Intrinsic.h>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(int argc, char *argv[])
> {
> Display *dpy;
> XtAppContext ctx;
>
> dpy = XOpenDisplay(NULL);
> if (!dpy) {
> fprintf(stderr, "XOpenDisplay failed\n");
> exit(1);
> }
> ctx = XtDisplayToApplicationContext(dpy);
> XCloseDisplay(dpy);
>
> return 0;
> }
>
> --
> Dan
>
[Attachment #5 (text/html)]
I've already verified that the display is not NULL. I'll try the experiment \
you suggested though. Thanks.<br><br><div class="gmail_quote">2009/2/3 Dan Nicholson \
<span dir="ltr"><<a \
href="mailto:dbn.lists@gmail.com">dbn.lists@gmail.com</a>></span><br> <blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"><div class="im">On Thu, Jan 29, 2009 at 5:08 PM, \
Tristan Schmelcher<br> <<a \
href="mailto:tschmelcher@google.com">tschmelcher@google.com</a>> wrote:<br> > \
Hello all. Sorry if this is not the right place to send this, but I'm<br> > \
developing a plugin for Firefox on Linux and I've run up against a<br> > \
roadblock. In my plugin I'm being passed a pointer to an X "Display" \
struct<br> > (in NPP_SetWindow, for those of you that know NPAPI) and I'm \
calling<br> > XtDisplayToApplicationContext on it to get an app context to use in \
various<br> > Xt calls. Now on most systems this works fine--e.g., Ubuntu Dapper \
32-bit<br> > with FF2 and Intrepid 32-bit with FF3 both work flawlessly. However, \
when I<br> > build a 64-bit version and try it on Ubuntu Hardy 64-bit with FF3, \
it<br> > doesn't work. When it enters XtDisplayToApplicationContext, I get \
"Error:<br> > Couldn't find per display information" on the console \
and the program exits.<br> <br>
</div>I think that happens when you pass a NULL Display to<br>
XtDisplayToApplicationContext.<br>
<br>
I can't say I know anything about Xt, but does it fail in a simple testcase?<br>
<br>
#include <X11/Xlib.h><br>
#include <X11/Intrinsic.h><br>
#include <stdio.h><br>
#include <stdlib.h><br>
<br>
int main(int argc, char *argv[])<br>
{<br>
Display *dpy;<br>
XtAppContext ctx;<br>
<br>
dpy = XOpenDisplay(NULL);<br>
if (!dpy) {<br>
fprintf(stderr, "XOpenDisplay failed\n");<br>
exit(1);<br>
}<br>
ctx = XtDisplayToApplicationContext(dpy);<br>
XCloseDisplay(dpy);<br>
<br>
return 0;<br>
}<br>
<br>
--<br>
<font color="#888888">Dan<br>
</font></blockquote></div><br>
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic