| Ticket UUID: | 3512824 | |||
| Title: | Tk and dual/multihead on windows | |||
| Type: | Bug | Version: | obsolete: 8.6b2 | |
| Submitter: | rolandschwingel | Created on: | 2012-03-29 13:57:47 | |
| Subsystem: | 68. Win Window Operations | Assigned To: | jan.nijtmans | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2014-03-13 09:09:33 | |
| Resolution: | Duplicate | Closed By: | nijtmans | |
| Closed on: | 2012-05-04 22:45:17 | |||
| Description: |
Hi... As already posted to the mailinglist (see: https://sourceforge.net/mailarchive/message.php?msg_id=29056120) Tk on windows appears to have a problem with screen dimensions on dual/multihead system. This is the bug report as suggested by Jan Nijtmans. Thanks, Roland | |||
| User Comments: |
nijtmans added on 2012-05-05 05:45:17:
allow_comments - 1 nijtmans added on 2012-05-05 05:45:16: With #533519 and #2768586 fixed, the remaining problem described here is a duplicate of #2257424. So closing this one. nijtmans added on 2012-04-21 15:16:58: Roland, could you please re-test branch bug-533519,
now it's based on trunk again? It corrects
the [winfo vroot??] function on Windows,
and adapts the various coordinate clipping
places to use the vroot limits in stead
of the screen limits.
I think that solves your problem too.
Thanks!
Jan Nijtmans
nijtmans added on 2012-04-14 05:32:35: Koen, Roland, After having looked at #533519, proposing two possible fixes for that in branch bug-533519(-alt), I wonder if this patch is still necessary. An application can use [winfo vrootwidth] and [winfo vrootheight], to do proper clipping. Agreed? @roland: Yes, this example was exactly what I wanted. It shows that the behavior on UNIX is different from Windows, which shows that this is a portability bug. nijtmans added on 2012-04-13 18:29:30: Thanks, danckart! I'll have a look at those first. danckaert added on 2012-04-13 17:52:53: Note that there are already a number of tickets about multiple monitor issues: #533519, #2257424, #2768586. The main reason why these were never solved is that coordinates may be negative on these systems (when the secondary monitor is to the left or top of the primary monitor), and Tk can't handle that. So when applying this patch, be careful that the situation doesn't get worse in these cases. rolandschwingel added on 2012-04-13 16:58:32: Attached you find a small test script that hopefully helps to illustrate what the problem is. I used a native (mingw 64bit and 32bit) wish 8.6 to execute the script. It shows the current screen dimensions plus the current window geometry plus the current mouse coordinates. On my system I am having 2 monitors having fullhd resolution (1920x1080) each. I use them rotated by 90 degrees. So one screen has 1080x1920 resolution. My desktop size is therefore 2160x1920. With an unpatched native tcl/tk 8.6 the script shows a screen res of 1080x1920. When I move the window to the 2nd screen I see the mouse coordinates and the window geometry going > 1080 in x which is over the maximum screen width. With my patch it shows the correct desktop size and mouse/window coordinates are always below the maximum size. I hope this was what you were asking for. I also made the cygwin test using the vanilla wish/tk 8.5.11 from cygwin. Here my script reports the correct (full dualhead) screen resolution. No patch is needed here. Cygwin tk queries the screen size from the XOrg server which works correct here. The patch is only needed for native (mingw/MSVC) builds of tk. rolandschwingel added on 2012-04-13 16:58:00: File Added - 441085: screensize.tcl nijtmans added on 2012-04-06 13:32:25: Ronald, do you have some test code, to demonstrate this? Your proposal is committed to a new branch "bug-3512824", for anyone interested to be evaluated. What I would like to know before merging this: - Does the same problem occur on UNIX as well? (Cygwin has a tk 8.5 port, which can be used as well to demonstrate this) - What possible unintended effect could this have on other applications which depend on the screen dimensions? So, test code would be handy here, even though it cannot be added to the test-suite, just a minimal script which can be executed manually, and which shows the difference before and after the patch. Thanks! rolandschwingel added on 2012-03-29 20:58:43: Assigned as wished to Jan Nijtmans. rolandschwingel added on 2012-03-29 20:57:54: File Added - 439769: tk_win_multihead.patch | |||
Attachments:
- screensize.tcl [download] added by rolandschwingel on 2012-04-13 16:57:59. [details]
- tk_win_multihead.patch [download] added by rolandschwingel on 2012-03-29 20:57:52. [details]
