Re: Improving the default config

2016-12-31 Thread Jaimos Skriletz
On Sat, Dec 31, 2016 at 8:31 AM, Dominik Vogt  wrote:
> On Sat, Dec 31, 2016 at 04:18:26PM +0100, Dominik Vogt wrote:
>> See branch dv/devel for various patches.
>
> (Feel free to use any of these patches to build a new patch.)
>

Thanks. I incorporated some of your suggestions.

I have hopefully made fvwm-menu-desktop error out nicer when either
python-xdg or a .menu file is not found.

In additions I have grouped some of your config changes (and some I
had in mind) into a single patch on js/default-config-changes.

Hopefully the commits explain enough, if you have any questions please ask.

happy new year.

jaimos



[fvwmorg/fvwm] 5318ac: Default Config Changes

2016-12-31 Thread somiaj
  Branch: refs/heads/js/default-config-changes
  Home:   https://github.com/fvwmorg/fvwm
  Commit: 5318ac96aea33b6638399655abe48dcb4d023f99
  
https://github.com/fvwmorg/fvwm/commit/5318ac96aea33b6638399655abe48dcb4d023f99
  Author: somiaj 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/FvwmScript-ConfirmCopyConfig
M default-config/config

  Log Message:
  ---
  Default Config Changes

  * Modified FvwmScript-ConfirmCopyConfig to state config file
destination (not just directory).
  * Improved/simplified Function Handling mostly around Mouse Bindings.
  * Simplified IconManClick function
  * Updated SendTo menu so it can send to any desk, page or the
current desk/page.
  * No longer use Decor.
  * Added hotkey's to MenuFvwmRoot
  * Updated FvwmIconMan's configuration. Iconfied windows
now shown with grey text.
  * Changed placement policy to MinOverlapPlacement
  * Removed some settings such as XorValue and HideGeometryWindow
  * Add delete to double click action on Menu button.




[fvwmorg/fvwm] 2ef5b7: Improve fvwm-menu-desktop error handling.

2016-12-31 Thread somiaj
  Branch: refs/heads/js/fvwm-menu-desktop
  Home:   https://github.com/fvwmorg/fvwm
  Commit: 2ef5b73e631fba1fa9f8fac24082287768aac042
  
https://github.com/fvwmorg/fvwm/commit/2ef5b73e631fba1fa9f8fac24082287768aac042
  Author: somiaj 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M bin/fvwm-menu-desktop.1.in
M bin/fvwm-menu-desktop.in
M default-config/config

  Log Message:
  ---
  Improve fvwm-menu-desktop error handling.

  * Checks if $FVWM_USERDIR is defined.
  * Errors out nicer if python-xdg is not installed.
  * New option --menu-error|-e that will output the python-xdg
not found error or no menus found error to the generated menu.
For use in default-config.
  * Add -e to default-config.
  * --verbose now informs the user when defaults are loaded from
the config file.




Re: Bug#802604: fvwm: focus is not given to the window when changing page with invisible mouse pointer

2016-12-31 Thread Jaimos Skriletz
On Sat, Dec 31, 2016 at 4:11 AM, Dominik Vogt  wrote:
> On Fri, Dec 30, 2016 at 09:12:50PM -0700, Jaimos Skriletz wrote:
>> On Fri, Dec 30, 2016 at 8:49 PM, Dominik Vogt  wrote:
>> > On Fri, Dec 30, 2016 at 08:24:07PM -0700, Jaimos Skriletz wrote:
>> >> Hello,
>> >>
>> >> This was reported by a Debian user. Please retain the CC to
>> >> 802604-forwar...@bugs.debian.org in your response, so that
>> >> the Debian BTS has a record.
>> >>
>> >> In short if the mouse cursor is over the root window and hidden with
>> >> unclutter, when switching pages (and maybe desks), focus is not given
>> >> to the window under the pointer.
>> >
>> > Works fine for me.  I'd need a precise description + config file
>> > to test this.
>> >
>>
>> Using SloppyFocus with a 2x2 grid of pages with the default config and
>> the following two key bindings
>>
>> Key Right A CM Scroll 100 0
>> Key Left A CM Scroll -100 0
>>
>> I then run unclutter to hide the mouse after being idle for a second:
>>
>> unclutter -idle 1 -root
>>
>> I move the mouse over the root window and wait for it to be hidden.
>> Once it is hidden
>> I use the key binding to switch to a new page. After I switch to the
>> page focus is kept
>> on the window in the old page and is not transferred.
>
> Still does not happen for me.  With unclutter 8-18 (Debian):
>
>  * Start fvwm with default config.
>  * Open two Xterms from the menu (left side of screen).
>  * Open FvwmConsole and move it to the bottom right corner.
>  * Type
>  style * sloppyfocus
>  Key Right A CM Scroll 100 0
>  Key Left A CM Scroll -100 0
>in FvwmConsole.
>  * Run "unclutter -idle 1 -root" from one of the Xterms.
>  * Press ctrl-alt-right to switch to page (1 0).
>  * (Optional: open an Xterm there and close it to take away the
>focus from any window on (0 0).)
>  * Move the pointer roughly to the middle of the FvwmConsole
>window.

