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