<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Il 02/10/2012 16:43, Hans-Christoph Steiner ha scritto:
    <blockquote cite="mid:506AFD7E.9040107@at.or.at" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix"><br>
        The problem is caused by how Tk and X11 measures window frames:
        it measures it including all of the chrome around the window
        (the button/title bar on the top, any framing on the bottom,
        etc.)&nbsp; The window framing/chrome varies a lot depending on which
        window manager, etc. you are using.&nbsp; <br>
        <br>
        <a moz-do-not-send="true" class="moz-txt-link-freetext"
          href="http://wiki.tcl.tk/11502">http://wiki.tcl.tk/11502</a><br>
        <br>
        Pd-extended places windows based on how things measure using a
        standard GNOME install, since GNOME is the default on most
        distros.<br>
        <br>
        So what you need to do is write a plugin that sets custom values
        for your window manager.&nbsp; I think these are the variables you
        need, but look in pd/tcl/pdtk_canvas.tcl for more info:<br>
        <br>
        set ::windowframex 5&nbsp;&nbsp; (play with the numbers to get it right)<br>
        set ::windowframey 5<br>
        <br>
        Once you get it working, post it to the puredata.info/downloads
        page so others can download it if they're using the same window
        manager.&nbsp; There are lots of other things you can customize too,
        so you could make a plugin that makes Pd feel as native as
        possible.<br>
        <br>
        .hc<br>
        <br>
      </div>
    </blockquote>
    <br>
    Thanks for the help.<br>
    I made some experiments with ::windowframex and ::windowframey and I
    found out the following things:<br>
    With ::windowframex = 1 and ::windowframey = 49, a loaded patch is
    displayed correctly in the position previously saved. That's
    beacause 49 is the sum of the heights of the wm's title bar and the
    pd's menu bar, and 1 is the width of the wm frame.<br>
    But with those settings the "new file" create a window outside the
    screen (x = -1, y = -49).<br>
    To fix that, I have to set ::windowframex and ::windowframey to 0,
    but that makes the loading of a saved patch incorrect again (49
    pixels below and 1 pixel to the left of the saved position).<br>
    <br>
    Is there different procedures to menage the "new file" and "open
    file"?<br>
    <br>
    &nbsp;&nbsp;&nbsp; Thanks<br>
    <pre class="moz-signature" cols="72">-- 
Nicola</pre>
  </body>
</html>