Just double checking but I don't see a step,

* Wait for unclutter to hide the mouse cursor.

>  * Press ctrl-alt-left to switch to page (0 0).
>  => The pointer ends up over FvwmConsole which gets the focus.
>

jaimos



Re: Improving the default config

2016-12-31 Thread Dominik Vogt
On Sat, Dec 31, 2016 at 04:18:26PM +0100, Dominik Vogt wrote:
> See branch dv/devel for various patches.

(Feel free to use any of these patches to build a new patch.)

> ...

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: Improving the default config

2016-12-31 Thread Dominik Vogt
See branch dv/devel for various patches.


On Sat, Dec 31, 2016 at 07:26:54AM -0700, Jaimos Skriletz wrote:
> On Sat, Dec 31, 2016 at 6:03 AM, Dominik Vogt  wrote:
> > 1. In the log there is
> >
> > Traceback (most recent call last):
> >   File "/home/luthien/bin/fvwm-menu-desktop", line 78, in 
> > import xdg.Menu
> > ImportError: No module named xdg.Menu
> >
> >We should get rid of any error messages during startup, even if
> >some things may not be installed.
> >
> > 1b. In the builtin menu (if no config is used), the above message
> >is generated every time you move the pointer over the xdg menu
> >item.
> >
> 
> Yes we should deal with the case either python or python-xdg is not
> installed. Unsure if there is a way we can test for python-xdg with
> Test or if that should be done in the fvwm-menu-desktop script. I
> would like the script to error out if run from a console and
> python-xdg is not installed so the user is aware of a missing
> component, so maybe add a -q/--quiet option that can be used in the
> config to just have it quietly exit if python-xdg is not installed.
> 
> > 2. Are the buttons of inactive windows really meant to look like
> >in the attached image?  NeverFocus windows like Xclock don't
> >ever get their buttons drawn properly.
> >
> 
> Yes that is how the config draws inactive buttons. This can be
> changed, I just copied this from my setup.
> 
> > 3. The main menu has a submenu for module manpages, but not a
> >submenu to start them.  Weird.
> >
> 
> This was brought up and is something that could be added. Though
> outside of FvwmConsole I personally don't know what other modules
> would be that useful to have in a menu to be launched, without some
> additional configurations of the module. But by all means add a
> submenu.
> 
> > 4. The "Copy config" dialog should *really* state the filename of
> >the config file it generates, not just the target directory.
> >
> 
> Okay.
> 
> > 5. Double clicking the top left window button does not close the
> >window.  The menu needs a doubleclick action:
> >
> > Mouse 1 1 A Menu MenuWindowOps delete
> >
> >(or maybe "destroy" instead).
> >
> 
> I would not think that double clicking the menu button would close a
> window. But this could be added, though I don't see why since this can
> be done via the X button.

It's a historical thing.  Double clicking that button close
windows long before the X button even appeared.

See dv/devel.

> > 6. Clicking the "X" button works only with a delay.
> >
> 
> It is set up for a single click is Close and a double click is
> Destroy. So the delay is just the function waiting for ClickTime to
> pass to make sure it wasn't a double click.

I know, but it's annoying.  Shouldn't that button just bind
"Delete" on a click?  More forceful methods of closing are
available through the window menu.

The first patch on the branch is an attempt to close the window
earlier, but it doesn't actually work as we have to wait for the
end of the function anyway.

