Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Focus in Multiple Wish Sessions

Status
Not open for further replies.

timmdecker

Technical User
Apr 7, 2005
3
0
0
US
I am using training software for the National Weather Service and we have run across a problem. We are running a simulator in one wish session and we are running the simulator display in a completely different wish session. Our problem is that when a forecaster is using the display for training and the simulator produces a pop-up message, the display loses focus and will not respond again until thee is a mouse click with inthe display. Does anyone know how to keep a new window from grabbing focus from a previous window that exists in a different wish session??
 
Under the Window Manager (WM):
wm focusmodel window ?active|passive?
If active or passive is supplied as an optional argument to the command, then it specifies the focus model for window. In this case the command returns an empty string. If no additional argument is supplied, then the command returns the current focus model for window. An active focus model means that window will claim the input focus for itself or its descendants, even at times when the focus is currently in some other application. Passive means that window will never claim the focus for itself: the window manager should give the focus to window at appropriate times. However, once the focus has been given to window or one of its descendants, the application may re-assign the focus among window's descendants. The focus model defaults to passive, and Tk's focus command assumes a passive model of focusing.
Maybe your pop-up has an "active" focus model? Either that or you can make the forecaster's display 'active'?

_________________
Bob Rashkin
rrashkin@csc.com
 
I had not been setting the focus model on the pop-ups, so they are supposed to default to passive. The forecasters display is a part of a government progrma that I cannot alter. Basically my only option is to tell my wish session to either not take the focus or to throw it back to the display wish session once it gains the focus. This would be an easy problem if they were in the same session.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top