[SOLVED] Raise windows when clicked

Hello,

I thought about going back to FVWM (FVWM-Buttons got my soul, as I learned after trying to live with Fluxbox and Windowmaker).
My configuration is more and more growing into the Thing I want it to have, but I just cant get my windows raised when I click into them (not only the frame or title).

Here is my actual .fvwm2rc:

[code]#Make Fvwm look where my pics are
ImagePath $[FVWM_USERDIR]/images/buttons:$[FVWM_USERDIR]/images/buttons;.png:$[FVWM_USERDIR]/images/icons:$[FVWM_USERDIR]/images/icons;.png:[FVWM_USERDIR]/images/mini:$[FVWM_USERDIR]/images/mini;.png::/usr/share/icons:/usr/share/pixmaps:/usr/share/icons/wm-icons:+

DeskTopSize 2x2

EdgeResistance -1
EdgeScroll 100 100
EdgeThickness 1
ClickTime 750
OpaqueMoveSize unlimited

ColormapFocus FollowsMouse

default Styles:

make sure these fonts exist on your system:

Style * Font “xft:Bitstream Vera Sans Mono:style=Roman:size=11”, BorderWidth 3, HandleWidth 3
Style * Color #f6f6f6/#111111, HilightBack black, HilightFore white
Style * MWMFunctions, MWMDecor, HintOverride, DecorateTransient, NoPPosition
Style * SmartPlacement, WindowShadeSteps 20, ResizeOpaque
Style * GrabFocusOff
Style * NoIconTitle
Style * Icon unknown1.xpm
Style * IconBox 0 0 -0 -0, IconGrid 1 1, IconSize 44 44, IconFill right bottom, StaysOnBottom, IconBackgroundRelief 1, IconTitleRelief 1, SetWMIconSize
#Style * TitleAtLeft
Style * SnapAttraction 12 Windows ScreenWindows
Style * SloppyFocus, ClickToFocusRaises, MouseFocusClickRaises
Style * FPClickRaisesFocused
Style * EdgeMoveDelay 350

Styles for various Fvwm modules:

Style Fvwm* NoTitle, Sticky, WindowListSkip
Style Fvwm* BorderWidth 2, CirculateSkipIcon, CirculateSkip
Style FvwmPager StaysOnTop
Style FvwmBanner StaysOnTop
Style FvwmButtons !Title, !Handles, !Borders, Sticky, WindowListSkip, CirculateSkip, BorderWidth 0, HandleWidth 0, ClickToFocus

Styles for various common programs:

Style lock NoTitle, NoHandles, Sticky, WindowListSkip, ClickToFocus
Style xbiff NoTitle, Sticky, WindowListSkip, ClickToFocus
Style xcalc Icon xcalc.xpm, NoButton 2,ClickToFocus
Style xmh Icon mail1.xpm, NoIconTitle,StickyIcon
Style xmh NoButton 2
Style xman Icon xman.xpm, ClickToFocus
Style xmag Icon mag_glass.xpm, ClickToFocus
Style xgraph Icon graphs.xpm, ClickToFocus
Style xmosaic Color Green/Yellow, ClickToFocus
Style libreoffice
NoFuncHint

Colorset 7 fg black, bg white, NoShape, RootTransparent Buffer, Tint #5a8ade 60
Colorset 8 fg black, bg white, NoShape, RootTransparent Buffer, Tint #f6f6f6 60

Absolutely clear, no tint

Colorset 0 fg white, bg #6b8eb5, fgsh black, RootTransparent Buffer, Tint

Bright for active window

Colorset 1 fg white, bg #6b8eb5, fgsh black, RootTransparent Buffer, Tint #6b8eb5 35

A little clearer for menus

Colorset 3 fg white, bg #6b8eb5, fgsh black, RootTransparent Buffer, Tint #6b8eb5 20

DestroyDecor DefaultDecor
AddToDecor DefaultDecor

  • BorderStyle Active Colorset 1
  • BorderStyle Inactive Colorset 0
  • BorderStyle – NoInset HiddenHandles
  • TitleStyle Active Colorset 1
  • TitleStyle Inactive Colorset 0
  • TitleStyle – flat
  • TitleStyle Centered
  • TitleStyle Height 16
  • ButtonStyle Reset
  • ButtonStyle All Pixmap empty.xpm
  • ButtonStyle All – flat UseTitleStyle
  • AddButtonStyle 1 Inactive pixmap grayglass_close.png
  • AddButtonStyle 2 Inactive pixmap grayglass_min.png
  • AddButtonStyle 4 Inactive pixmap grayglass_max.png
  • AddButtonStyle 1 Active pixmap grayglass_close.png
  • AddButtonStyle 2 Active pixmap grayglass_min.png
  • AddButtonStyle 4 Active pixmap grayglass_max.png
    Style * UseDecor DefaultDecor