> > 7. The config uses button 4+5 for window shading.  It shouldn't
> >require any non-standard mouse buttons for that.
> >
> >  Mouse 4TA MoveClickX Nop Raise "WindowShade True"
> >  Mouse 5TA MoveClickX Nop Raise "WindowShade False"
> >
> >Also, this should really be just
> >
> >  Mouse 4TA WindowShade True
> >  Mouse 5TA WindowShade False
> >
> >Otherwise it may or may not raise the window when pushing a
> >mouse wheel, depending on the speed of the wheel.
> 
> Fine, again just another thing adopted because I prefer the double
> click here, but your solution is simpler.

See dv/devel.

> > 8. The MoveClickX function is used even for functions that do not
> >have a doubleclick action ("Nop" instead).  Therefore clicking
> >such a indow button works only with a delay (coubleclicktime),
> >and it won't work at all if you double click:
> >
> >  Mouse 1FS   A MoveClickX Resize Raise Nop

See dv/devel.

> > 9. Similarly, a button with "Nop" move action won't do anything if
> >you happen to move the mouse while clicking:
> >
> >  Mouse 4TA MoveClickX Nop Raise "WindowShade True"
> >
> 
> Didn't consider that as I'm just use to it, I was just trying to avoid
> writing multple functions, but I agree it would be better to not have
> the Nop there now that I look at it in a different light.

See dv/devel.

> > 10. Moving a window from the titlebar or icon should also raise
> > it:
> >
> >  Mouse 1TA MoveClickX Move Raise Maximize
> >  Mouse 1IA MoveClickX Move Nop Iconify
> >
> 
> Okay.

See dv/devel.

> > 11. The function
> >
> >> AddToFunc   IconManClick
> >> + I ThisWindow (Raised, !Shaded, !Iconic, CurrentPage) Iconify
> >> + I TestRc (Match) Break
> >> + I ThisWindow (!Raised) Raise
> >> + I ThisWindow (Shaded) WindowShade
> >> + I ThisWindow (Iconic) I

[fvwmorg/fvwm] 62f5b3: Add "J" function actions (late immediate).

2016-12-31 Thread Dominik Vogt
  Branch: refs/heads/dv/devel
  Home:   https://github.com/fvwmorg/fvwm
  Commit: 62f5b32919b871955115a34f342677189e7e02fd
  
https://github.com/fvwmorg/fvwm/commit/62f5b32919b871955115a34f342677189e7e02fd
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M doc/commands/AddToFunc.xml
M fvwm/functions.c

  Log Message:
  ---
  Add "J" function actions (late immediate).

This works like "I" but is executed later (once), when the user
starts interacting with the function, e.g. on the first button
release or if the pointer moves (and the function uses "M").  This
can be used to write an "escalating" close function that runs
on the first button release:

  AddToFunc CloseOrDestroy
  + J Close
  + D Destroy

Run "Close" immediately (but not right when the button is pressed)
and follow up with a Destroy in case of a double click.  Compared
to the normal "+ C Close" this avoids the double click delay
before the action is triggered.


  Commit: 281fd83f52fadd022b35f092637d8305a1983546
  
https://github.com/fvwmorg/fvwm/commit/281fd83f52fadd022b35f092637d8305a1983546
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config

  Log Message:
  ---
  default-config: 10. Raise when moving; raise icon on click.


  Commit: 0c20acbec592e4ff8ff8ffeb54d7248a484cd519
  
https://github.com/fvwmorg/fvwm/commit/0c20acbec592e4ff8ff8ffeb54d7248a484cd519
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config

  Log Message:
  ---
  default-config: 11. Simplify and clean up IconManClick.


  Commit: de5cb4cc8b364666abd871b7c43f48ec149e5d34
  
https://github.com/fvwmorg/fvwm/commit/de5cb4cc8b364666abd871b7c43f48ec149e5d34
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config

  Log Message:
  ---
  default-config: 11. Add MovetoDesk and MoveToPage to IconManClick.


  Commit: c5e319a11080f24eb2c9c3fbae6ee414aa1437de
  
https://github.com/fvwmorg/fvwm/commit/c5e319a11080f24eb2c9c3fbae6ee414aa1437de
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config

  Log Message:
  ---
  default-config: 13. Add SendToPage window menu entry.


  Commit: 78285378653745a6e69a4db62249c1f35f3ba941
  
