This is something that I manually adjust in the Wish code every time I upgrade Pd. It would be very nice to have it be a configurable setting in Preferences.
Phil Stone Davis, CA
This is how to manually set the size and position, by the way:
in Resources/tcl/pdwindow.tcl:
wm geometry .pdwindow =538x300+0+458
first two values are x-size, y-size, then x-offset, y-offset
Best,
Phil Stone Davis, CA
From: Philip Stone pkstone@ucdavis.edu This is something that I manually adjust in the Wish code every time I upgrade Pd. It would be very nice to have it be a configurable setting in Preferences.
Phil Stone Davis, CA
On 4/14/21 4:17 PM, Philip Stone via Pd-list wrote:
This is something that I manually adjust in the Wish code every time I upgrade Pd. It would be very nice to have it be a configurable setting in
Preferences.
why?¹ and why is there no feature-request on https://bugs.puredata.info?
one possible answer to the second question is, that I (yes me) would probably close such a feature-request immediately, on the grounds that you can implement this with a trivial gui-plugin:
put a file named "mypdwindowgeometry-plugin.tcl" (the base-name does not matter but it *must* end with "-plugin.tcl") with the following content into your Pd-searchpath (without the backticks):
if {[winfo exists .pdwindow]} {
wm geometry .pdwindow =538x300+0+458
}
whenever you start Pd, this GUI plugin will move the window to the selected place. no patching of Pd required. works on all OSs (not tested).
you could even reduce the plugin to just the "wm geometry ..." line.
i guess writing this plugin is about the same amount of typing as a "configurable setting" (provided this setting is text-based and not just "remember my current position").
mgffst IOhannes
¹ what i would wish for is that the Pd window opened up on the currently active monitor, rather than my left-most monitor, where i usually have a full-screen editor running that likes to hide my Pd)
On 4/14/21 5:40 PM, IOhannes m zmoelnig wrote:
¹ what i would wish for is that the Pd window opened up on the currently active monitor, rather than my left-most monitor, where i usually have a full-screen editor running that likes to hide my Pd)
so i checked this and it seems rather complicated to find out about the screen layout on modern day systems where single graphics cards have multiple outputs that form a big "virtual screen" and what not.
however, i found that if you don't specify the position in the first place, the WM will do the right thing™ and open the window on the currently active monitor.
so i wondered whether we shouldn't just let the WM decide where to put the main pdwindow. (on my system this would be the center of the currently active monitor) in caser you wondered, we can still specify the window dimension.
would this break anybodies experience?
(of course the suggested µ-gui-plugin in this thread to force a specific location/size would continue to work)
i checked the repository archive, but there's no indication *why* the position of the PdWindow is hardcoded. the positioning was added during the Pd-GUI rewrite for Pd-0.43 (commit b23a763e), but that was in the pre-git area, so there's no history beyond the "merged in stuff" comment by miller.
the change is really simple. if somebody could check it on a multi-monitor setup on macOS and/or Windows that would be helpful:
diff --git a/tcl/pdwindow.tcl b/tcl/pdwindow.tcl
index 35d2583e..8089bf88 100644
--- a/tcl/pdwindow.tcl
+++ b/tcl/pdwindow.tcl
@@ -390,7 +390,7 @@ proc ::pdwindow::create_window {} {
} else {
wm minsize .pdwindow 400 51
}
- wm geometry .pdwindow =500x400+20+50
+ wm geometry .pdwindow =500x400
frame .pdwindow.header -borderwidth 1 -relief flat -background
lightgray
pack .pdwindow.header -side top -fill x -ipady 5