MenuStyle * MenuColorset 3
MenuStyle * BorderWidth 2
MenuStyle * TrianglesSolid
MenuStyle * Font “Shadow=1 0 C:-adobe-helvetica-bold-r-normal–12-120-75-75-p-70-iso8859-1”
MenuStyle * SidePic images/buttons/Aqua-3drops.xpm

Style * IconTitleColorset 3
Style * HilightIconTitleColorset 1
Style * IconBackgroundColorset

Style * Colorset 0
Style * HilightColorset 1
Style * BorderWidth 4
Style * HandleWidth 6
Style * Font “Shadow=1 0 C:-adobe-helvetica-bold-r-normal–14-140-75-75-p-82-iso8859-1”
Style * FvwmBorder

*FvwmPager: Colorset * 0
*FvwmPager: HilightColorset * 1
Style “FvwmPager” Sticky, NoTitle, NoHandles, BorderWidth 2, HandleWidth 2, WindowListSkip

some simple default key bindings:

Key Next A SCM Next [] Focus
Key Prior A SCM Prev [
] Focus

some simple default mouse bindings:

for the root window:

Mouse 1 R A Menu MenuFvwmRoot Nop
Mouse 2 R A Menu MenuFvwmRoot Nop
Mouse 3 R A Menu MenuFvwmRoot Nop

for the title bar buttons:

Mouse 0 1 A Close
Mouse 0 2 A Iconify
Mouse 0 4 A Maximize 100 -48p

for other parts of the window/borders/icons:

Mouse 1 F A FuncFvwmResizeOrRaise
Mouse 1 TS A FuncFvwmMoveOrRaise
Mouse 1 I A Iconify
Mouse 2 I A Iconify
Mouse 2 FST A Menu MenuFvwmWindowOps2 Nop
Mouse 3 STIF A Iconify
Mouse 4 STF A WindowShade True
Mouse 5 STF A WindowShade False

######################## Initialization Functions ############################
AddToFunc StartFunction

  • I Module FvwmAnimate
  • I Module FvwmBanner
  • I Module FvwmButtons

AddToFunc InitFunction

  • I exec feh --bg-scale /home/helgi/Bilder/WallPaper/rain.jpg

For some SM-s (like gnome-session) there is an internal background setter.

AddToFunc SessionInitFunction

  • I Nop

######################## Sample Functions ##########################

DestroyFunc FuncFvwmMailXmh
AddToFunc FuncFvwmMailXmh

  • I Next [$0] Iconify false
  • I Next [$0] Focus
  • I None [$0] Exec $0 $1

DestroyFunc FuncFvwmMoveOrRaise
AddToFunc FuncFvwmMoveOrRaise

  • I Raise
  • M Move
  • D WindowShade

DestroyFunc FuncFvwmMaximize
AddToFunc FuncFvwmMaximize

  • M Maximize 0 100
  • H Maximize 0 100
  • C Maximize 0 80
  • D Maximize 100 100

DestroyFunc FuncFvwmMoveOrIconify
AddToFunc FuncFvwmMoveOrIconify

  • I Raise
  • M Move
  • D Iconify

DestroyFunc FuncFvwmResizeOrRaise
AddToFunc FuncFvwmResizeOrRaise

  • I Raise
  • M Resize
  • D Lower

DestroyFunc FuncIconify

  • I Raise
  • C Iconify

DestroyFunc FuncFvwmPrint
AddToFunc FuncFvwmPrint

  • I Raise
  • I Exec xdpr -id $w

DestroyFunc FuncFvwmPrintReverse
AddToFunc FuncFvwmPrintReverse

  • I Raise
  • I Exec xdpr 1/2 -h -rv -id $w

DestroyFunc FuncFvwmFocusPolicyChange
AddToFunc FuncFvwmFocusPolicyChange

  • I Style * $0
  • I Recapture

Read config files for modules:

#read ConfigFvwmBacker
read ConfigFvwmButtons
#read ConfigFvwmIconBox
#read ConfigFvwmIconMan
#read ConfigFvwmIdent
read ConfigFvwmPager
#read ConfigFvwmScroll
#read ConfigFvwmTaskBar
#read ConfigFvwmWinList

[/code]

I run FVWM 2.6.5 on Debian Jessie, the file is the original config provided by debian with some tinkering and copy and paste…
I’ve cut out the Debian menu stuff for its size (and its unrelated anyway…).

Thanks in advance,
Daniel

