git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitk: restore wm state to normal before saving geometry information

From
Alexey Borzenkov <snaury@gmail.com>
Date
Sep 15, 2009, 13:58 UTC
Message-ID
<e2480c70909150658p4293b596w6860d7cc9b3670ef@mail.gmail.com>
In-Reply-To
<e2480c70909150554p2e211d60y18049b5534f8922e@mail.gmail.com>
On Tue, Sep 15, 2009 at 4:54 PM, Alexey Borzenkov <snaury@gmail.com> wrote:
Show 6 quoted lines
> On the other hand, when I resize columns and then maximize/restore the
> window repeatedly I see that their sizes change in a strange way (and
> the smaller restored window they stranger are results) until hitting
> some sort of equilibrium, then maximize/restore doesn't have effect on
> their sizes anymore. So maybe there's a bug not in a way my patch
> restores the window, but in a way window resizes are handled.

It seems that I found what's the problem. When the window is very small, and we maximize it, sash coords would initially be small. Then we calculate their new positions and set it with $win sash place, but unfortunately, tk limits them to the OLD pane size for some reason. Initially I though that maybe Configure is fired too early (before window is resized), but [winfo width $win] shows $win has the new size. Here's some output that I got during debugging:

resizing 422 -> 1261 (winfo shows 1261)
    s0: 138 1
    s1: 288 1
    sash0: 412 -> 412 1
    sash1: 860 -> 417 1
I'm at a loss why this happens and how to lift this restriction.
Previous: Alexey BorzenkovNext: Paul Mackerras
Message 14 of 16 in “gitk: restore wm state to normal before saving geometry information”
  1. gitk: restore wm state to normal before saving geometry informationAlexey Borzenkov, Sep 8, 2009
  2. 1/2 Work around leftover temporary save file.Pat Thoyts, Sep 15, 2009
  3. Alex RiesenSep 15, 2009
  4. Alexey BorzenkovSep 15, 2009
  5. Pat ThoytsSep 15, 2009
  6. Pat ThoytsSep 15, 2009
  7. 2/2 Fix the geometry when restoring from zoomed state.Pat Thoyts, Sep 15, 2009
  8. Alexey BorzenkovSep 15, 2009
  9. Paul MackerrasSep 17, 2009
  10. Alexey BorzenkovSep 17, 2009
  11. Pat ThoytsSep 18, 2009
  12. Pat ThoytsSep 15, 2009
  13. Alexey BorzenkovSep 15, 2009
  14. Alexey BorzenkovSep 15, 2009
  15. Paul MackerrasSep 16, 2009
  16. Pat ThoytsSep 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.