diff options
Diffstat (limited to 'wx+/mouse_move_dlg.cpp')
-rw-r--r-- | wx+/mouse_move_dlg.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/wx+/mouse_move_dlg.cpp b/wx+/mouse_move_dlg.cpp index 3f7ca755..7edaa5db 100644 --- a/wx+/mouse_move_dlg.cpp +++ b/wx+/mouse_move_dlg.cpp @@ -14,6 +14,8 @@ #include <wx/panel.h> #include <wx/gauge.h> #include <wx/statusbr.h> +#include <wx/frame.h> +#include <wx/dialog.h> using namespace zen; @@ -35,7 +37,7 @@ void forEachChild(wxWindow& parent, Fun f) MouseMoveWindow::MouseMoveWindow(wxWindow& parent, bool includeParent) : wxWindow(&parent, wxID_ANY) { - wxObjectEventFunction memFunMouseDown = wxMouseEventHandler(MouseMoveWindow::LeftButtonDown); + wxObjectEventFunction memFunMouseDown = wxMouseEventHandler(MouseMoveWindow::LeftButtonDown); //wxWidgets macros are obviously not C++11 ready auto connect = [&](wxWindow& wnd) { if (dynamic_cast<wxStaticText*> (&wnd) || //redirect clicks on these "dead" controls to move dialog instead @@ -44,8 +46,10 @@ MouseMoveWindow::MouseMoveWindow(wxWindow& parent, bool includeParent) : wxWindo dynamic_cast<wxGauge*> (&wnd) || dynamic_cast<wxStaticLine*> (&wnd) || dynamic_cast<wxStatusBar*> (&wnd) || - dynamic_cast<wxPanel*> (&wnd)) - wnd.Connect(wxEVT_LEFT_DOWN, memFunMouseDown, NULL, this); //wxWidgets macros are obviously not C++11 ready + dynamic_cast<wxPanel*> (&wnd) || + dynamic_cast<wxFrame*> (&wnd) || + dynamic_cast<wxDialog*> (&wnd)) + wnd.Connect(wxEVT_LEFT_DOWN, memFunMouseDown, NULL, this); }; if (includeParent) |