I can’t test it in the moment, but I suppose the click is ignored because it isn’t a “focus click”, since the window got the focus already by the mouse pointer movement only (SloppyFocus).
There are some more fine-grained Style options of the “FB…” type that should solve such problems. Try some of these:

Style * FPClickRaisesFocused,FPClickRaisesUnfocused
Style * FPClickDecorRaisesFocused,FPClickDecorRaisesUnfocused
Style * FPClickIconRaisesFocused,FPClickIconRaisesUnfocused
Style * FPPassRaiseClick,FPAllowRaiseClickFunction

They are more or less self-explaining, but you can also consult the man page.

Hth, Werner

@Werner: Thanks for the reply :wink:

I tried, just to see if it might work

Mouse 1 W	A	Raise

which works just fine, but I can’t use the mouse inside my window anymore, so I deleted it again.

After digging into the documentation my actual Style-section looks like this now:

[code]# default Styles:

make sure these fonts exist on your system:

Style * Font “xft:Bitstream Vera Sans Mono:style=Roman:size=11”, BorderWidth 3, HandleWidth 3
Style * Color #f6f6f6/#111111, HilightBack black, HilightFore white
Style * MWMFunctions, MWMDecor, HintOverride, DecorateTransient, NoPPosition
Style * SloppyFocus, MouseFocusClickRaises
Style * SmartPlacement, WindowShadeSteps 20, ResizeOpaque
Style * GrabFocusOff
Style * NoIconTitle
Style * Icon unknown1.xpm
Style * IconBox 0 0 -0 -0, IconGrid 1 1, IconSize 44 44, IconFill right bottom, StaysOnBottom, IconBackgroundRelief 1, IconTitleRelief 1, SetWMIconSize
#Style * TitleAtLeft
Style * SnapAttraction 12 Windows ScreenWindows
Style * FPEnterToFocus, FPClickRaisesFocused
Style * FPClickDecorRaisesFocused, FPPassRaiseClick
Style * FPAllowRaiseClickFunction[/code]

I tried of course with

#Style *           SloppyFocus, MouseFocusClickRaises

which just makes my windows unfocused as soon as the mouse leaves them (as expectet, but not wished), but I still can’t raise windows by clicking them.

If I read the manpage right MouseFocusClickRaises is an option specific to MouseFocus (which you aren’t using), I’m not quite sure why they’re there if there seems to be a more general replacement for them. Some accident of history perhaps?

I think you want (which, incidentally, is what I’m using :wink:):

Style * SloppyFocus, ClickToFocusRaises

Ok, right now it looks like this:

Style * SloppyFocus, ClickToFocusRaises Style * FPClickRaisesFocused Style * FPClickDecorRaisesFocused, FPPassRaiseClick

I tried

Style * SloppyFocus, ClickToFocusRaises #Style * FPClickRaisesFocused #Style * FPClickDecorRaisesFocused, FPPassRaiseClick

and I tried

#Style * SloppyFocus, ClickToFocusRaises Style * FPClickRaisesFocused Style * FPClickDecorRaisesFocused, FPPassRaiseClick

and my windows only rise when I click the Decor, but not on the window itself…
I’m gradually starting too feel a bit stupid :frowning:

You have forgotten Style * MouseFocusClickRaises

– Thomas –

Hmm, if I read the manpage right ClickToFocusRaises and MouseFocusClickRaises are supposed to be synonymous since 2.5.5.

I’ve been using SloppyFocus with ClickToFocusRaises for like a decade and it’s always worked for me with just those two options. So either I’m misunderstanding the problem or one of the other options is interfering with those two (note also that I’m using a vanilla 2.6.5 release).

Ouch … it helps if I can read … :confused: sorry, my fault …

I am using ClickToFocus and MouseFocusClickRaises and it works fine for me …

Haven’t known this :blush:

– Thomas –

I’ve updated the config (in my first post), thats the actual state which doesn’t work.
Any suggestions anyone?
I can get by raising windows only on decor, its just a bit annoying…

I’ve tested your config and the problem is Style * GrabFocusOff Remove it and you have the behaviour you want 8)

As theBlackDragon said

These are the only two you need.

Remove or commented out the following in your config[code]# Style * SloppyFocus, ClickToFocusRaises, MouseFocusClickRaises
Style * SloppyFocus, ClickToFocusRaises

Style * FPClickRaisesFocused

[/code]
– Thomas –

Try messing with your num lock key or other similar keys. I was having the exact same problem no matter what I put in the config and turning on num lock made clicktoraise work again.

For some reason it works now (as of today), but I only tweaked my FvwmButtons-conf.
I have no idea why, though it works like a charm, so I won’t complain :wink:

Thanks to you all for answering and helping me with my little problems :smiley: