Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-27-2008, 04:46 PM   #1
LQ Newbie
Registered: Nov 2008
Posts: 2

Rep: Reputation: 1
How to get the ID of a window according to some particular condition?


I know that in X window programming, if I know the ID of a particular window, I can manage it. For example, I can resize that window by using
XResizeWindow(display, win, 200, 300);

So my question is, how to get the window ID?

Particularly, when I know the PID of a program, how can I get the X window ID of the window in which it is running?

thanks in adv!
Old 11-27-2008, 04:59 PM   #2
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,087

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
You haven't told us your distro.
You haven't told us your window manger.
You haven't read this:
But welcome to LQ!
I expect better posts in the future
Old 11-30-2008, 10:52 PM   #3
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
Some wm's (fvwm comes to my mind) might integrate a way to implement this. However I don't think that the OP was asking about that, since he seems to be talking about xlib programming.

I am not into xlib programming, however I saw this sometime ago and bookmarked it for some reason:

It might or might not be useful, take a look just in case
Old 12-01-2008, 03:53 AM   #4
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Moved: This thread is more suitable in the Programming forum and has been moved accordingly to help your thread/question get the exposure it deserves.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysqldump where condition? ThaSaltyDawg Linux - Newbie 4 11-11-2008 06:25 PM
if condition furqan_sindhu Linux - Newbie 5 09-22-2007 06:56 AM
using OR condition in if condition Fond_of_Opensource Linux - Newbie 2 10-20-2006 12:34 AM
preg not condition dlublink Programming 5 05-31-2006 12:39 AM
What condition I don't need initrd? Chowroc Linux - General 3 05-22-2005 02:59 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration