diff --git a/uppsrc/GLCtrl/GLCtrl.h b/uppsrc/GLCtrl/GLCtrl.h index 417b600eb..0c2995d0e 100644 --- a/uppsrc/GLCtrl/GLCtrl.h +++ b/uppsrc/GLCtrl/GLCtrl.h @@ -136,6 +136,8 @@ class GLCtrl : public ParentCtrl { virtual void State(int reason); virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); virtual Image MouseEvent(int event, Point p, int zdelta, dword keyflags); + + GLPane() { NoWantFocus(); } }; friend class GLCtrl; diff --git a/uppsrc/GLCtrl/Win32GLCtrl.cpp b/uppsrc/GLCtrl/Win32GLCtrl.cpp index 130d59764..c4d7ea864 100644 --- a/uppsrc/GLCtrl/Win32GLCtrl.cpp +++ b/uppsrc/GLCtrl/Win32GLCtrl.cpp @@ -13,7 +13,6 @@ GLCtrl::GLCtrl() hRC = NULL; glpane.ctrl = this; Add(glpane.SizePos()); - NoWantFocus(); } GLCtrl::~GLCtrl() diff --git a/uppsrc/GLCtrl/X11GLCtrl.cpp b/uppsrc/GLCtrl/X11GLCtrl.cpp index 8aff33c11..117669db4 100644 --- a/uppsrc/GLCtrl/X11GLCtrl.cpp +++ b/uppsrc/GLCtrl/X11GLCtrl.cpp @@ -23,6 +23,7 @@ GLCtrl::GLPane::GLPane(int depthsize, int stencilsize, bool doublebuffer, StencilSize = stencilsize; DoubleBuffering = doublebuffer; NumberOfSamples = numberofsamples; + NoWantFocus(); } // END Constructor class GLCtrl::GLPane ///////////////////////////////////////////////////////////////////////////////////////// @@ -201,7 +202,6 @@ GLCtrl::GLCtrl(int depthsize, int stencilsize, bool doublebuffer, bool multisamp { pane.ctrl = this; Add(pane.SizePos()); - NoWantFocus(); } #endif