Tk Source Code

View Ticket
Login
Ticket UUID: 436ad6fe5f89d19b86d3fbeb1bb64febdaaaeebb
Title: "wm manage" loses window on macOS
Type: Bug Version: 8.6
Submitter: kevin_walzer Created on: 2019-06-12 02:46:55
Subsystem: 66. Aqua Window Operations Assigned To: marc_culler
Priority: 5 Medium Severity: Critical
Status: Closed Last Modified: 2019-06-14 16:32:01
Resolution: Fixed Closed By: marc_culler
    Closed on: 2019-06-14 16:32:01
Description:
The "wm manage" command seems to be broken on Mojave. The themed toolbar example in the widget demo is supposed to toggle a widget between being a child widget and its own toplevel, as the "wm manage" command specifies. Instead the widget never becomes a top-level but instead disappears.
User Comments: kevin_walzer added on 2019-06-14 02:02:08:
Yes, I think it is safe to merge.

marc_culler (claiming to be Marc Culler) added on 2019-06-13 13:34:25:

Kevin, do you think it is safe to merge this fix?


kevin_walzer added on 2019-06-13 02:03:40:
(Editing bug report for better example)

The themed toolbar example in the widget demo now works as expected. 

I suspect the changes in behavior are related to the numerous changes in window creation (windows opening offscreen, etc.) that have been made recently, but it would be hard to be more specific.

marc_culler (claiming to be Marc Culler) added on 2019-06-12 18:52:41:

Some points about this:

* The code above is incorrect because the first argument ($b) is omitted in the calls to dock and undock.

* This problem has nothing to do with Mojave. The behavior is the same on Sierra.

* The problem does have to do with changes made after the release of 8.6.8. The sample program works with 8.6.8. However, there were no changes to WmManageCmd since 8.6.8.

* I looked at the code for WmManageCmd and it seemed wrong. I cannot explain why it worked in 8.6.8. When I changed the two lines which seemed wrong, the sample program worked fine on Mojave.

* My changes are in the branch bug-436ad6fe5f. All regression tests pass in that branch, and everything I tried worked. But careful testing is needed since I was not able to explain why the exact same code worked in 8.6.8 and failed in 8.6.9.