Tk Library Source Code

View Ticket
Login
Ticket UUID: 505299
Title: BWidget errors with multiple screens
Type: Bug Version: None
Submitter: patthoyts Created on: 2002-01-18 09:33:45
Subsystem: bwidget Assigned To: patthoyts
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2002-01-29 05:06:45
Resolution: Fixed Closed By: patthoyts
    Closed on: 2002-01-28 22:06:45
Description:
While trying the BWidget 1.3.1 demo on Windows 2000 
with Tcl 8.3.3 (the ActiveState 8.3.3 release) I found 
a problem with the ComboBox widget when run on the 
second monitor of a multi-screen windows system.

Running the demo app on screen 2, when I select the 
ComboBox button to show the list, the list appears on 
the primary monitor! Running the app on the primary 
monitor is OK.

A similar problem occurs with the dialog demos. The 
color picker, font selector, progression, and password 
dialogs all appear on the wrong monitor. The message 
box appears on the _correct_ monitor but not the 
template dialog.

Finally the tree page doesn't work at all if run on 
the secondary monitor although it's fine on the 
primary monitor. The error stack is attached.

So I assume this is a toplevel problem - and indeed 
from wish doing 'toplevel .t' on the secondary screen 
puts a toplevel widget on the primary screen. Placing 
the widget on screen 1 'wm geometry .t' 
gives '200x200+0+0' and top left of monitor 2 (which 
is to the left of monitor 1) gives '200x200+-1024+0'
User Comments: patthoyts added on 2002-01-29 05:06:45:
Logged In: YES 
user_id=202636

I have modified BWidget::place in util.tcl to support
negative placements when the platform is windows. The
BWidget ComboBox and dialogs now place correctly for each
secondary monitor position. I also changed the demo/tree.tcl
file to permit geometry settings like 100x100+-100+100 which
windows can produce.
Added a bit of documentation for BWidget::place too.

patthoyts added on 2002-01-27 05:37:20:
Logged In: YES 
user_id=202636

There appear to be two issues here. One is to fix
BWidget::place to cope with negative geometry values. TThe
other is a more general problem for Tk to enable a
programmer to know how many screens of what size and depth
exist on a windows system. Windows does this somewhat
differently to X.

hobbs added on 2002-01-25 05:40:35:
Logged In: YES 
user_id=72656

Well, one would have to figure out if it is Tk or bwidgets 
that isn't behaving right.  Negative indices seem odd to 
me, and it should be checked if that is "correct".  If so, 
we need to make sure windows respect that.

patthoyts added on 2002-01-23 04:56:38:
Logged In: YES 
user_id=202636

Windows allows you to setup multiple screens with the usual
wizard style of "don't let the user worry about the details"
so t's pretty hard to know. However, Tk seems to believe
that it's arranged as one large screen. As my secondary
screen is on the left of the primary the wm geometry values
are negative.

I'm happy to test things out on my system if I've some
general pointers on what to look at. I'm not familiar with
the BWidgets code but I can learn. It seems to me that these
windows are ignoring the sign of the horizontal position.
The vertical position is correct - but on the wrong monitor.
They actually appear at 0,v on the primary monitor (where v
is the vertical position of the combobox editfield.

hobbs added on 2002-01-23 04:03:37:
Logged In: YES 
user_id=72656

How are these screens configured?  One global, large 
screen, or as distinctive individual screens?  When testing 
using Unix and displaying to different distinct displays, 
everything seems to work OK.  I don't have a multiple 
monitor Windows system to test on.

patthoyts added on 2002-01-18 16:33:49:

File Added - 16329: bwidget.error.log

Attachments: