Tk Source Code

View Ticket
Login
Ticket UUID: 800178
Title: tk scaling -displayof wrong
Type: Bug Version: obsolete: 8.4.4
Submitter: markgsaye Created on: 2003-09-04 02:03:46
Subsystem: 65. Generic Window Operations Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-11-13 06:54:57
Resolution: Fixed Closed By: hobbs
    Closed on: 2004-11-12 23:54:57
Description:
tk scaling -displayof sets/returns the wrong value e.g.

# open a toplevel on another display
% toplevel .remote -screen remote:0.0
.remote

# set scaling on default display
% tk scaling -displayof . 1
# check value
% tk scaling -displayof .
1.00078802206

# set scaling on remote display
% tk scaling -displayof .remote 2
# check value
% tk scaling -displayof .remote
2.00157604413
# check local display again (should still be 1.00078802206)
% tk scaling -displayof .
2.00157604413

Consequently, winfo fpixels (and winfo pixels) does not
calculate measurements correctly e.g. check DPI for
each display:

% winfo fpixels . 1i
144.113475177
% winfo fpixels .remote 1i
100.036923077

The last value equates to a tk scaling value of
1.3894017094 which just happens to be the default
scaling value as set by the X server on the remote
display. It seems that 'tk scaling' always sets and
reports values for the default screen.

Linux 2.4.21 / KDE 3.1
User Comments: hobbs added on 2004-11-13 06:54:57:
Logged In: YES 
user_id=72656

Corrected for 8.4.8 and 8.5a2.