puk
puk

Reputation: 16802

is it possible to assign a window id when launching a program from shell?

If you do xwininfo it will give you the window id, however, this requires clicking the mouse over a target window. Is there any way to force the window manager, or at least suggest to the window manager, to use a specific id. Something like

gedit windowid=0x12345678


I have uploaded some files to GitHub (see here or here) demonstrating how I managed to work around this. If you look at them you'll get a better feel for what it is I am attempting to do.

Upvotes: 3

Views: 966

Answers (1)

moongoal
moongoal

Reputation: 2956

No, it is not possible. The Window IDs are given by the X server as XCreateWindow/XCreateSimpleWindow are called, and there is no way to change them, it would be terribly dangerous and wrong to let user choose them. If you are planning to find a window, you can try using the XQueryTree function along with XGetWindowProperty and the WM_CLASS property.

Upvotes: 1

Related Questions