This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Force focus on Windows


I have committed the following patch, which is required to meet user 
expectations on windows platforms:

2001-04-10  Keith Seitz  <keiths@cygnus.com>

	From Tom Tromey (tromey@redhat.com):
	* library/managedwin.itb (reveal): We actually do want to force
	the focus for Windows.

Index: managedwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/managedwin.itb,v
retrieving revision 1.12
diff -p -u -r1.12 managedwin.itb
--- managedwin.itb	2001/04/09 17:35:31	1.12
+++ managedwin.itb	2001/04/10 15:45:31
@@ -85,6 +85,13 @@ body ManagedWin::reveal {} {
   # `focus $top'.  However, this has no useful effect -- it just
   # resets the subwindow of $top which has the `potential' focus.
   # This can actually be confusing to the user.
+
+  # NOT for Windows, though. Without the focus, we get, eg. a
+  # register window on top of the source window, but the source window
+  # will have the focus. This is not the proper model for Windows.
+  if {$::tcl_platform(platform) == "windows"} {
+    focus -force [focus -lastfor $top]
+  }
 }
 
 # ------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]