Hiding FvwmIconman doesn't work every time

Have a problem writing a FVWM function? Post your problem here, or post example functions that you think others' will enjoy.
User avatar
TF
Moderator
Moderator
Posts: 246
Joined: Sat Sep 10, 2005 12:30 am
Location: Germany
Contact:

Hiding FvwmIconman doesn't work every time

Postby TF » Fri Jan 27, 2012 10:05 pm

I've created a FvwmIconman which shows every time only one line. If a second window appears in the list it grows up out of the page. After getting the focus it moves down and after loosing the focus it moves back to its old place.

Unfortunatelly it's getting not every time the focus if I move over it. And sometimes it won't go back to its old place. But I don't know why.

Used variables:

Code: Select all

InfoStoreAdd fontsize 12
InfoStoreAdd used_font "Arial"

The module FvwmEvent:

Code: Select all

DestroyModuleConfig FvwmEvent: *
*FvwmEvent: StartDelay 3
*FvwmEvent: Delay 1
*FvwmEvent: enter_window      FE-EnterWindow

The module FvwmIconMan:

Code: Select all

Style FvwmGlobalIconMan !Title, Sticky, WindowListSkip, StaysOnTop, HandleWidth 1, !State 1

DestroyModuleConfig FvwmGlobalIconMan: *
*FvwmGlobalIconMan: 1 IconName                GlobalIconMan
*FvwmGlobalIconMan: 1 Title                   "Global IconMan"
PipeRead 'echo *FvwmGlobalIconMan: 1 ButtonGeometry   $(($[vp.width]/3))x0'
PipeRead 'echo *FvwmGlobalIconMan: 1 ManagerGeometry  1x0+$(($[infostore.fontsize]/2))-$(($[vp.height]-2*$[infostore.fontsize]))'

*FvwmGlobalIconMan: 1 Colorset                  10
*FvwmGlobalIconMan: 1 IconColorset             12
*FvwmGlobalIconMan: 1 PlainColorset             10
*FvwmGlobalIconMan: 1 SelectColorset           11
*FvwmGlobalIconMan: 1 FocusColorset             11
*FvwmGlobalIconMan: 1 FocusAndSelectColorset  11

*FvwmGlobalIconMan: 1 FollowFocus             true
*FvwmGlobalIconMan: 1 IconButton                down
*FvwmGlobalIconMan: 1 PlainButton               up
*FvwmGlobalIconMan: 1 SelectButton             down
*FvwmGlobalIconMan: 1 FocusButton               up
*FvwmGlobalIconMan: 1 FocusAndSelectButton    down

*FvwmGlobalIconMan: 1 ReliefThickness         1
*FvwmGlobalIconMan: 1 Resolution              page
*FvwmGlobalIconMan: 1 UseWinList              true

*FvwmGlobalIconMan: 1 DrawIcons               always
*FvwmGlobalIconMan: 1 Sort                    name
*FvwmGlobalIconMan: 1 Format                  "%c: %t"
*FvwmGlobalIconMan: 1 Font                    "xft:$[infostore.used_font]:pixelsize=$[infostore.fontsize]"
   
*FvwmGlobalIconMan: 1 NoIconAction            "SendToModule FvwmAnimate animate"
*FvwmGlobalIconMan: 1 Action  Mouse   1     A sendcommand "FocusRaiseAndStuff"
*FvwmGlobalIconMan: 1 Action  Mouse   2     A sendcommand "Iconify"
*FvwmGlobalIconMan: 1 Action  Mouse   3     A sendcommand "Popup MenuWindowOps2 Mouse c -102m"
*FvwmGlobalIconMan: 1 Action  select          sendcommand "Focus"

*FvwmGlobalIconMan: 1 Action  Key     Up    N gotobutton Up, select
*FvwmGlobalIconMan: 1 Action  Key     Down  N gotobutton Down, select

The used functions:

Code: Select all

SetEnv pixelmove 0

DestroyFunc FE-EnterWindow
AddToFunc FE-EnterWindow
+ I PointerWindow
+ I TestRc (!Match) KeepRc All (FvwmGlobalIconMan, State 1) FuncPixelMove "Hide"
+ I ThisWindow (!FvwmGlobalIconMan) All (FvwmGlobalIconMan, State 1) FuncPixelMove "Hide"
+ I ThisWindow (FvwmGlobalIconMan, !State 1) FuncPixelMove "Show"

DestroyFunc FuncPixelMove
AddToFunc FuncPixelMove
+ I Test (EnvMatch pixelmove 0) ThisWindow (FvwmGlobalIconMan) \
    PipeRead 'if [ $[w.height] -gt $(($[infostore.fontsize]*2)) ]; then \
                echo SetEnv pixelmove $(($[w.height]-$[infostore.fontsize]*2)); \
              else \
                echo SetEnv pixelmove 0; \
              fi'