https://github.com/fvwmorg/fvwm/commit/78285378653745a6e69a4db62249c1f35f3ba941
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config

  Log Message:
  ---
  default-config: 16. Disable all buttons in FvwmIconMan except 1 and 3.


  Commit: 27336aa813a2267e5ffe2b2c322682b2f98ae827
  
https://github.com/fvwmorg/fvwm/commit/27336aa813a2267e5ffe2b2c322682b2f98ae827
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config

  Log Message:
  ---
  default-config: 17. Use MinOverlapPlacement.


  Commit: 0ef28e586e11b0a2642f0765db8d2d308dd136bb
  
https://github.com/fvwmorg/fvwm/commit/0ef28e586e11b0a2642f0765db8d2d308dd136bb
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config

  Log Message:
  ---
  default-config: 18. Don't use decors.


  Commit: a42fbd25d4feac7cc7160c0bb32a4527c04be3ed
  
https://github.com/fvwmorg/fvwm/commit/a42fbd25d4feac7cc7160c0bb32a4527c04be3ed
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config

  Log Message:
  ---
  default-config: 19.-21. Cleanup some commands.


  Commit: 18f56300153c67e5a90b9b5b1a79fb5ae03ce57e
  
https://github.com/fvwmorg/fvwm/commit/18f56300153c67e5a90b9b5b1a79fb5ae03ce57e
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config
A modules/FvwmCommandS/FvwmCommandS

  Log Message:
  ---
  default-config: 8. Make functions more responsive.

Use function variants without move or doubleclick actions.


  Commit: 425759eb4d2b1bbfda88d38af658488320bd09fd
  
https://github.com/fvwmorg/fvwm/commit/425759eb4d2b1bbfda88d38af658488320bd09fd
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config

  Log Message:
  ---
  default-config: 7. Simplify WindowShade with mouse wheel.


  Commit: 5c75103c12244d4b6421c152d6584163e73edbe1
  
https://github.com/fvwmorg/fvwm/commit/5c75103c12244d4b6421c152d6584163e73edbe1
  Author: Dominik Vogt 
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
M default-config/config

  Log Message:
  ---
  default-config: 5. Delete window on double clicking button 1.


Compare: https://github.com/fvwmorg/fvwm/compare/359820be6d7b...5c75103c1224


Re: Improving the default config

2016-12-31 Thread Jaimos Skriletz
On Sat, Dec 31, 2016 at 6:03 AM, Dominik Vogt  wrote:
> Fiddling with the fdefault config to reproduce a bug, there are
> some things that I don't understand or that should be improved.
>

Thank you.

> 1. In the log there is
>
> Traceback (most recent call last):
>   File "/home/luthien/bin/fvwm-menu-desktop", line 78, in 
> import xdg.Menu
> ImportError: No module named xdg.Menu
>
>We should get rid of any error messages during startup, even if
>some things may not be installed.
>
> 1b. In the builtin menu (if no config is used), the above message
>is generated every time you move the pointer over the xdg menu
>item.
>

Yes we should deal with the case either python or python-xdg is not
installed. Unsure if there is a way we can test for python-xdg with
Test or if that should be done in the fvwm-menu-desktop script. I
would like the script to error out if run from a console and
python-xdg is not installed so the user is aware of a missing
component, so maybe add a -q/--quiet option that can be used in the
config to just have it quietly exit if python-xdg is not installed.

> 2. Are the buttons of inactive windows really meant to look like
>in the attached image?  NeverFocus windows like Xclock don't
>ever get their buttons drawn properly.
>

Yes that is how the config draws inactive buttons. This can be
changed, I just copied this from my setup.

> 3. The main menu has a submenu for module manpages, but not a
>submenu to start them.  Weird.
>

This was brought up and is something that could be added. Though
outside of FvwmConsole I personally don't know what other modules
would be that useful to have in a menu to be launched, without some
additional configurations of the module. But by all means add a
submenu.

> 4. The "Copy config" dialog should *really* state the filename of
>the config file it generates, not just the target directory.
>

Okay.

> 5. Double clicking the top left window button does not close the
>window.  The menu needs a doubleclick action:
>
> Mouse 1 1 A Menu MenuWindowOps delete
>
>(or maybe "destroy" instead).
>

I would not think that double clicking the menu button would close a
window. But this could be added, though I don't see why since this can
be done via the X button.

