Page 1 of 1

systemWindow, topLevel, palette stack

Posted: Tue May 25, 2021 12:33 pm
by SteveFI
Hello everyone,

I've almost finished my project and am now scratching my head over window layering.

My project needs to have its main window float above another application, which is some exam software that runs in kiosk mode. Half of the exam software's window is redundant (the practice software the examining body provides simply shows an "exam goes here" placeholder!) yet they would still like students to practise with the software. It's bit a silly if they can't actually see any exam papers to do so.

The simple solution is to float a window over the top using systemWindow, which is what my app does. This means they can have the exam we provide on the left and the remaining interface to create an answer on the right (it's masters-level, professional exam, case study, write a report, four hours long exam kinda stuff!).

Anyway, so far so good. However, one of the features I needed to implement is the ability to make notes on the exam paper. I've coded these to take the form of windows themselves (no titlebar, about 200 x 200 pixels in size) and want these to float above the main window.

Currently, all windows created have their systemWindow property set to true so they float above the exam software. However, because they all exist in the same layer, when the user interacts with the exam paper, it covers the note windows. I need the notes windows to sit on top of the main stack at all times.

I've tried using topLevel and palette on the note stacks but to no avail. When using palettes, I've tried setting raisePalettes to true but they still won't float over a system window.

Would anybody have any tips? I know this is a bit of strange one. I'm trying to overcome the limitations of someone else's application design!

Thanks,


Steve

Re: systemWindow, topLevel, palette stack

Posted: Tue May 25, 2021 1:07 pm
by Klaus
Hi Steve,

Code: Select all

...
go stack "the system window number 666"
...
will also bring a system window to front!


Best

Klaus

Re: systemWindow, topLevel, palette stack

Posted: Tue May 25, 2021 1:19 pm
by SteveFI
Thanks Klaus.

Hmmm. I can bring the little notes windows to the front fairly easily. It's keeping them there that's proving to be tricky!

However, it also seems that depending on how I bring the notes to the front, they will stay there. Palette seems to present the windows without the main stack losing focus. It's when focus switches away and back to the main stack, it obscures all the palettes.

Perhaps I'll try trapping the resume event and cycle through the notes windows, bring them to the front without changing the focus. It may get a little flickery to the user but this isn't going to be a commonly used feature.

Re: systemWindow, topLevel, palette stack

Posted: Tue May 25, 2021 2:31 pm
by dunbarx
Hi.

Can you use the "resumeStack" message to bring the users "current" window to the front? Or even the "mouseEnter" message. placed in a backScript?

Craig

Re: systemWindow, topLevel, palette stack

Posted: Tue May 25, 2021 3:00 pm
by SteveFI
Hi Craig,

Yes - I've used resumestack to trap the event, cycle through the palette windows (I've made them all mainstacks) and quickly bring them to the fore whilst retaining the focus in the mainstack. There is only a mild flicker as the windows draw, which is acceptable.

Thanks,


Steve

Re: systemWindow, topLevel, palette stack

Posted: Tue May 25, 2021 3:44 pm
by dunbarx
Good.

Have you locked the screen when doing your "cycling? It may reduce that chatter.

Craig

Re: systemWindow, topLevel, palette stack

Posted: Tue May 25, 2021 5:58 pm
by SteveFI
I hadn't as I didn't think that lock screen affected stacks, only their contents.

Still, it's worth a pop, isn't it? :D

Steve

Re: systemWindow, topLevel, palette stack

Posted: Wed May 26, 2021 6:31 pm
by jacque
Right, lock screen only affects the contents of a single window.

Re: systemWindow, topLevel, palette stack

Posted: Wed May 26, 2021 7:00 pm
by FourthWorld
When window layering is a concern, consider one window with expandable/collapsible parts.

Re: systemWindow, topLevel, palette stack

Posted: Thu May 27, 2021 10:47 am
by SteveFI
Thanks yet again. :)

As expected, locking the screen didn't help. Fortunately, the students aren't expected to interact with the notes very often, so the flicker they experience is minor to the point of being trivial. I'm just a bit of a perfectionist.

Unfortunately, I'm having to mimic someone else's software to give the students exam practice so it's not really possible to change the UX. Having been through this process, there are a few things I'd change. :(

Steve