Commented out XSetInputFocus for now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -114,7 +114,7 @@ bool wxTopLevelWindowX11::Create(wxWindow *parent,
|
|||||||
Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y,
|
Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y,
|
||||||
0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
|
0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
|
||||||
m_mainWidget = (WXWindow) xwindow;
|
m_mainWidget = (WXWindow) xwindow;
|
||||||
|
|
||||||
XSelectInput( xdisplay, xwindow,
|
XSelectInput( xdisplay, xwindow,
|
||||||
ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
|
ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
|
||||||
ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask |
|
ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask |
|
||||||
|
@@ -209,12 +209,19 @@ void wxWindowX11::SetFocus()
|
|||||||
Window wMain = (Window) GetMainWindow();
|
Window wMain = (Window) GetMainWindow();
|
||||||
if (wMain)
|
if (wMain)
|
||||||
{
|
{
|
||||||
|
// TODO: set a m_needInputFocus flag and do the
|
||||||
|
// the setting in OnIdle or Show, because we can't
|
||||||
|
// set the focus for an unmapped window.
|
||||||
|
// We need to figure out how to find out if the window
|
||||||
|
// is mapped.
|
||||||
|
#if 0
|
||||||
XSetInputFocus(wxGlobalDisplay(), wMain, RevertToParent, CurrentTime);
|
XSetInputFocus(wxGlobalDisplay(), wMain, RevertToParent, CurrentTime);
|
||||||
|
|
||||||
XWMHints wmhints;
|
XWMHints wmhints;
|
||||||
wmhints.flags = InputHint;
|
wmhints.flags = InputHint;
|
||||||
wmhints.input = True;
|
wmhints.input = True;
|
||||||
XSetWMHints(wxGlobalDisplay(), wMain, &wmhints);
|
XSetWMHints(wxGlobalDisplay(), wMain, &wmhints);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user