[PD] Pd-extended 0.43 and Openbox

Hans-Christoph Steiner hans at at.or.at
Wed Oct 3 18:44:37 CEST 2012


On 10/03/2012 07:49 AM, Nicola Pandini wrote:
> 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"?

Look at pdtk_canvas.tcl, that's where this is happening.  The difference
is that with a new file, Pd is generating the x,y coords to place the
window, and with open file, its reading them from the first line of the
patch.

I use GNOME, so I am not well versed in all these issues.  But I'm happy
to help you figure this out so that we can easily support all the
various WMs that people want to use.

.hc




More information about the Pd-list mailing list