From: <dom...@us...> - 2013-04-21 09:08:33
|
Revision: 266 http://sourceforge.net/p/fvwm-crystal/code/266 Author: dominique_libre Date: 2013-04-21 09:08:31 +0000 (Sun, 21 Apr 2013) Log Message: ----------- functions/Fullscreen: Disappear workk now on the current page. This fix windows moves between pages when cycling trough the fullscreened windows Modified Paths: -------------- ChangeLog fvwm/components/functions/Fullscreen Modified: ChangeLog =================================================================== --- ChangeLog 2013-04-19 21:47:18 UTC (rev 265) +++ ChangeLog 2013-04-21 09:08:31 UTC (rev 266) @@ -1,5 +1,9 @@ ChangeLog for FVWM-Crystal +Dimanche 21 Avril Dominique Michel + functions/Fullscreen: Disappear workk now on the current page. This fix + windows moves between pages when cycling trough the fullscreened windows. + Venderedi 19 Avril Dominique Michel functions/Media: Added commented out DVB channel change support. It work for me, but nothing more. Please considere to contribute. Modified: fvwm/components/functions/Fullscreen =================================================================== --- fvwm/components/functions/Fullscreen 2013-04-19 21:47:18 UTC (rev 265) +++ fvwm/components/functions/Fullscreen 2013-04-21 09:08:31 UTC (rev 266) @@ -4,7 +4,7 @@ # Bug fixes, disappear and restart functions: Dominique Michel 2008-2013 # <dom...@us...> # -# Overview: +# Fullscreen overview: # After using this function, current window will lose it's border and title # and will be maximized to the full screen (wow). After using Fullscreen # function on a "full-screened" window it will return to it's previous size and @@ -12,33 +12,36 @@ # # How to use: # Bind "Fullscreen" command somewhere, example: -# Key Q A M Fullscreen +# Key KP_Multiply A $[Mod1] Fullscreen # +# Disappear overview +# When using this function, Fvwm-Crystal will cycle through all the fullscreened +# windows and the workbench on the current page. +# To use it, bind "Disappear" command somewhere. +# # The other window size functions are into Window-Buttons. # # 'Fullscreen-Start' and 'Fullscreen-Stop' functions shouldn't be called # directly, use 'Fullscreen' function instead. +# 'Disappear-On' and 'Disappear-Off' functions shouldn't be called +# directly, use 'Disappear' function instead. # # Recipe : Must be included after the styles otherwise strange results will append -# when restarting Fvwm. Not sure if this remark is still valid because I done a lot -# of styles loading order debugging in the maintime. +# when restarting Fvwm. # # Todo: # - restore the position when restoring the "normal" window -# - when cycling trough the fullscreened windows, go to the original page -# of each window and make it visible here. -# - possibility to cycle trough the fullsceened windows only in the current page InfoStoreAdd TmpDirectory "/tmp" -# Wrapper function -# State 19 is used to know if the window is in fullscreen or not. +# Wrapper function {{{1 +# State 19 = FS (fullscreen), State 20 = visible DestroyFunc Fullscreen AddToFunc Fullscreen + I ThisWindow (State 19) Fullscreen-Stop + I TestRc (NoMatch) ThisWindow (!State 19) Fullscreen-Start -# State 20 = on => window on screen; State 20 = off => iconified + no icon +# fullscreen DestroyFunc Fullscreen-Start AddToFunc Fullscreen-Start + I SetEnv "FSWindowWidth_$[w.id]" "$[w.width]p" @@ -51,62 +54,61 @@ + I WindowStyle !Maximizable, FixedSize + I UpdateStyles # We need 1 temporary file for restoring the window state after restart -+ I Exec exec touch $[infostore.TmpDirectory]/fullscreen.19.$[w.id].tmp ++ I Exec exec touch $[infostore.TmpDirectory]/fullscreen.19.$[w.id].$[page.nx].$[page.ny].tmp +# non fullscreen DestroyFunc Fullscreen-Stop AddToFunc Fullscreen-Stop + I WindowStyle Title, Borders, Iconifiable, !ResizeHintOverride + I WindowStyle Maximizable, !FixedSize + I WindowStyle !State 19 + I WindowStyle !State 20 -+ I Test (f $[infostore.TmpDirectory]/fullscreen.19.$[w.id].tmp) Exec exec rm -f $[infostore.TmpDirectory]/fullscreen.19.$[w.id].tmp ++ I Test (f $[infostore.TmpDirectory]/fullscreen.19.$[w.id].$[page.nx].$[page.ny].tmp) Exec exec rm -f $[infostore.TmpDirectory]/fullscreen.19.$[w.id].$[page.nx].$[page.ny].tmp + I UpdateStyles + I Maximize True $[FSWindowWidth_$[w.id]] $[FSWindowHeight_$[w.id]] + I UnsetEnv "FSWindowWidth_$[w.id]" + I UnsetEnv "FSWindowHeight_$[w.id]" -########################################################################### -# The disappear function will cycle through all the fullscreened windows and -# the workbench. -# 'Disappear-On' and 'Disappear-Off' functions shouldn't be called -# directly, use 'Disappear' function instead. - -# Wrapper function +# Wrapper function {{{1 DestroyFunc Disappear AddToFunc Disappear -+ I Next (State 19, !State 20) Disappear-Off -+ I TestRc (NoMatch) All (State 19, State 20, !Iconic) Disappear-On +# if FS; then if !State20; then show; else hide all; fi ++ I PipeRead 'if [[ "$(ls $[infostore.TmpDirectory]/fullscreen.19.0x???????.$[page.nx].$[page.ny].tmp 2>/dev/null)" != "" ]]; then \ + for i in $(ls $[infostore.TmpDirectory]/fullscreen.19.0x???????.$[page.nx].$[page.ny].tmp 2>/dev/null); \ + do file=`echo "${i}"|sed -e \'s:fullscreen.19:fullscreen.20:\'`; \ + if [ -e "${file}" ]; then echo "WindowId $(echo $file | cut -d . -f 3) Disappear-Off"; exit; \ + fi; \ + done; \ + for i in $(ls $[infostore.TmpDirectory]/fullscreen.19.0x???????.$[page.nx].$[page.ny].tmp 2>/dev/null); \ + do echo "WindowId $(echo $i | cut -d . -f 3) Disappear-On"; done; fi' +#+ I Next (State 19, !State 20) Disappear-Off +#+ I TestRc (NoMatch) All (State 19, State 20, !Iconic) Disappear-On +# disappear +# file tmp_dir/fuulscreen.20.* = hidden DestroyFunc Disappear-On AddToFunc Disappear-On # Those 2 lines are needed if we want to cycle onto the windows original pages + I WarpToWindow $[pointer.x]p $[pointer.y]p -+ I Exec exec touch $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.nx].tmp ++ I Exec exec touch $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.nx].$[page.ny].tmp + I WindowStyle !State 20 + I WindowStyle NoIcon + I UpdateStyles + I Iconify true +# appear DestroyFunc Disappear-Off AddToFunc Disappear-Off # Go to the original page of the window -Test (f $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.nx].tmp) PipeRead 'page=`ls $[infostore.TmpDirectory] | grep 20.$[w.id] | awk --field-separator . "{print 4}"`; echo "+ I GotoPage $page 0"' +#Test (f $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.nx].$[page.ny].tmp) PipeRead 'page=`ls $[infostore.TmpDirectory] | grep 20.$[w.id] | awk --field-separator . "{print 4}"`; echo "+ I GotoPage $page 0"' + I Iconify false + I WindowStyle State 20 + I WindowStyle Icon + I UpdateStyles -+ I Test (f $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.nx].tmp) Exec exec rm -f $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.nx].tmp -#+ I Test (f $[ThumbDirectory]/fullscreen.20.$[w.id].tmp) Exec exec rm -f $[ThumbDirectory]/fullscreen.20.$[w.id].tmp ++ I Test (f $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.nx].$[page.ny].tmp) Exec exec rm -f $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.nx].$[page.ny].tmp -# Another wrapper fonction, still needed ? -DestroyFunc Disappear-Cycle -AddToFunc Disappear-Cycle -+ I Prev (!"FvwmPager|FvwmForm*|FvwmButtons",CurrentPage,AnyScreen,Maximized) Disappear - -################################## -# Restore Fullscreen after restart -# Called by the recipe after all the styles are applied. - +# Restore Fullscreen after restart {{{1 +# Called by StartFunction DestroyFunc Fullscreen-Recover AddToFunc Fullscreen-Recover + I WindowStyle !Title, !Borders, Iconifiable, ResizeHintOverride @@ -126,16 +128,17 @@ DestroyFunc Disappear-Test AddToFunc Disappear-Test -+ I Test (F $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.nx].tmp) WindowId $[w.id] Disappear-Recover ++ I Test (F $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.nx].$[page.ny].tmp) WindowId $[w.id] Disappear-Recover +# wrapper DestroyFunc RecoverFullscreen AddToFunc RecoverFullscreen PipeRead 'for i in $[infostore.TmpDirectory]/fullscreen.19.*; do wid=`basename "$i" | awk --field-separator . \'{print $$3}\'`; echo "+ I WindowId ${wid} Fullscreen-Recover"; done' PipeRead 'for i in $[infostore.TmpDirectory]/fullscreen.20.*; do wid=`basename "$i" | awk --field-separator . \'{print $$3}\'`; echo "+ I WindowId ${wid} Disappear-Recover"; done' -+ I All Test (F $[infostore.TmpDirectory]/fullscreen.20.$[w.id].tmp) WindowId $[w.id] Disappear-Recover ++ I All Test (F $[infostore.TmpDirectory]/fullscreen.20.$[w.id].$[page.ny].$[page.ny].tmp) WindowId $[w.id] Disappear-Recover AddToFunc StartFunction I RecoverFullscreen -#AddToFunc StartFunction I All Test (F $[infostore.TmpDirectory]/fullscreen.19.$[w.id].tmp) WindowId $[w.id] Fullscreen-Recover +#AddToFunc StartFunction I All Test (F $[infostore.TmpDirectory]/fullscreen.19.$[w.id].$[page.nx].$[page.ny].tmp) WindowId $[w.id] Fullscreen-Recover AddToFunc ExitFunction I Test (!ToRestart) Exec rm -f $[infostore.TmpDirectory]/fullscreen.19.* AddToFunc ExitFunction I Test (!ToRestart) Exec rm -f $[infostore.TmpDirectory]/fullscreen.20.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |