Bugs item #2933148, was opened at 2010-01-15 18:17 Message generated for change (Comment added) made by eighthave You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2933148...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pd-devel Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Roman Haefeli (reduzent) Assigned to: Hans-Christoph Steiner (eighthave) Summary: [pd-gui-rewrite] 'vis 1' to canvas moves window
Initial Comment: When sending 'vis 0' and 'vis 1' repeatedly to a canvas, the window moves downwards with each cylce. The amount of the shift seems dependent on the height of the menu of the window. If the window is wide enough so that the whole menu fits into one line, the amount is significantly smaller (ca. 30px). With a narrow window and a menu splitted into three lines, the amount is bigger (ca. 60px).
Could it be, that the stored window position refers to the patching area, whereas when drawn by the window manager, the patching area is shifted by the menu?
I tested on Gnome and fluxbox. The shifting does not happen with pd-vanilla.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave)
Date: 2010-01-17 18:52
Message: Unfortunately, the shifting does happen on Pd-vanilla, just less so. There doesn't seem to be a way in Tcl/Tk to measure the size of the window frame of X11 windows. Different window managers will have different sizes of window frames. In 0.43 it was moving a lot since it didn't take into account the window frame at all. I added the measurements for GNOME/metacity, which should work well for a wide range of setups. Hopefully someone can figure out how to actually measure window frame.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2933148...
SourceForge.net wrote:
Message: Unfortunately, the shifting does happen on Pd-vanilla, just less so. There doesn't seem to be a way in Tcl/Tk to measure the size of the window frame of X11 windows. Different window managers will have different sizes of window frames. In 0.43 it was moving a lot since it didn't take into account the window frame at all. I added the measurements for GNOME/metacity, which should work well for a wide range of setups. Hopefully someone can figure out how to actually measure window frame.
btw, have you had a look at the hack in the ::pdwindow::set_layout proc to measure the window decorations (though you deleted the code again)?
fmasdr IOhannes
On Jan 19, 2010, at 3:10 AM, IOhannes m zmoelnig wrote:
SourceForge.net wrote:
Message: Unfortunately, the shifting does happen on Pd-vanilla, just less so. There doesn't seem to be a way in Tcl/Tk to measure the size of the window frame of X11 windows. Different window managers will have different sizes of window frames. In 0.43 it was moving a lot since it didn't take into account the window frame at all. I added the measurements for GNOME/metacity, which should work well for a wide range of setups. Hopefully someone can figure out how to actually measure window frame.
btw, have you had a look at the hack in the ::pdwindow::set_layout proc to measure the window decorations (though you deleted the code again)?
Yes, did you test that code? It only works on Windows from my tests and the docs I read. Something like that should exists for Windows, but that would go elsewhere, like init_for_platform.
.hc
----------------------------------------------------------------------------
Computer science is no more related to the computer than astronomy is related to the telescope. -Edsger Dykstra
Hans-Christoph Steiner wrote:
btw, have you had a look at the hack in the ::pdwindow::set_layout proc to measure the window decorations (though you deleted the code again)?
Yes, did you test that code? It only works on Windows from my tests and the docs I read. Something like that should exists for Windows, but that would go elsewhere, like init_for_platform.
i only tested it on linux (xfce4), and it seemed to return reasonable values.
mgfasdr IOhannes