#+ I echo y $[w.y]
#+ I echo Pixelmove $[pixelmove]
+ I PipeRead 'echo Func$0Window $[w.resource] $[pixelmove]

DestroyFunc FuncShowWindow
AddToFunc FuncShowWindow
+ I ThisWindow (FvwmGlobalIconMan) All State 1
+ I ThisWindow (FvwmGlobalIconMan) AnimatedMove w+0 w+$1p Warp

DestroyFunc FuncHideWindow
AddToFunc FuncHideWindow
+ I ThisWindow (FvwmGlobalIconMan) All State 1 False
+ I prev (FvwmGlobalIconMan) AnimatedMove w+0 w-$1p
+ I PipeRead 'echo SetEnv pixelmove 0'
+ I Break


Would be great if anyone can help me to fix these issues because I like this gimmick ^^

Thanks in advance,
Thomas

Btw: infostore doesn't work here with pixelmove. Could be a problem with EnvMatch ...
"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

thomasadam
Administrator
Administrator
Posts: 3043
Joined: Mon Nov 08, 2004 1:12 am
Location: England
Contact:

Re: Hiding FvwmIconman doesn't work every time

Postby thomasadam » Fri Jan 27, 2012 10:31 pm

TF wrote:I've created a FvwmIconman which shows every time only one line.


I've patched FvwmIconMan to support this already.

TF wrote:Btw: infostore doesn't work here with pixelmove. Could be a problem with EnvMatch ...


No -- it works fine.

Code: Select all

InfoStoreAdd foo 1
PipeRead `echo SetEnv P $(($[infostore.foo]+10))`
Exec exec xmessage $[P]
Test (EnvMatch P 11) SetEnv P 12
Exec exec xmessage $[P]


-- Thomas Adam

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

Re: Hiding FvwmIconman doesn't work every time

Postby TF » Fri Jan 27, 2012 11:35 pm

thomasadam wrote:I've patched FvwmIconMan to support this already.
ehm ... ok ... what must I do in the FvwmIconMan config to get the functionality you've patched in? And in which Fvwm version? cvs 2.6-branch?

thomasadam wrote:
TF wrote:Btw: infostore doesn't work here with pixelmove. Could be a problem with EnvMatch ...

No -- it works fine.

No, I mean this:

Code: Select all

+ I Test (EnvMatch infostore.pixelmove 0) ...
or

Code: Select all

+ I Test (EnvMatch $[infostore.pixelmove] 0) ...
"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

thomasadam
Administrator
Administrator
Posts: 3043
Joined: Mon Nov 08, 2004 1:12 am
Location: England
Contact:

Re: Hiding FvwmIconman doesn't work every time

Postby thomasadam » Fri Jan 27, 2012 11:39 pm

TF wrote:No, I mean this:

Code: Select all

+ I Test (EnvMatch infostore.pixelmove 0) ...
or

Code: Select all

+ I Test (EnvMatch $[infostore.pixelmove] 0) ...


RIght -- you can't do that, because it's not an environment variable. Again, see PipeRead. I ought to fix this though.

-- Thomas Adam

thomasadam
Administrator
Administrator
Posts: 3043
Joined: Mon Nov 08, 2004 1:12 am
Location: England
Contact:

Re: Hiding FvwmIconman doesn't work every time

Postby thomasadam » Sat Feb 11, 2012 11:10 pm

thomasadam wrote:
TF wrote:No, I mean this:

Code: Select all

+ I Test (EnvMatch infostore.pixelmove 0) ...
or

Code: Select all

+ I Test (EnvMatch $[infostore.pixelmove] 0) ...


RIght -- you can't do that, because it's not an environment variable. Again, see PipeRead. I ought to fix this though.

-- Thomas Adam


https://github.com/ThomasAdam/fvwm/tree ... -semantics

-- Thomas Adam

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

Re: Hiding FvwmIconman doesn't work every time

Postby TF » Sat Apr 07, 2012 12:08 am

TF wrote:
thomasadam wrote:I've patched FvwmIconMan to support this already.
ehm ... ok ... what must I do in the FvwmIconMan config to get the functionality you've patched in? And in which Fvwm version? cvs 2.6-branch?

Can you be more specific what you've patched?

Is this only on Github or CVS?

It would be great if you can tell me more because I like this hide/unhide behaviour.

Thanks in advance,
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

henoch
Kitten
Kitten
Posts: 15
Joined: Wed Jan 01, 2014 2:44 pm

Re: Hiding FvwmIconman doesn't work every time

Postby henoch » Mon May 29, 2017 1:27 am

thomasadam wrote:
TF wrote:...
RIght -- you can't do that, because it's not an environment variable. Again, see PipeRead. I ought to fix this though.

-- Thomas Adam


I guess this hasn't been fixed yet?


Return to “Complex functions”

Who is online

Users browsing this forum: No registered users and 1 guest