Re: : FVWM: stick between screen

2009-04-07 Thread Cameron Simpson
On 15Mar2009 16:51, Jason Weber  wrote:
| Start with one empty unified screen, two side by side monitors using
| twinview (same card, different plugs).

I know this discussion is long dead, but I seem to recall from my
previous workplace that if you're using Twinview you're not using
Xinerama, because Twinview presents the two monitors as a single one to
the X server...

It may affect why things work at your employer and not at home.
-- 
Cameron Simpson  DoD#743



Re: FVWM: stick between screen

2009-03-16 Thread Dominik Vogt
On Mon, Mar 16, 2009 at 01:14:20AM +, Thomas Adam wrote:
> 2009/3/15 Jason Weber :
> > Start with one empty unified screen, two side by side monitors using
> > twinview (same card, different plugs).
> >
> > Instance a new window, say a xterm.
> >
> > Slide it left and right so that the left or right edge passes from
> > one monitor to the other.  I believe that the window edge is supposed to
> > snap with strong preference to keep the window on only one monitor.
> >
> > The only thing I know of that might be unusual is that my
> > monitors' horizontal resolutions are different.
> 
> Well as long as X reports things correctly then FVWM will honour that,
> so I think this a red-herring.  I'm not in a position to test this
> myself as I am sans Xinerama,

You can test Xinerama if you configure fvwm with
--enable-xinerame-emulation.


> but does the following patch do anything
> to help "fix" this?  I warn you it's complete theory on my part, so
> expect a quirk or fifty.  ;)
> 
> -- Thomas Adam
> 
> P.S.  Also Cc'ed fvwm-workers which is what you should have done from
> the outset.

> Index: fvwm/move_resize.c
> ===
> RCS file: /home/cvs/fvwm/fvwm/fvwm/move_resize.c,v
> retrieving revision 1.304
> diff -u -r1.304 move_resize.c
> --- fvwm/move_resize.c7 Dec 2007 18:52:21 -   1.304
> +++ fvwm/move_resize.c16 Mar 2009 01:11:21 -
> @@ -2076,8 +2076,23 @@
>   /* snap to screen egdes */
>   if ((fw->snap_mode & SNAP_SCREEN) && fw->snap_proximity > 0)
>   {
> + /* TA:  20090315:  Make sure windows being told to snap to a
> +  * screen; honour Xinerama screens separately -- and don't
> +  * treat the screen area as one huge screen.
> +  */
> + rectangle screen;
> + int screen_width;
> +
> + screen_width = Scr.MyDisplayWidth;
> +
> + /* Get the parameters for the screen */
> + FScreenGetScrRect(NULL, FSCREEN_CURRENT, &screen.x, &screen.y, 
> + &screen.width, &screen.height);
> + if (screen.width > 0)
> + screen_width = screen.width;
> +
>   /* horizontally */
> - if (!(Scr.MyDisplayWidth < (*px) ||
> + if (!(screen_width < (*px) ||
> (*px + self.width) < 0))
>   {
>   dist = abs(Scr.MyDisplayHeight - (*py + self.height));
> @@ -2119,23 +2134,23 @@
> (*py + self.height) < 0))
>   {
>   dist = abs(
> - Scr.MyDisplayWidth - (*px + self.width));
> + screen_width - (*px + self.width));
>   if (dist < closestRight)
>   {
>   closestRight = dist;
>  
> - if (*px + self.width >= Scr.MyDisplayWidth &&
> + if (*px + self.width >= screen_width &&
>   *px + self.width <
> - Scr.MyDisplayWidth + fw->snap_proximity)
> + screen_width + fw->snap_proximity)
>   {
> - nxl = Scr.MyDisplayWidth - self.width;
> + nxl = screen_width - self.width;
>   }
>  
>   if (*px + self.width >=
> - Scr.MyDisplayWidth - fw->snap_proximity &&
> - *px + self.width < Scr.MyDisplayWidth)
> + screen_width - fw->snap_proximity &&
> + *px + self.width < screen_width)
>   {
> - nxl = Scr.MyDisplayWidth - self.width;
> + nxl = screen_width - self.width;
>   }
>   }
>   dist = abs(*px);



Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: FVWM: stick between screen

2009-03-15 Thread Thomas Adam
2009/3/15  :
> This has been bugging me for a few weeks and I haven't figured
> out what happened or how to fix it.  It used to work until recently
> and it still works at my employer (on redhat) but not my current
> ubuntu at home.
>
> With
>
> Style "*"               SnapAttraction  12      SameType Screen
>
> I believe windows should stick to the line between
> my two monitors.  I can't imagine why you wouldn't want this

Can you provide instructions on how to reproduce this?  I am not
following what you mean by the last sentence above.

-- Thomas Adam