CaptureMouse on macosx

ok, I submitted a bug (1122976)
Thanks for trying.

s.

Jim Carol wrote:

···

I have a C++ wxWidgets app which also tries to capture the mouse on OS
X, and it doesn't work there with CVS head either. I'm waiting and
hoping a future release fixes it.

-Jim

Le 14 févr. 05, à 17:51, Stéphane Conversy a écrit :

Hello.

does CaptureMouse work on MacOSX ?
the following code should display "motion" even when dragging outside the main window, but it doesn't...

import wx
class MyApp(wx.App):
    def OnInit(s):
        frame = wx.Frame(None, -1, "sauvage")
        frame.Show(1)
        frame.SetSize(wx.Size(500,500))

        frame.Bind(wx.EVT_LEFT_DOWN, s.OnMouseDown)
        frame.Bind(wx.EVT_LEFT_UP, s.OnMouseUp)
        frame.Bind(wx.EVT_MOTION, s.OnMouseMotion)
        s.frame = frame
        return True

    def OnMouseDown(s, evt):
        print "capture"
        s.GetTopWindow().CaptureMouse()

    def OnMouseUp(s, evt):
        print "release"
        s.GetTopWindow().ReleaseMouse()

    def OnMouseMotion(s, evt):
        print "motion"

app = MyApp()
app.MainLoop()

--
stéphane conversy
http://www.tls.cena.fr/~conversy

--
stéphane conversy
http://www.tls.cena.fr/~conversy