Re: [PATCH/RFC] Xinerama

2021-11-22 Thread Dominik Vogt
On Tue, Nov 23, 2021 at 01:44:52AM +0100, Dominik Vogt wrote:
>   Menu foomenu monitor c c
>
> Should place the menu in the middle of the current monitor.

Or

   Menu foomenu c-20 c+30

should place it 20% of the monitor size left from the center and
30% below the center.

Ciao

Dominik ^_^  ^_^

--

Dominik Vogt



Re: [PATCH/RFC] Xinerama

2021-11-22 Thread Dominik Vogt
On Mon, Nov 22, 2021 at 11:52:38PM +, Thomas Adam wrote:
> On Tue, Nov 23, 2021 at 12:31:15AM +0100, Dominik Vogt wrote:
> > The old manmage said:
> >
> >   XineramaRoot
> >
> >   the root window of the whole Xinerama screen.  Equivalent to
> >   "root" when Xinerama is not used.
> >
> > Can you please restate that for me?  What is "whole Xinerama
> > screen" in xrandr terms?
>
> >From a quick scan of the code in menus.c where xineramaroot is being used,
> it's not entirely clear to me,

In the past it referenced the current Xinerama screen, not the
whole root window.  When a menu is placed the code needs a
reference rectangle to calculate the menu position.  It can be
relative to the pointer, to a window, to the root window, to a
monitor etc.

> but if this option is meant to do what I think
> it is, then this would be taking the width/height of the monitor the
> pointer/window is on, rather than referencing the width/height of the entire
> root window.

That would be correct.

Renamed it to "monitor" and "fMonitorContext".  There's only one
place in the code that evaluates the flag, and that looks fishy.
Can you test it?

  Menu foomenu monitor c c

Should place the menu in the middle of the current monitor.

The code is on the dv/devel branch (you may not want the top
commit on that branch).

Ciao

Dominik ^_^  ^_^

--

Dominik Vogt



Re: [PATCH/RFC] Xinerama

2021-11-22 Thread Thomas Adam
On Tue, Nov 23, 2021 at 12:31:15AM +0100, Dominik Vogt wrote:
> The old manmage said:
> 
>   XineramaRoot
> 
>   the root window of the whole Xinerama screen.  Equivalent to
>   "root" when Xinerama is not used.
> 
> Can you please restate that for me?  What is "whole Xinerama
> screen" in xrandr terms?

>From a quick scan of the code in menus.c where xineramaroot is being used,
it's not entirely clear to me, but if this option is meant to do what I think
it is, then this would be taking the width/height of the monitor the
pointer/window is on, rather than referencing the width/height of the entire
root window.

Kindly,
Thomas



Re: [PATCH/RFC] Xinerama

2021-11-22 Thread Dominik Vogt
On Mon, Nov 22, 2021 at 10:46:20PM +, Thomas Adam wrote:
> On Mon, Nov 22, 2021 at 11:26:53PM +0100, Dominik Vogt wrote:
> > On Sun, Nov 21, 2021 at 12:39:07AM +0100, Dominik Vogt wrote:
> > > Patch attached.  Can you please double check and fill in the gaps?
> > > (see comments belo).
> > >
> > > > > ./fvwm/menus.c:   fXineramaRoot = False;
> > > > > ./fvwm/menus.c:   else if (StrEquals(tok,"xineramaroot"))
> > >
> > >
> > > Not sure what the right name of the option and the flag variable
> > > should be.  There's only a placeholder in the man page either.
>
> Making that change would be syntactically breaking people's configs, but... I
> bet it's a rarely-used option that should just be "screenroot" or something.

It can have two names, a real one and still "xineramaroot" for
compatibility.  Screenroot?  Rootscreen?  Just tell me a good
name.

The old manmage said:

  XineramaRoot

  the root window of the whole Xinerama screen.  Equivalent to
  "root" when Xinerama is not used.

Can you please restate that for me?  What is "whole Xinerama
screen" in xrandr terms?

> > > > > ./perllib/FVWM/Commands.pm:   descr => q{Move a window to 
> > > > > another Xinerama screen},
> > >
> > > [MOVE_TO_SCREEN]
> > > This one should be just renamed to just "screen"?
>
> Yes please.

Good.  It's already part of the patch.

Ciao

Dominik ^_^  ^_^

--

Dominik Vogt



Re: [PATCH/RFC] Xinerama

2021-11-22 Thread Thomas Adam
On Mon, Nov 22, 2021 at 11:26:53PM +0100, Dominik Vogt wrote:
> On Sun, Nov 21, 2021 at 12:39:07AM +0100, Dominik Vogt wrote:
> > Patch attached.  Can you please double check and fill in the gaps?
> > (see comments belo).
> >
> > > > ./fvwm/menus.c: fXineramaRoot = False;
> > > > ./fvwm/menus.c:   else if (StrEquals(tok,"xineramaroot"))
> >
> >
> > Not sure what the right name of the option and the flag variable
> > should be.  There's only a placeholder in the man page either.

Making that change would be syntactically breaking people's configs, but... I
bet it's a rarely-used option that should just be "screenroot" or something.

> > > > ./perllib/FVWM/Commands.pm: descr => q{Move a window to 
> > > > another Xinerama screen},
> >
> > [MOVE_TO_SCREEN]
> > This one should be just renamed to just "screen"?

Yes please.

> Ping.

Sorry, I didn't spot this earlier.

Kindly,
Thomas



Re: [PATCH/RFC] Xinerama

2021-11-22 Thread Dominik Vogt
On Sun, Nov 21, 2021 at 12:39:07AM +0100, Dominik Vogt wrote:
> Patch attached.  Can you please double check and fill in the gaps?
> (see comments belo).
>
> > > ./fvwm/menus.c:   fXineramaRoot = False;
> > > ./fvwm/menus.c:   else if (StrEquals(tok,"xineramaroot"))
>
>
> Not sure what the right name of the option and the flag variable
> should be.  There's only a placeholder in the man page either.
>
> > > ./perllib/FVWM/Commands.pm:   descr => q{Move a window to 
> > > another Xinerama screen},
>
> [MOVE_TO_SCREEN]
> This one should be just renamed to just "screen"?

Ping.

Ciao

Dominik ^_^  ^_^

--

Dominik Vogt