| Ticket UUID: | 629827 | |||
| Title: | Moving toplevel windows fails | |||
| Type: | Bug | Version: | obsolete: 8.3.4 | |
| Submitter: | hschock | Created on: | 2002-10-28 13:00:15 | |
| Subsystem: | 68. Win Window Operations | Assigned To: | nobody | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Open | Last Modified: | 2019-08-30 19:29:27 | |
| Resolution: | None | Closed By: | nobody | |
| Closed on: | ||||
| Description: |
Moving or resizing toplevel windows under Windows OS sometimes fails. This problem occured within an application running cyclic http calls. The attached code reduces the problem to a few lines of code. To reproduce the problem simply run the attached code inside a wish, drag the window to another position and wait until the mouse looses the window (still holding the left mousebutton). | |||
| User Comments: |
fvogel added on 2019-08-30 19:29:27:
Correction: WM_EXITSIZEMOVE is sent during (probably exactly at the end of) the [after] wait period just before re-entering bgproc, and not when ::x is set. The rest of what I stated below seems right to me however. Here is my adapted test script:
package require Tk
wm title . "Test Window"
wm geometry . 200x200+0+0
proc bgproc {} {
puts "Entering bgproc"
puts [after 100 {puts Setting; set ::x 0 ; puts SET}]
vwait ::x
puts "Running in background..."
puts [after 1000 bgproc]
puts "Leaving bgproc\n"
}
bgproc
I have added a printf+fflush(stdout) in WmProc() on WM_ENTERSIZEMOVE and on WM_EXITSIZEMOVE. The above spits the following output showing exactly when WM_EXITSIZEMOVE is sent: ... Entering bgproc after#36 Setting SET Running in background... after#37 Leaving bgproc WM_ENTERSIZEMOVE Entering bgproc after#38 Setting SET Running in background... after#39 Leaving bgproc WM_EXITSIZEMOVE Entering bgproc after#40 Setting SET Running in background... after#41 Leaving bgproc ... fvogel added on 2019-08-30 18:38:39: A few findings:
fvogel added on 2019-08-28 20:18:43: I have now fixed [943d5ebe51] but the issue described in the present ticket persists so it's a different issue. ckoechli added on 2018-12-11 15:54:17: It's still there with 8.6.9 and windows 10 Resizing the window or draging it around triggers the problem. It is possible to recover from it using: wm resizable . 1 1 Would the use of threads instead of the "after" trick solve it ? That would at least prevent something from being interrupted at the wrong time. fvogel added on 2018-06-29 19:06:10: See also [943d5ebe51], it looks similar. fvogel added on 2016-08-17 15:38:36: Still here with core-8-5-branch, core-8-6-branch and trunk. hschock added on 2002-10-28 20:00:15: File Added - 34067: winerr.tcl | |||
Attachments:
- winerr.tcl [download] added by hschock on 2002-10-28 20:00:15. [details]
