How to avoid window flickering with changing focus?

Tiemo Hollmann TB toolbook at kestner.de
Tue Jul 4 09:17:53 EDT 2017


Hello,

I have a LC 8.1.4 program on Windows. My program has a kind of a quiz and I
am using a modal window to prompt for answers. The quiz runs in a loop until
the user exits the quiz. When the user clicks a button of the modal window
to give an answer and close the modal window. Some handlers are processing
the answer, playing a video, updating some informations on the screen and at
the end call again the modal window for the next question. So there is a
frequent change of the active focus window between the main window and the
modal dialog.

I have developed the program on a fast win 10 machine. In the standard Win
10 scheme all windows now have a white title bar and almost no frame around
the windows. The look & feel of my program is pretty good / normal. Now I
tested it on a Win 8 machine, which has the standard win 8 scheme with
violet window title bar and frame around each window. And here you get eye
cancer, when using my program. After each answer of the quiz dialog, the
modal window disappears and the main violet window frame gets the focus, but
seems to lose the focus one or two times, so that there is a wild flickering
of the window frame until it regularly loses the focus when the modal dialog
window gets it again. There must be some statements (which I haven't found
yet), which play with the focus, without my knowledge.  Now I saw, that it
actually has the same behavior on my win 10 machine, but because of the
white and small frame and the fast machine I never have realized it and it
doesn't bothers.

Up to now, I couldn't  find the source where the changes of the window focus
come from and didn't find a starting point, what could cause it. Do you have
any ideas, on how to drill this down (in debug mode the "loop" behaves
different and doesn't shows the flickering) or an idea if and how I can
avoid this behavior? I tried some changes with lock/unlock screen, but up to
now without success. Because there are quite some handlers involved, it is
not just with a lock screen/unlock screen done. Or I didn't found yet the
right place to wrap the whole sequence of handler in a "lock screen" 

Ever had such an issue? Thanks for any ideas

Tiemo

 

 




More information about the use-livecode mailing list