From: SourceForge.net <no...@so...> - 2012-04-21 08:17:00
|
Bugs item #3512824, was opened at 2012-03-29 06:57 Message generated for change (Comment added) made by nijtmans You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3512824&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 68. Win Window Operations Group: development: 8.6b2 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Roland Schwingel (rolandschwingel) Assigned to: Jan Nijtmans (nijtmans) Summary: Tk and dual/multihead on windows Initial Comment: 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 ---------------------------------------------------------------------- >Comment By: Jan Nijtmans (nijtmans) Date: 2012-04-21 01:16 Message: 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 ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2012-04-13 15:32 Message: 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. ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2012-04-13 04:29 Message: Thanks, danckart! I'll have a look at those first. ---------------------------------------------------------------------- Comment By: Koen Danckaert (danckaert) Date: 2012-04-13 03:52 Message: 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. ---------------------------------------------------------------------- Comment By: Roland Schwingel (rolandschwingel) Date: 2012-04-13 02:58 Message: 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. ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2012-04-05 23:32 Message: 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! ---------------------------------------------------------------------- Comment By: Roland Schwingel (rolandschwingel) Date: 2012-03-29 06:58 Message: Assigned as wished to Jan Nijtmans. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3512824&group_id=12997 |