> 6. Clicking the "X" button works only with a delay.
>

It is set up for a single click is Close and a double click is
Destroy. So the delay is just the function waiting for ClickTime to
pass to make sure it wasn't a double click.

> 7. The config uses button 4+5 for window shading.  It shouldn't
>require any non-standard mouse buttons for that.
>
>  Mouse 4TA MoveClickX Nop Raise "WindowShade True"
>  Mouse 5TA MoveClickX Nop Raise "WindowShade False"
>
>Also, this should really be just
>
>  Mouse 4TA WindowShade True
>  Mouse 5TA WindowShade False
>
>Otherwise it may or may not raise the window when pushing a
>mouse wheel, depending on the speed of the wheel.

Fine, again just another thing adopted because I prefer the double
click here, but your solution is simpler.

>
> 8. The MoveClickX function is used even for functions that do not
>have a doubleclick action ("Nop" instead).  Therefore clicking
>such a indow button works only with a delay (coubleclicktime),
>and it won't work at all if you double click:
>
>  Mouse 1FS   A MoveClickX Resize Raise Nop
>
> 9. Similarly, a button with "Nop" move action won't do anything if
>you happen to move the mouse while clicking:
>
>  Mouse 4TA MoveClickX Nop Raise "WindowShade True"
>

Didn't consider that as I'm just use to it, I was just trying to avoid
writing multple functions, but I agree it would be better to not have
the Nop there now that I look at it in a different light.

> 10. Moving a window from the titlebar or icon should also raise
> it:
>
>  Mouse 1TA MoveClickX Move Raise Maximize
>  Mouse 1IA MoveClickX Move Nop Iconify
>

Okay.

> 11. The function
>
>> AddToFunc   IconManClick
>> + I ThisWindow (Raised, !Shaded, !Iconic, CurrentPage) Iconify
>> + I TestRc (Match) Break
>> + I ThisWindow (!Raised) Raise
>> + I ThisWindow (Shaded) WindowShade
>> + I ThisWindow (Iconic) Iconify
>> + I ThisWindow (AcceptsFocus) FlipFocus
>
> Most conditions are not necessary:
>
>   AddToFunc   IconManClick
>   + I ThisWindow (Raised, !Shaded, !Iconic, CurrentPage) Iconify
>   + I TestRc (Match) Break
>   + I ThisWindow WindowShade off
>   + I ThisWindow Iconify off
>   + I ThisWindow Raise
>   + I ThisWindow (AcceptsFocus) FlipFocus
>
> (Also reordered to reduce the number of expose events.)
>

Okay, can update this.

