Re: Xinerama-aware maximise

Sasha Vasko (sasha@aftercode.net)
Tue, 11 Dec 2001 03:47:08 -0600


On Tuesday 11 December 2001 08:57, James wrote:
> Is there a way to make the maximise action respect your monitor
> arrangement? I.e instead of having my Mozilla plastered across both
> screens, it should only be maximised on the screen it's currently on.
>

Ahh, yes, I missed this one.

> (or if that makes no sense, find a dual-head Windows 2000 box. That's
> how it should be).
>
> If I wanted to patch AS to do this myself, where should I be looking in
> the source (I assume you can ask Xinerama for the dimensions of each
> screen).

You should be looking at Maximize() function in src/afterstep/functions.c
Information about Xinerama screens should be already present in 
Scr.xinerama_screens_num and Scr.xinerama_screens - basically just an array 
of reactangles - one for each screen. You should find one that corresponds to 
frame_x, frame_y, frame_width, frame_height of the window and then use it as 
maximize area instead of MyDisplayWidth/MyDisplayHeight.

For better results checkout the most recent code from CVS :
cvs -d :pserver:anonymous@cvs.afterstep.org:/home/cvsroot co afterstep-stable

Send me a unified diff when you done : 
diff -Nur afterstep-old afterstep-new
should be sufficient.


Good luck 
Sasha.
_______________________________________________
The AfterStep Window Manager for X User's Mailing List
http://mail.afterstep.org/mailman/listinfo/as-users