Overview
Artifact ID: | 482e62d61c655bbc78d769090bbb5b1541f348ee |
---|---|
Ticket: | 5919a0ec2d31ae284f6de8b6c9c8b332ee02190c
BWidget::place fails in a dual screen environment on windows |
User & Date: | anonymous 2016-07-20 20:42:55 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
I am using a laptop with the following screens: - main screen: 2880x1800 (max. resolution), but currently running on 1920x1200 - 2nd screen: 1920x1200, operating system is windows 7. When starting the BWidgets demo the process is running, but the window is initially placed outside the screen and therefore completely invisible. As the BWidget::place procedure is also used in the Dialog widget, a BWidget dialog comes along with the same problem. The folowing code change fixes the problem on my machine - pls. see changes down below the "center to screen comment": proc BWidget::place { path w h args } { .... set sw [winfo screenwidth $path] set sh [winfo screenheight $path] if { $idx == 1 } { if { $arglen == 2 } { # center to widget set x0 [expr {[winfo rootx $widget] + ([winfo width $widget] - $w)/2}] set y0 [expr {[winfo rooty $widget] + ([winfo height $widget] - $h)/2}] } else { # center to screen # set x0 [expr {($sw - $w)/2 - [winfo vrootx $path]}] # set y0 [expr {($sh - $h)/2 - [winfo vrooty $path]}] set x0 [expr {[winfo rootx $path] + ([winfo width $path] / 2 - [winfo reqwidth $widget] / 2)}] set y0 [expr {[winfo rooty $path] + ([winfo height $path] / 2 - [winfo reqheight $widget] / 2)}] # If $main is not realized we get funny sizes back # This will make the dialog box visible at least. if {$x0 < 0} {set x0 150} if {$y0 < 0} {set y0 150} } ... I would also be glad to forward the changed util.tcl file if required. Thanks a lot, Johann Oberdorfer
- foundin changed to: "1.9.10"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "f75db2b2e0daed8a015467f70380a582a0c11109"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "bwidget"
- title changed to:
BWidget::place fails in a dual screen environment on windows
- type changed to: "Bug"