> This should also add
>
>   + I MoveToPage
>   + I MoveToDesk
>
> (or GotoDesk/GotoPage to the window's desk and page).
>

Why? In my tests FlipFocus moves you to the Desk/Page the win

Re: Bug#802604: fvwm: focus is not given to the window when changing page with invisible mouse pointer

2016-12-31 Thread Jaimos Skriletz
On Sat, Dec 31, 2016 at 6:11 AM, Dominik Vogt  wrote:
> On Sat, Dec 31, 2016 at 05:37:45AM -0700, Jaimos Skriletz wrote:
>> On Sat, Dec 31, 2016 at 4:11 AM, Dominik Vogt  wrote:
>> > On Fri, Dec 30, 2016 at 09:12:50PM -0700, Jaimos Skriletz wrote:
>> >> On Fri, Dec 30, 2016 at 8:49 PM, Dominik Vogt  wrote:
>> >> > On Fri, Dec 30, 2016 at 08:24:07PM -0700, Jaimos Skriletz wrote:
>> >> >> Hello,
>> >> >>
>> >> >> This was reported by a Debian user. Please retain the CC to
>> >> >> 802604-forwar...@bugs.debian.org in your response, so that
>> >> >> the Debian BTS has a record.
>> >> >>
>> >> >> In short if the mouse cursor is over the root window and hidden with
>> >> >> unclutter, when switching pages (and maybe desks), focus is not given
>> >> >> to the window under the pointer.
>> >> >
>> >> > Works fine for me.  I'd need a precise description + config file
>> >> > to test this.
>> >> >
>> >>
>> >> Using SloppyFocus with a 2x2 grid of pages with the default config and
>> >> the following two key bindings
>> >>
>> >> Key Right A CM Scroll 100 0
>> >> Key Left A CM Scroll -100 0
>> >>
>> >> I then run unclutter to hide the mouse after being idle for a second:
>> >>
>> >> unclutter -idle 1 -root
>> >>
>> >> I move the mouse over the root window and wait for it to be hidden.
>> >> Once it is hidden
>> >> I use the key binding to switch to a new page. After I switch to the
>> >> page focus is kept
>> >> on the window in the old page and is not transferred.
>> >
>> > Still does not happen for me.  With unclutter 8-18 (Debian):
>> >
>> >  * Start fvwm with default config.
>> >  * Open two Xterms from the menu (left side of screen).
>> >  * Open FvwmConsole and move it to the bottom right corner.
>> >  * Type
>> >  style * sloppyfocus
>> >  Key Right A CM Scroll 100 0
>> >  Key Left A CM Scroll -100 0
>> >in FvwmConsole.
>> >  * Run "unclutter -idle 1 -root" from one of the Xterms.
>> >  * Press ctrl-alt-right to switch to page (1 0).
>> >  * (Optional: open an Xterm there and close it to take away the
>> >focus from any window on (0 0).)
>> >  * Move the pointer roughly to the middle of the FvwmConsole
>> >window.
>> >  * Press ctrl-alt-left to switch to page (0 0).
>> >  => The pointer ends up over FvwmConsole which gets the focus.
>> >
>>
>> These steps work for me.
>
> "Work" = "the window does not get focus"?
>

Yes work, as in reproduces the issue.

>> I tried with various versions of the optional
>> step, though in my tests I left the xterm around, but this did not
>> seem to matter, Leaving the xterm or not did not change the result.
>
> Neither for me.
>
>> Unsure how else to describe it as those steps cause this to happen,
>> just tested again in a VM and have attached screen shots to show how
>> the focus is right before and right after I switch pages. In the
>> before picture the mouse is in the bottom right corner over the root
>> window near the panel (but not over it) and unclutter has hidden the
>> mouse.
>>
>> Only other thing I note, as soon as I move the mouse, focus is then
>> given to the window under the mouse, but until then it remains on the
>> window on the previous page.
>
> You probably have a different version of unclutter.  In the past,
> there was some change of the method it uses to hide the pointer.
> his may well play a role here.  Can you find out which version you
> have?  I guess it's something that should be fixed in unclutter if
> it's still an issue with the latest version.
>

Using the version from Debian stretch, 8-20.

I downgraded to the wheezy version, 8-18 that you reported to use, and
no longer can reproduce this bug. So it is something with a change in
unclutter. I will reassign the bug to unclutter.

Thanks for the help.

jaimos



Improving the default config

2016-12-31 Thread Dominik Vogt
Fiddling with the fdefault config to reproduce a bug, there are
some things that I don't understand or that should be improved.

1. In the log there is

Traceback (most recent call last):
  File "/home/luthien/bin/fvwm-menu-desktop", line 78, in 
import xdg.Menu
ImportError: No module named xdg.Menu

   We should get rid of any error messages during startup, even if
   some things may not be installed.

1b. In the builtin menu (if no config is used), the above message
   is generated every time you move the pointer over the xdg menu
   item.

2. Are the buttons of inactive windows really meant to look like
   in the attached image?  NeverFocus windows like Xclock don't
   ever get their buttons drawn properly.

3. The main menu has a submenu for module manpages, but not a
   submenu to start them.  Weird.

4. The "Copy config" dialog should *really* state the filename of
   the config file it generates, not just the target directory.

5. Double clicking the top left window button does not close the
   window.  The menu needs a doubleclick action:

Mouse 1 1 A Menu MenuWindowOps delete

   (or maybe "destroy" instead).

6. Clicking the "X" button works only with a delay.

7. The config uses button 4+5 for window shading.  It shouldn't
   require any non-standard mouse buttons for that.

 Mouse 4TA MoveClickX Nop Raise "WindowShade True"
 Mouse 5TA MoveClickX Nop Raise "WindowShade False"

   Also, this should really be just

 Mouse 4TA WindowShade True
 Mouse 5TA WindowShade False

   Otherwise it may or may not raise the window when pushing a
   mouse wheel, depending on the speed of the wheel.

8. The MoveClickX function is used even for functions that do not
   have a doubleclick action ("Nop" instead).  Therefore clicking
   such a indow button works only with a delay (coubleclicktime),
   and it won't work at all if you double click:

 Mouse 1FS   A MoveClickX Resize Raise Nop

9. Similarly, a button with "Nop" move action won't do anything if
   you happen to move the mouse while clicking:

 Mouse 4TA MoveClickX Nop Raise "WindowShade True"

10. Moving a window from the titlebar or icon should also raise
it:

 Mouse 1TA MoveClickX Move Raise Maximize
 Mouse 1IA MoveClickX Move Nop Iconify

11. The function

> AddToFunc   IconManClick
> + I ThisWindow (Raised, !Shaded, !Iconic, CurrentPage) Iconify
> + I TestRc (Match) Break
> + I ThisWindow (!Raised) Raise
> + I ThisWindow (Shaded) WindowShade
> + I ThisWindow (Iconic) Iconify
> + I ThisWindow (AcceptsFocus) FlipFocus

Most conditions are not necessary:

  AddToFunc   IconManClick
  + I ThisWindow (Raised, !Shaded, !Iconic, CurrentPage) Iconify
  + I TestRc (Match) Break
  + I ThisWindow WindowShade off
  + I ThisWindow Iconify off
  + I ThisWindow Raise
  + I ThisWindow (AcceptsFocus) FlipFocus

(Also reordered to reduce the number of expose events.)

This should also add

  + I MoveToPage
  + I MoveToDesk

(or GotoDesk/GotoPage to the window's desk and page).

12. Shouldn't the icon manager show an indication of whether a
window is hidden or not?

13. The window menu should have a SendToPage button too.

14. Raising windows issue with FvwmButttons:

* Move some window partially over the panel, then
* Click on its button in the icon manager.
   => The panel is raised, hiding the window, then the window
  is raised over the panel.  Looks weird.

15. Not sure why, but if you press a button in the icon manager
and hold it for some time, releasing it does not activate the
window.

16. That just wastes resources for nothing:

  *FvwmIconMan: Action Mouse 2 A sendcommand Nop

17. Fvwm can *really* do better than "TileCascadePlacement".  I
suggest to use MinOverlapPlacement.

18. Just do that without decors:

 DestroyDecor FvwmDecor
 AddToDecor   FvwmDecor
 ...
 Style * BorderWidth 5, HandleWidth 5, MWMButtons, \
FvwmBorder, FirmBorder, UseDecor FvwmDecor

19. This depends on undefined behaviour and might as well disable
opaque moves completely:

 OpaqueMoveSize -1

Instead, use

 OpaqueMoveSize unlimited

20. This is never used anyway, since moving and resizing is always
in opaque mode:

 XorValue 5

21. Why?

 HideGeometryWindow

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt


Re: Bug#802604: fvwm: focus is not given to the window when changing page with invisible mouse pointer

2016-12-31 Thread Dominik Vogt
On Sat, Dec 31, 2016 at 05:37:45AM -0700, Jaimos Skriletz wrote:
> On Sat, Dec 31, 2016 at 4:11 AM, Dominik Vogt  wrote:
> > On Fri, Dec 30, 2016 at 09:12:50PM -0700, Jaimos Skriletz wrote:
> >> On Fri, Dec 30, 2016 at 8:49 PM, Dominik Vogt  wrote:
> >> > On Fri, Dec 30, 2016 at 08:24:07PM -0700, Jaimos Skriletz wrote:
> >> >> Hello,
> >> >>
> >> >> This was reported by a Debian user. Please retain the CC to
> >> >> 802604-forwar...@bugs.debian.org in your response, so that
> >> >> the Debian BTS has a record.
> >> >>
> >> >> In short if the mouse cursor is over the root window and hidden with
> >> >> unclutter, when switching pages (and maybe desks), focus is not given
> >> >> to the window under the pointer.
> >> >
> >> > Works fine for me.  I'd need a precise description + config file
> >> > to test this.
> >> >
> >>
> >> Using SloppyFocus with a 2x2 grid of pages with the default config and
> >> the following two key bindings
> >>
> >> Key Right A CM Scroll 100 0
> >> Key Left A CM Scroll -100 0
> >>
> >> I then run unclutter to hide the mouse after being idle for a second:
> >>
> >> unclutter -idle 1 -root
> >>
> >> I move the mouse over the root window and wait for it to be hidden.
> >> Once it is hidden
> >> I use the key binding to switch to a new page. After I switch to the
> >> page focus is kept
> >> on the window in the old page and is not transferred.
> >
> > Still does not happen for me.  With unclutter 8-18 (Debian):
> >
> >  * Start fvwm with default config.
> >  * Open two Xterms from the menu (left side of screen).
> >  * Open FvwmConsole and move it to the bottom right corner.
> >  * Type
> >  style * sloppyfocus
> >  Key Right A CM Scroll 100 0
> >  Key Left A CM Scroll -100 0
> >in FvwmConsole.
> >  * Run "unclutter -idle 1 -root" from one of the Xterms.
> >  * Press ctrl-alt-right to switch to page (1 0).
> >  * (Optional: open an Xterm there and close it to take away the
> >focus from any window on (0 0).)
> >  * Move the pointer roughly to the middle of the FvwmConsole
> >window.
> >  * Press ctrl-alt-left to switch to page (0 0).
> >  => The pointer ends up over FvwmConsole which gets the focus.
> >
> 
> These steps work for me.

"Work" = "the window does not get focus"?

> I tried with various versions of the optional
> step, though in my tests I left the xterm around, but this did not
> seem to matter, Leaving the xterm or not did not change the result.

Neither for me.

> Unsure how else to describe it as those steps cause this to happen,
> just tested again in a VM and have attached screen shots to show how
> the focus is right before and right after I switch pages. In the
> before picture the mouse is in the bottom right corner over the root
> window near the panel (but not over it) and unclutter has hidden the
> mouse.
> 
> Only other thing I note, as soon as I move the mouse, focus is then
> given to the window under the mouse, but until then it remains on the
> window on the previous page.

You probably have a different version of unclutter.  In the past,
there was some change of the method it uses to hide the pointer.
his may well play a role here.  Can you find out which version you
have?  I guess it's something that should be fixed in unclutter if
it's still an issue with the latest version.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: Bug#802604: fvwm: focus is not given to the window when changing page with invisible mouse pointer

2016-12-31 Thread Dominik Vogt
On Fri, Dec 30, 2016 at 09:12:50PM -0700, Jaimos Skriletz wrote:
> On Fri, Dec 30, 2016 at 8:49 PM, Dominik Vogt  wrote:
> > On Fri, Dec 30, 2016 at 08:24:07PM -0700, Jaimos Skriletz wrote:
> >> Hello,
> >>
> >> This was reported by a Debian user. Please retain the CC to
> >> 802604-forwar...@bugs.debian.org in your response, so that
> >> the Debian BTS has a record.
> >>
> >> In short if the mouse cursor is over the root window and hidden with
> >> unclutter, when switching pages (and maybe desks), focus is not given
> >> to the window under the pointer.
> >
> > Works fine for me.  I'd need a precise description + config file
> > to test this.
> >
> 
> Using SloppyFocus with a 2x2 grid of pages with the default config and
> the following two key bindings
> 
> Key Right A CM Scroll 100 0
> Key Left A CM Scroll -100 0
> 
> I then run unclutter to hide the mouse after being idle for a second:
> 
> unclutter -idle 1 -root
> 
> I move the mouse over the root window and wait for it to be hidden.
> Once it is hidden
> I use the key binding to switch to a new page. After I switch to the
> page focus is kept
> on the window in the old page and is not transferred.

Still does not happen for me.  With unclutter 8-18 (Debian):

 * Start fvwm with default config.
 * Open two Xterms from the menu (left side of screen).
 * Open FvwmConsole and move it to the bottom right corner.
 * Type
 style * sloppyfocus
 Key Right A CM Scroll 100 0
 Key Left A CM Scroll -100 0
   in FvwmConsole.
 * Run "unclutter -idle 1 -root" from one of the Xterms.
 * Press ctrl-alt-right to switch to page (1 0).
 * (Optional: open an Xterm there and close it to take away the
   focus from any window on (0 0).)
 * Move the pointer roughly to the middle of the FvwmConsole
   window.
 * Press ctrl-alt-left to switch to page (0 0).
 => The pointer ends up over FvwmConsole which gets the focus.

> Note: If the mouse is over a window (hidden or not) this does not
> happen and focus is transfered. If the mouse is visible over the root
> window this does not happen either. It needs to be hidden.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt