[SOLVED] Raise windows when clicked

Basic FVWM questions can be asked here.
User avatar
Decadentgray
Kitten
Kitten
Posts: 20
Joined: Fri Sep 06, 2013 4:38 am
Location: Nuremberg / Germany

[SOLVED] Raise windows when clicked

Postby Decadentgray » Tue Jun 10, 2014 12:28 am

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: Select all

#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



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
Last edited by Decadentgray on Sat Jun 21, 2014 6:07 pm, edited 3 times in total.
Learning lines in the rain - Special effects by lunatic and drinks - Freeze frame, screen kiss - Hot heads, lights and power - It's patently obvious --- She's in parties - It's in the can - she's in parties - It's in the can!!

Tronar
Cat in the hat
Cat in the hat
Posts: 30
Joined: Thu Jun 05, 2014 5:58 pm
Location: Moscow

Re: Raise windows when clicked

Postby Tronar » Tue Jun 10, 2014 4:14 pm

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

User avatar
Decadentgray
Kitten
Kitten
Posts: 20
Joined: Fri Sep 06, 2013 4:38 am
Location: Nuremberg / Germany

Re: Raise windows when clicked

Postby Decadentgray » Tue Jun 10, 2014 6:21 pm

@Werner: Thanks for the reply ;)

I tried, just to see if it might work

Code: Select all

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: Select all

# 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


I tried of course with

Code: Select all

#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.
Learning lines in the rain - Special effects by lunatic and drinks - Freeze frame, screen kiss - Hot heads, lights and power - It's patently obvious --- She's in parties - It's in the can - she's in parties - It's in the can!!

User avatar
theBlackDragon
Administrator
Administrator
Posts: 714
Joined: Wed Oct 27, 2004 9:22 pm
Location: Zingem, Belgium
Contact:

Re: Raise windows when clicked

Postby theBlackDragon » Wed Jun 11, 2014 11:12 am

Decadentgray wrote:I tried of course with

Code: Select all

#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:):

Code: Select all

Style * SloppyFocus, ClickToFocusRaises

User avatar
Decadentgray
Kitten
Kitten
Posts: 20
Joined: Fri Sep 06, 2013 4:38 am
Location: Nuremberg / Germany

Re: Raise windows when clicked

Postby Decadentgray » Wed Jun 11, 2014 1:49 pm

Ok, right now it looks like this:

Code: Select all

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


I tried

Code: Select all

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


and I tried

Code: Select all

#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 :(
Learning lines in the rain - Special effects by lunatic and drinks - Freeze frame, screen kiss - Hot heads, lights and power - It's patently obvious --- She's in parties - It's in the can - she's in parties - It's in the can!!

User avatar
TF
Moderator
Moderator
Posts: 247
Joined: Sat Sep 10, 2005 12:30 am
Location: Germany
Contact:

Re: Raise windows when clicked

Postby TF » Thu Jun 12, 2014 9:28 am

Decadentgray wrote:my windows only rise when I click the Decor, but not on the window itself....
I'm gradually starting too feel a bit stupid :(

You have forgotten

Code: Select all

Style * MouseFocusClickRaises


-- Thomas --
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." -- Albert Einstein
Fvwm version: 2.6.5
Fvwm config: Fvwm-Nightshade

User avatar
theBlackDragon
Administrator
Administrator
Posts: 714
Joined: Wed Oct 27, 2004 9:22 pm
Location: Zingem, Belgium
Contact:

Re: Raise windows when clicked

Postby theBlackDragon » Thu Jun 12, 2014 11:21 am

TF wrote:
Decadentgray wrote:my windows only rise when I click the Decor, but not on the window itself....
I'm gradually starting too feel a bit stupid :(

You have forgotten

Code: Select all

Style * MouseFocusClickRaises


-- Thomas --


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

fvwm manpage wrote:ClickToFocusPassesClickOff and ClickToFocusPassesClick controls whether a mouse click to focus a window is sent to the application or not. Similarly,
ClickToFocusRaisesOff/MouseFocusClickRaisesOff and ClickToFocusRaises/MouseFocusClickRaises control if the window is raised (but depending on the focus model).

Note: in fvwm versions prior to 2.5.3, the "Click..." options applied only to windows with ClickToFocus while the "Mouse..." options applied to windows with a different focus
policy. This is no longer the case.


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).

User avatar
TF
Moderator
Moderator
Posts: 247
Joined: Sat Sep 10, 2005 12:30 am
Location: Germany
Contact:

Re: Raise windows when clicked

Postby TF » Thu Jun 12, 2014 11:59 am

Ouch ... it helps if I can read ... :? sorry, my fault ...

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

theBlackDragon wrote:
fvwm manpage wrote:ClickToFocusPassesClickOff and ClickToFocusPassesClick controls whether a mouse click to focus a window is sent to the application or not. Similarly,
ClickToFocusRaisesOff/MouseFocusClickRaisesOff and ClickToFocusRaises/MouseFocusClickRaises control if the window is raised (but depending on the focus model).

Note: in fvwm versions prior to 2.5.3, the "Click..." options applied only to windows with ClickToFocus while the "Mouse..." options applied to windows with a different focus
policy. This is no longer the case.
Haven't known this :oops:

-- Thomas --
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." -- Albert Einstein
Fvwm version: 2.6.5
Fvwm config: Fvwm-Nightshade

User avatar
Decadentgray
Kitten
Kitten
Posts: 20
Joined: Fri Sep 06, 2013 4:38 am
Location: Nuremberg / Germany

Re: Raise windows when clicked

Postby Decadentgray » Sat Jun 14, 2014 3:33 am

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...
Learning lines in the rain - Special effects by lunatic and drinks - Freeze frame, screen kiss - Hot heads, lights and power - It's patently obvious --- She's in parties - It's in the can - she's in parties - It's in the can!!

User avatar
TF
Moderator
Moderator
Posts: 247
Joined: Sat Sep 10, 2005 12:30 am
Location: Germany
Contact:

Re: Raise windows when clicked

Postby TF » Sun Jun 15, 2014 4:42 pm

Decadentgray wrote: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

Code: Select all

Style * GrabFocusOff
Remove it and you have the behaviour you want 8)

As theBlackDragon said
theBlackDragon wrote:I think you want (which, incidentally, is what I'm using :wink:):

Code: Select all

Style * SloppyFocus, ClickToFocusRaises
These are the only two you need.

Remove or commented out the following in your config

Code: Select all

#    Style *           SloppyFocus, ClickToFocusRaises, MouseFocusClickRaises
    Style *           SloppyFocus, ClickToFocusRaises
#    Style *           FPClickRaisesFocused

-- Thomas --
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." -- Albert Einstein
Fvwm version: 2.6.5
Fvwm config: Fvwm-Nightshade

sandwash
Kitten
Kitten
Posts: 1
Joined: Tue Jun 17, 2014 9:33 pm

Re: Raise windows when clicked

Postby sandwash » Tue Jun 17, 2014 9:39 pm

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.

User avatar
Decadentgray
Kitten
Kitten
Posts: 20
Joined: Fri Sep 06, 2013 4:38 am
Location: Nuremberg / Germany

Re: [SOLVED] Raise windows when clicked

Postby Decadentgray » Sat Jun 21, 2014 6:09 pm

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 ;)

Thanks to you all for answering and helping me with my little problems :D
Learning lines in the rain - Special effects by lunatic and drinks - Freeze frame, screen kiss - Hot heads, lights and power - It's patently obvious --- She's in parties - It's in the can - she's in parties - It's in the can!!


Return to “Basic questions”

Who is online

Users browsing this forum: No registered users and 1 guest