Detect Fullscreen before sending tm-full-screen

107 views
Skip to first unread message

Jan

unread,
Aug 13, 2018, 6:28:37 AM8/13/18
to TiddlyWiki
Hi,
Is there a way to detect wheter a wiki is in fullscreen.
If a TW is already in fullscreen, the message tm-full-screen switches
back to normal.

When I include tm-full-screen into a button to launch slideshow, it
would be necessary to distinguis whether TW is already running in
fullscreen. It would be nice to have something in the infomechanism to
find out about that.

How can I get this information?

-Jan

TonyM

unread,
Aug 13, 2018, 10:26:39 AM8/13/18
to TiddlyWiki
Jan,

If you search the shadows you find the button tiddler $:/core/ui/Buttons/full-screen

There is no two state setting for the button. I think the info and fold buttons do that. But not Full screen button taking it in and out of fullscreen mode seems to use the same action message tm-full-screen which is documented here https://tiddlywiki.com/#WidgetMessage%3A%20tm-full-screen

Which shows we may need to look into the core to find how it tells if it is in full screen mode and if we can access that value.

Alternativly you could make your own fullscreen button(s) that have additional action widgets that toggle a value that you can then test for. I say buttons because you only see one at a time but one says go full screen, the other says stop and both change a toggle value.

Is this enought or would you like help making a new button or analysing the core method?

Regards
Tony

Jan

unread,
Aug 13, 2018, 10:36:02 AM8/13/18
to tiddl...@googlegroups.com
Hi Tony,
thanks for your reply, help on the core method is what i would need.

-Jan

Am 13.08.2018 um 16:26 schrieb TonyM:
> Jan,
>
> If you search the shadows you find the button tiddler $:/core/ui/Buttons/full-screen
>
> There is no two state setting for the button. I think the info and fold buttons do that. But not Full screen button taking it in and out of fullscreen mode seems to use the same action message tm-full-screen which is documented herehttps://tiddlywiki.com/#WidgetMessage%3A%20tm-full-screen

TonyM

unread,
Aug 13, 2018, 10:40:16 AM8/13/18
to TiddlyWiki
Sure,

It will have to be tomorrow for me +10 hours and I am only on my phone.

Add a comment to bump this thread if you do not here from me or someone else.

Regards
Tony

TonyM

unread,
Aug 13, 2018, 11:43:08 PM8/13/18
to TiddlyWiki
Jan,

Perhaps someone with more knowledge of the core can help, no luck in my investigation. I cant even find the core code (javascript) for tm-full-screen.

This is the alternative button(pair) I suggested and it works giving you the state tiddler containing yes or not yes. If you hide the existing Full screen icon and only show this one it would make it work except for one issue, hitting esc can also change full screen and the toggle becomes out of sync.

<$reveal type="nomatch" state="$:/temp/fullscreen" text="yes">
<$button message="tm-full-screen" set="$:/temp/fullscreen" setTo="yes">
{{$:/core/images/full-screen-button}}
</$button>
</$reveal>
<$reveal type="match" state="$:/temp/fullscreen" text="yes">
<$button message="tm-full-screen" set="$:/temp/fullscreen" setTo="no">
{{$:/core/images/full-screen-button}}
</$button>
</$reveal>


Perhaps this will get you started, If I discover something I will let you know.

Regards
Tony

Jan

unread,
Aug 14, 2018, 5:01:22 PM8/14/18
to tiddl...@googlegroups.com
Hi Tony,
That is a good Idea for a  workaround.
In principle I need this function exactly for the cases where I want to toggle fullscreen together with other functions. (Starting and stopping a slideshow).
But this is a good start. I will need additional <<go_fullscreen>> and a <<quit_fullscreen>> function using this mechanism...but that is easy.

Thanks!
Jan




Am 14.08.2018 um 05:43 schrieb TonyM:

Jeremy Ruston

unread,
Aug 14, 2018, 6:05:00 PM8/14/18
to tiddl...@googlegroups.com
Hi Jan

I’ve updated the tm-full-screen message for 5.1.18 so that one can force “enter” or “exit” full screen mode, instead of just toggling it:


I’ve pushed an update but am currently waiting for it to be processed by GitHub. You should see it shortly here:


Best wishes

Jeremy

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5B734314.20304%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

TonyM

unread,
Aug 14, 2018, 6:07:33 PM8/14/18
to TiddlyWiki
Jan,

Good to hear, happy to help.

The best way to learn is to teach (or support others)

Regards
Tony

TonyM

unread,
Aug 14, 2018, 6:08:27 PM8/14/18
to TiddlyWiki
Great Jeremy
Reply all
Reply to author
Forward
0 new messages