forcing focus (Was Un-minimizing a window)



>>
If your widget is realized, you can simply do 

	gdk_window_show (widget->window);

This will map it if it is iconified or withdrawn and raise it if it
was already shown.
<<
  I have a similar problem...  My program's kind of like a GIS, the user
clicks on graphical objects in one window while he can do fast data entry
in a 'properties' window with his other hand.  
  
  gdk_window_raise() brings 'properties' forward, and
gtk_widget_grab_focus puts the cursor in the text field...  But the
properties window never becomes highlighted, or type-able, until the user
clicks on it directly (every time).
  
  So, my workaround is the same gtk_widget_hide / gtk_widget_show kludge,
which *does* force the focus to the Properties window.  (_show alone
doesn't do it.)
  
  Strangely this is not a problem in gtk-Win32, where the properties
window stays focused and type-able with no need for hide & show.  The
problem only occurs in *nix.
  
  Is focus somehow different from a window being the active one?  I can
post source for this tomorrow.
  
  Gracias,
  John
  
  
 

___________________________________________________________________
Why pay more to get Web access?
Try Juno for FREE -- then it's just $9.95/month if you act NOW!
Get your free software today: http://dl.www.juno.com/dynoget/tagj.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]