Re: gdk_window_foreign_new returns NULL
- From: "Brian J. Tarricone" <bjt23 cornell edu>
- To: gtk-app-devel-list gnome org
- Subject: Re: gdk_window_foreign_new returns NULL
- Date: Thu, 21 Apr 2005 16:25:19 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
jacktm wrote:
jacktm wrote:
I'm working on a big project and I have to use
gdk_window_foreign_new function in it. It doesn't work
and always returns NULL. I've checked if I can use
it in a small application - just to see how does it work,
but unfortunately it doesn't work for me. I attached
as simple test as I could do (just a tutorial program
+ call to gdk_window_foreign_new). What's wrong?
What should I do to make it work?
[snip]
// Create the window
Window w = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0,
200, 100, 0, blackColor, blackColor);
gdk_win = gdk_window_foreign_new((guint32)w);
[...]
// "Map" the window (that is, make it appear on the screen)
XMapWindow(dpy, w);
[...]
// Wait for the MapNotify event
for(;;) {
XEvent e;
XNextEvent(dpy, &e);
if (e.type == MapNotify)
break;
}
IIRC, you need to map the window and wait for the window to actually get
mapped *before* calling gdk_window_foreign_new().
-brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
iD8DBQFCaDZf6XyW6VEeAnsRAhv7AJ4xmTBbw9MXJtwrb8L3mJpMrOarBQCfXfsW
XamUi+RxpAnXnyjUkfKQkNA=
=b+6l
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]