weird behaviour of ModalWindow

Everything started when one of my users send me a video showing how a ModalWindow disappeared behind the main window when hovering this main window. And we know that a modal window must deactivate the main window.
I tried to reproduce this behaviour but I couldn’t. Probably mi version of OX (El Capitan 10.11.6) was not the same as his.
But while I was trying it I discovered this weird thing: It exist a MouseExit direction event!

This is how I detected it:

  1. Open a ModalWindow.
  2. Hover the main window and nothing happens. That is what is expected.
  3. Hover the ModalWindow and exit it through top, left or right sides (north, west, est). Nothing happens --> OK!
  4. Hover the ModalWindow and exit it through bottom side (south). Main window MouseMove event is fired --> This is not correct.

On Windows, this happens in any of the sides. It’s worse but at least is coherent.
I’ve tried to reproduce this in a simple example but I couldn’t.
That’s why I created this video to show the problem:

https://dl.dropboxusercontent.com/u/6172411/XojoForum/ModalSouth.mov

Has any one:

  1. Experimented it as well?
  2. An idea of what’s happening?

My workaround at this moment is putting this code at the beginning of the main window MouseMove event:
for i As Integer = 0 to WindowCount - 1 if window(i).Frame = 1 Then ' modal windowl Return end if next

Thanks in advance for any light on this problem.

Have you used ShowModal ?

On menuitem: wAccions.ShowModal

“wAccions” is the modal window and it is defined as “Movable Modal”

The movie only shows the IDE coming in front of the main window when the break point is reached.

This does not happen in a small test project:

[code]Class Window1 Inherits Window

Event MouseDown(X As Integer, Y As Integer) As Boolean
Dim win As New Window2()
win.ShowModal()
End Event

Sub MouseMove(X As Integer, Y As Integer)
System.DebugLog Str(x) + ", " + Str(y) // Not called while the dialog is shown modally
End Sub

End Class[/code]

Class Window2 Inherits Window // Frame = MovableModal End Class

Eli,

Thank you for your observations.
The video shows the IDE coming in front because I’ve put break on the main window MouseMove event. So, it shows the problem I’m mentioning. And pay attention to the fact that this doesn’t happen when I move out North, East or West.

And I agree with you that this can not be reproduced in a small test. I’ve already said it in my post.
That’s why I created the video.

For Windows I’ve created this Feedback case.

feedback://showreport?report_id=44999

No, it is not showing the problem. The IDE always comes to front on a break point. So all non-modal windows will then be hidden by the IDE.

MouseMove is not fired in the example you posted in Feedback.

You are right.
In Feedback I showed the problem for Windows, not for OSX, with an example, and there there is no break, just two counters to show that the events are activated.

Sorry, didn’t see that.