<div>Thanks a lot, Glynn!</div> <div> </div> <div>Now that X is not of any hope for me, are there other ways which I can look for? Is there a way I can ask the toolkit or window manager to tell me if a window is disabled (or modal)?</div> <div> </div> <div>I was looking for conditions to detect if a window is a modal dialog. But, if it is not possible, at the least, I need to find out if a window is in a disabled (i.e, mouse/key events can't be sent to it) or enabled. </div> <div> </div> <div>Any hope?</div> <div> </div> <div>Also, could you please point me to some documents which I can read to understand the internals of Xlib, tool kits and window managers?</div> <div> </div> <div>Thanks and regards,</div> <div>Suma.<BR><BR><B><I>Glynn Clements <glynn@gclements.plus.com></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>Suma Byrappa wrote:<BR><BR>>
I need to fnd out if a dialog (or window) is modal or modeless using<BR>> Xlib APIs. What can I use to differentiate between modal and<BR>> modeless?<BR><BR>You can't; at least, not reliably. So far as X is concerned, a window<BR>is a window.<BR><BR>Whether or not a dialog is modal depends upon how the application (or<BR>the toolkit which it uses) treats it. Toolkits typically implement<BR>modal dialogs by ignoring user input events sent to other windows<BR>while a modal dialog is being displayed.<BR><BR>The fact that certain events are being ignored is internal to the<BR>application. You can't reliably detect this from another application.<BR><BR>> I found few topics which mention about override_redirect and<BR>> WM_TRANSIENT_FOR properties. But, when I read the properties of<BR>> dialog windows, they don't match with the usage of<BR>> override_redirect.<BR><BR>If a window has a WM_TRANSIENT_FOR property, it's likely to be a<BR>dialog (rather than e.g. a
"document" window), although not<BR>necessarily a modal one. However, nothing forces an application to set<BR>this property on modal dialogs, and nothing prevents it from setting<BR>it on other windows. However, this is the closest that you're likely<BR>to be able to get to determining whether or not a top-level window is<BR>a dialog.<BR><BR>The override_redirect flag is a separate issue. This is used for<BR>windows which should be completely ignored by the WM, e.g. pop-up<BR>menus, tooltips, etc. Any window with this flag probably isn't a<BR>"dialog" of any sort.<BR><BR>-- <BR>Glynn Clements <GLYNN@GCLEMENTS.PLUS.COM><BR></BLOCKQUOTE><BR><p>
<hr size=1></hr>
Find out what India is talking about on - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers India</a> <BR>
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. <a href="http://us.rd.yahoo.com/mail/in/messengertagline/*http://in.messenger.yahoo.com">Get it NOW</a>