So
I have routed around this issue by doing this: In the widget class
which gets opened under a button that I press, I am putting this in
init():
self.had_initial_layout = False
...because during init() it's not laid out properly on the screen (x,y is 0,0 and width, height is 100,100) and _trigger_layout.is_triggered is True. It appears that is_triggered is part of some mechanism that ensures that the widget is repainted as soon as it's put up.
And
I am putting this in the callback that's run from the press event. So
if we receive an event before the is_triggered is false, we will not do
anything. We'll just flag it, and return. Later we will action on it,
even if a layout is triggered, because our flag is set:
def press(self, thingy):
if self._trigger_layout.is_triggered and not self.had_initial_layout:
self.had_initial_layout = True
return
# The initial layout must have taken place by this point.
self.had_initial_layout = True
print " press: to be actioned upon!"
...Am I using _trigger_layout.is_triggered reliably? Thanks.