SV: Re: wxGTK, wxLogGui, mouse capture, brings down Gnome
Arne Steinarson
asteinarson at yahoo.se
Mon Jul 2 04:12:50 PDT 2007
Calling ungrab in wxDialog::ShowModal solves the
problem of the whole of Gnome freezing (wxLogDialog
derives from wxDialog).
However, the application does not get a notification
that capture was lost. One should send a
wxMouseCaptureLostEvent to the app when releasing the
capture in this way.
How about a:
static wxWindowGTK::ReleaseCaptureInternal
which can be called from wxDialog::ShowModal that
would emit wxMouseCaptureLostEvent to the app? (docs
for wxMouseCaptureEvent is informative)
Really, since the app cannot verify that it still has
the capture, it gets difficult to write good code that
does mouse capture.
Regards
// Arne S.
--- Robert Roebling <robert at roebling.de> skrev:
> Arne Steinarson wrote:
>
> > When the wxLogGui instance receives logging and
> while
> > a window has mouse capture, using the log
> functions
> > then... brings down the whole Gnome GTK
> environment.
>
> This is bad, but it can only happen during rare
> debugging conditions and even then it will only
> affect the message dialog used by wxLog. How
> else could a modal dialog show up while the mouse
> is captured?
>
> Can you test using
>
http://developer.gnome.org/doc/API/gdk/gdk-general.html#GDK-POINTER-UNGRAB
> maybe in wxMessageDialog::ShowModel() in
> src/gtk/msgdlg.cpp
>
> Robert
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail:
> wx-users-help at lists.wxwidgets.org
>
>
- - -
__________________________________________________________
Hitta din nästa resa på Yahoo! Shopping.
Jämför pris på flygbiljetter och hotellrum här:
http://shopping.yahoo.se/b/a/c_169901_resor_biljetter.html?partnerId=96914052
More information about the wx-users
mailing list