Version 2 of Dual or Multiple Monitors

Updated 2004-02-11 01:06:41

Try to determine if we are operating on a system with dual monitors. It even handles switching modes mid-execution. At least on Windows. The maxsize command seems to keep up with the changes to the display. Damon Courtney

 proc DualMonitors {} {
     set top .#dualMonitorCheck#
     if {![winfo exists $top]} { toplevel $top; wm withdraw $top }
     set sw [winfo screenwidth $top]
     set mw [lindex [wm maxsize .] 0]
     return [expr {($sw * 2) < $mw}]
 }