Make me a window manager! I hate code bloat!

So I have decided to replace my Windows 7 system by a golfed version. However, I know that it is not easy, so let's build a prototype first. It will take a list of windows from the user and show them using a pseudo-graphic display on the standard output.

For example: user input:


0,0,15,10
15,10,20,15
10,13,15,15
9,1,16,3
17,5,20,7
11,2,17,4
15,4,19,6
13,3,18,5


The Code Golf® Window Manager™ outputs:


┌──────────────┐
│::::::::┌─────┴┐
│::::::::│:┌────┴┐
│::::::::└─┤:┌───┴┐
│::::::::::└─┤::::├┐
│::::::::::::└─┬──┘├┐
│::::::::::::::├─┬─┘│
│::::::::::::::│ └──┘
│::::::::::::::│
│::::::::::::::│
└──────────────┼────┐
               │::::│
               │::::│
          ┌────┤::::│
          │::::│::::│
          └────┴────┘


Input:


Taken from standard input (or, if your system has no stdin, any method that can provide several lines of input)
Each line contains 4 numbers, delimited by commas - coordinates of a window
First two numbers: upper-left corner; last two numbers: lower-right corner
Using x,y notation


Output:


Write it to standard output (or, if your system has no stdout, anything that displays monospaced text)
Use single box-drawing characters from Code Page 437 for drawing window boundaries
Windows specified later in input obscure those specified earlier
Fill the windows with the colon character: :
Leading and trailing spaces are OK, as long as they don't break alignment of the windows


Notes:


Maximum resolution I want to support: 76 (horizontal) by 57 (vertical)
No need to support bad input
Maximum number of windows: 255 (if you need a limit)
My Windows 7 cmd shell displays codepage 437 characters by default; if anyone has a way to do that on linux (using xterm or whatever), please describe it here


For reference, the character codes are:

┌da   ─c4   ┬c2   ┐bf

│b3   :3a   │b3   │b3

├c3   ─c4   ┼c5   ┤b4

└c0   ─c4   ┴c1   ┘d9


Total: 12 different characters.
JavaScript ES6 (FF ≥ 31.0), 404 chars



w=s=&gt;{a=[];for(i=0;i&lt;57;)a[i++]=Array(76).fill(0);s.split('\n').map(e=&gt;{r=e.split(',');a[x=r[1]][w=r[0]]|=5;a[x][y=r[2]]|=6;a[z=r[3]][w]|=9;a[z][y]|=10;for(i=x;++i&lt;z;)a[i][w]|=12,a[i][w]&amp;=14,a[i][y]|=12,a[i][y]&amp;=13;for(i=w;++i&lt;y;)a[x][i]|=3,a[x][i]&amp;=11,a[z][i]|=3,a[z][i]&amp;=7;for(i=x;++i&lt;z;)for(j=w;++j&lt;y;)a[i][j]=16});console.log(a.map(e=&gt;e.map(t=&gt;t==16?':':' xx─x┌┐┬x└┘┴│├┤┼'[t&amp;15]).join('')).join('\n'))}


Without ES6 :

function w(s){a=[];for(i=0;i&lt;57;i++){a[i]=[];for(j=0;j&lt;76;j++)a[i][j]=0}s.split('\n').forEach(function(e){r=e.split(',');a[r[1]][r[0]]|=5;a[r[1]][r[2]]|=6;a[r[3]][r[0]]|=9;a[r[3]][r[2]]|=10;for(i=r[1];++i&lt;r[3];)a[i][r[0]]|=12,a[i][r[0]]&amp;=14,a[i][r[2]]|=12,a[i][r[2]]&amp;=13;for(i=r[0];++i&lt;r[2];)a[r[1]][i]|=3,a[r[1]][i]&amp;=11,a[r[3]][i]|=3,a[r[3]][i]&amp;=7;for(i=r[1];++i&lt;r[3];)for(j=r[0];++j&lt;r[2];)a[i][j]=16});console.log(a.map(function(e){return e.map(function(t){return t==16?':':' xx─x┌┐┬x└┘┴│├┤┼'[t&amp;15]}).join('')}).join('\n'))}


w('0,0,15,10\n15,10,20,15\n10,13,15,15\n9,1,16,3\n17,5,20,7\n11,2,17,4\n15,4,19,6\n13,3,18,5'); outputs correctly the OP's example.  

The edges of windows are built using bitwise operators (Up=8, Bottom=4, Left=2, Right=1).