[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] get_wm_info on linux
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] get_wm_info on linux
- From: "René Dudfield" <renesd@xxxxxxxxx>
- Date: Thu, 6 Mar 2008 16:47:50 +1100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 06 Mar 2008 00:47:54 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=8cfYhju/K5iiBRZAc7j83ZSvCTptK64UnNJm2rAqe50=; b=ZFHUyU+yhuIJXlCP6ND5CKk37xDdAC+bEOHRYEISUTOu8wxMwXINXrdtsKJMQHtF3CfPQjKM/Mzgy/2edk/haEV7NPwk+SpT5j//joU+A38/dreEPiQGdRmqzoK42JTGtBhvFQYwc0UKSItk6iwgCYIBo+twX0hC6JI9iorHUh0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=vp+YWOcjouicvIjhbXTs17+hFlQAO1PEJtOl95IJzDYSEnEqWi1efdOO8bwL4PdNG0RiknYG/XngRDm9Zys73RNSEmuW7EnpEQT75dJBGPiiBRRdC3wwwdxGCHy+ftg4BxydowRr2hb+PiWGXsfvjD+t0xVCA9m1qLg/V6xyEa8=
- In-reply-to: <c3f69bf60803052118r4164f7c5s8e826b897374b58a@xxxxxxxxxxxxxx>
- References: <c3f69bf60803052118r4164f7c5s8e826b897374b58a@xxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Is window as an int in there?
Have a look at src/display.c There you'll see the X11 properties put in there.
Is this what you're after?
info = pygame.display.get_wm_info()
windowid = info.get("window")
print "The window ID is", hex(windowid)
display is a pointer on X11.
On Thu, Mar 6, 2008 at 4:18 PM, Patrick Mullen <saluk64007@xxxxxxxxx> wrote:
> I am embedding ogre in a pygame window, which is working fine on
> windows, but on linux ogre needs not only the window handle, but also
> a display pointer and screen id. Fortunately,
> pygame.display.get_wm_info() returns a display field, and the screen
> id I assume is just zero. Unfortunately, the display field in the
> dictionary is of type PyObject, and has absolutely no accessible
> properties. Is there any way to get access to this information or am
> I just stuck?
>