Il 02/10/2012 16:43, Hans-Christoph Steiner ha scritto:

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.) The window framing/chrome varies a lot depending on which window manager, etc. you are using.

http://wiki.tcl.tk/11502

Pd-extended places windows based on how things measure using a standard GNOME install, since GNOME is the default on most distros.

So what you need to do is write a plugin that sets custom values for your window manager. I think these are the variables you need, but look in pd/tcl/pdtk_canvas.tcl for more info:

set ::windowframex 5   (play with the numbers to get it right)
set ::windowframey 5

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. There are lots of other things you can customize too, so you could make a plugin that makes Pd feel as native as possible.

.hc


Thanks for the help.
I made some experiments with ::windowframex and ::windowframey and I found out the following things: 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. But with those settings the "new file" create a window outside the screen (x = -1, y = -49). 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).

Is there different procedures to menage the "new file" and "open file"?

    Thanks

--
Nicola

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to