From: Christopher Michael <cpmichael1@co...> - 2011-01-06 23:07:43
On 01/06/2011 05:32 PM, Nicolas wrote:
> I'm using Ecore_X and I'm trying to get the X window ID of the Ecore_Window.
> I do:
> int pm;
> ecore_x_window_prop_xid_get(mywindow, NULL, NULL,&pm, 1);
> pm is not null but it doesn't seem to work.
> Is this the correct way ?
> Ecore_X api is:
> ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom,
> Ecore_X_Atom type, Ecore_X_ID *lst, unsigned int len);
> I don't know what to write in "Ecore_X_Atom atom" and "Ecore_X_Atom type"...
> Thanks in advance for reply.
ecore_x_window_new already returns the X Window Id:
win = ecore_x_window_new(NULL, 0, 0, 100, 100);
Here, win is the X Window Id. ecore_x_window_new uses XCreateWindow,
which returns the id, so no reason to do a window_prop_xid_get really.
"The XCreateWindow function creates an unmapped subwindow for a
specified parent window, returns the window ID of the created window"
You should avoid fetching window props & atoms as much as possible
because most (if not all) are "round-trip" requests.
Someone feel free to correct me if I am wrong here.
Get latest updates about Open Source Projects, Conferences and News.