opened
umlaeute
username_0
this is a re-implementation of PR #224, which:
- keeps the window-positions on X11
- is more optimized (check for hacks is only done on boot time (and therefore drops the `TCL_PATCHLEVEL` variable)

i've tested this on Debian but only with a standard dual-screen setup (main monitor to the left of right-monitor)

### original PR text

As reported on the pd-list, negative canvas window positions are clipped to 0 and/or reflected on the opposite screen border.

This PR fixes that by allowing negative positions to be sent to the window manager in Tk 8.5+ and keeps the clipping for Tk 8.4 as a fallback. Also, versions of Tk < 8.5.13 on macOS keep the clipping due to the buggy nature of the TK Cocoa backend up until that version.

This will need to be tested on all platforms but, from my research, it should be fine as negative positions were added to 8.5 and back ported to 8.4 at some point. I decided to use 8.5 as a hard limit to be conservative.

This also removes the apparently unused TCL_*_VERSION variables

Tested so far on macOS 10.12.6 with Tk 8.4, Tk 8.5.9, Tk 8.7.0a.

You can try a build for newer macs (10.9+) with Tk 8.7a: http://docs.username_1.com/pdbuilds/Pd-0.48-1-multimonitor.app.zip

Here is a minimal patch which opens sub patches in all 4 directions. Expected behavior: all open on screen, either in expected location or clipped to screen edge if the position is off screen.

~~~
#N canvas 100 300 450 300 10;
#N canvas 400 -800 450 300 top 1;
#X restore 150 50 pd top;
#N canvas 400 1800 450 300 bottom 1;
#X restore 150 250 pd bottom;
#N canvas -1800 400 450 300 left 1;
#X restore 50 150 pd left;
#N canvas 1800 400 450 300 right 1;
#X restore 250 150 pd right;
~~~
reimplemented "allow negative canvas positions in Tk 8.5+ for multi monitor support"
issue
created
danomatika
username_1
I can confirm this is working on macOS 10.12.6.
comment