Fvwm Style For the windows

I currently use FPClickToFocus, FPClickDecorToFocus, FPClickIconToFocus, FPGrabFocusTrnsient for the window style. But the Problem is the Window loses Focus when mouse leave it and give the focus to the window it is in; So which Style(s) give the normal fill and look in this specific matter; like other WMs openbox, gnome … (i.e click in the window or on its titlebar; gives it focus and bring it on top)

Use [code]#-----------------------------------------------------------------------

The focus policy. Once you are used to clicking inside windows to

raise them you will not want to lose this feature.

#-----------------------------------------------------------------------
Style * ClickToFocus
Style * MouseFocusClickRaises[/code]
Btw. ‘FPGrabFocusTrnsient’ is misspelled -> ‘FPGrabFocusTransient’ :wink:

  • Thomas -

Your Suggestion only changes and brings window to the front but the Focus (the window that action happens in i.e i can type in) doesn’t change.
It means I change a window but my cursor is still in my geany and i am typing a web-site URL in geany while the firefox is in front and nothing happening in its addressbar For Example.

You have to comment the others out and restart Fvwm.

That what I have posted is my only Focus policy and it does what you want:

Would you post your config, please? Also, what version Fvwm you’re using? Thanks.

work in progress

[code]
#######################################
#1.> Defining Environment VariableS
##########
SetEnv fvwm_img $[FVWM_USERDIR]/images
SetEnv fvwm_icon $[FVWM_USERDIR]/icons
SetEnv fvwm_wallpapers $[FVWM_USERDIR]/wallpaper
SetEnv fvwm_script $./scripts

#1.a> Setting the default programs:

SetEnv fvwm_webbrowser /user/bin/opera-next
SetEnv fvwm_term /user/bin/lilyterm
SetEnv fvwm_media_player /usr/bin/mpv
SetEnv fvwm_video_player /usr/bin/mpv
##########
#2.> Setting The Imge Path
##########
ImagePath $[fvwm_icon]:$[fvwm_icon];.png:$[fvwm_icon];.svg:+
##########
#3.>Setting Virtual Desktops
##########
DesktopSize 6x1
DesktopName [I]
DesktopName [II]
DesktopName [III]
EdgeThickness 0
##########
#4.> Setting The Mouse and Focus Behaviour
##########
ClickTime 300
MoveThresshold 3
Style * ClickToFocus
Style * MouseFocusClickRaises

#4.a>Special key words for behaviour of default desktop

EwmhBaseStruts 3 3 3 35
#**
#Problem with Modifiers such as CAPS-LOCK SCROLL-LOCK …
IgnoreModifiers LS
#
*
##########
#5.> Setting Global Styles and Options
##########

##########
#6.> Setting Programs Styles
##########

##########
#7.> Setting Startup FUNCTIONS
##########
DestroyFunc StartFunction
AddToFunc StartFunction

  • I Module FvwmTaskBar
  • I Module FvwmPager 0 0
  • I Module FvwmButtons MyButtons
  • I Test (Init) Exec exec feh --bg-scale /home/avalon/.fvwm/wallpaper/bg.jpg
  • I Test (Init) Exec exec xset fp+ /usr/share/fonts/terminus
  • I Test (Init) Exec exec xrdb -merge ~/.Xresources

DestroyFunc InitFunction
AddToFunc InitFunction

  • I Test (Init) Exec exec roxterm[/code]

Ok, I have tested it and your right … the windows gets focus but not for cursor/keyboard. Only if you clicking on the buttons in the taskbar.
Here’s my changes for your config to enable this:

IgnoreModifiers L25
Style * MwmDecor, MWMFunctions, HintOverride, MinOverLapPlacement

[code]
##########
#8.> Other FUNCTIONS
##########
#-----------------------------------------------------------------------

Switching focus between windows with ALT-Tab and SHIFT-ALT-Tab

from the Russian Fvwm Wiki (http://www.linux.org.ru/wiki/en/FVWM)

#-----------------------------------------------------------------------
DestroyFunc FuncFvwmNextWindow
AddToFunc FuncFvwmNextWindow

  • I Next (CurrentPage, !Iconic, AcceptsFocus) FlipFocus NoWarp
  • I Current Raise

DestroyFunc FuncFvwmPrevWindow
AddToFunc FuncFvwmPrevWindow

  • I Prev (CurrentPage, !Iconic, AcceptsFocus) Focus NoWarp
  • I Current Raise

#-----------------------------------------------------------------------

This one moves and then raises the window if you drag the mouse,

only raises the window if you click, or maximize if you double click

and sets the focus to the clicked window

#-----------------------------------------------------------------------
DestroyFunc FuncMoveOrRaiseOrMaximize
AddToFunc FuncMoveOrRaiseOrMaximize

  • H Move
  • M Move
  • C Raise
  • D Maximize
  • I Focus

##########
#9.> Key bindings
##########

Keyname Context Modifi Function

#-----------------------------------------------------------------------

Switching focus between windows. (ALT-Tab)

#-----------------------------------------------------------------------
Key Tab A M FuncFvwmNextWindow
#-----------------------------------------------------------------------

Print screenshot for active window

#-----------------------------------------------------------------------
Key Print A M FuncWindowCreateScreenshot

##########
#10.> Mouse bindings
##########
#-----------------------------------------------------------------------

Button 1 in the titlebar, with any modifiers, gives

move <- drag, resize <- click or maximize <- double click and sets

the focus

#-----------------------------------------------------------------------

Button Context Modifi Function

Mouse 1 T A FuncMoveOrRaiseOrMaximize[/code]
Hope this helps.

  • Thomas -