LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

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

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


Hello,

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
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,012

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
You haven't told us your distro.
You haven't told us your window manger.
You haven't read this: http://www.linuxsilo.net/docs/smart-questions_en.html
But welcome to LQ!
I expect better posts in the future
 
Old 11-30-2008, 10:52 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
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:

http://www.mail-archive.com/devel@xf.../msg05806.html

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

Rep: Reputation: 73
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.
 
  


Reply


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


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

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