On Sat, Jun 08, 2019 at 10:38:57PM +0200 I heard the voice of
Rhialto, and lo! it spake thus:
> 
> I have also seen lots of the asserts from $SUBJECT recently, while I
> was interacting with such a window.

I run fullscreen video regularly, and occasionally fullscreen
browsers, and never saw any hits on the assert.

Until, horribly disconcertingly, last week.  After your mail.  So I
see the obvious cause...   :)


I've managed to track down a reproducible case for _my_ crash.  Now,
_my_ method requires a fullscreen window with transients, so if you're
hitting the same thing as I am, you presumably are using a different
video player or at least usage (since mine never creates any other
windows).  If not...    well, we coincidentally found _two_ bugs, and
I don't like that one bit...

My reproduction path is roughly thus:

- Have a regular window A, and a fullscreenable window F.
- Fullscreen F; it moves to the top with focus.
- Create transient window T (transient of F).
- Move focus into A; it can now be put visually on top of F/T.
- Put it on top of T (whether it's on top of F doesn't matter at all).
- Move focus to F (moving to T is fine).
- Earth-shattering kaboom.


Tracking through the code, the issue winds up being that since F is
fullscreen and focused, its transient T gets OTP-boosted as well, but
since it hasn't been moved up, *kB*.  In my case, the transient is
rather large, and so isSmallTransientOf() fails, so shouldStayAbove()
gives a false, so RaiseSmallTransientsOfAbove() doesn't shuffle it up,
so it stays in its old position below A.


Cranking TransientOnTop high enough to trigger (or manually forcing a
true result from the comparison in iSTO()) suffices to prevent my
crash.  The change (or lack thereof) in SetFocus() makes no difference
at all in either case for me.  Which seems a strange; a fairly small
amount of thinking on the matter _does_ suggest it's a thing that
should be needed, but somehow...  isn't?  I'll have to think more on
that.

So, the solution to _a_ problem (maybe not yours) is that we need to
reposition even the 'small' transients up to the top of the stack,
letting the 'small' just determine whether they get jammed on top of
the main window or not.  Hopefully I can experiment more in the next
few days...


A possibly related oddity is how it appears we don't strip the
OTP_AFLAG_FULLSCREN from T when we focus away from F.  I don't _think_
this is a contributing cause (since we _do_ when we move the focus to
T and then away, and that doesn't seem to change the crash).  But it's
certainly a nearby weirdness...


-- 
Matthew Fuller     (MF4839)   |  [email protected]
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.

Reply via email to