Added screen locking code to popup window for X11.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9919dac1c8
commit
c51c475202
@ -46,6 +46,9 @@
|
||||
#ifdef __WXGTK__
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
#ifdef __WXX11__
|
||||
#include "wx/x11/private.h"
|
||||
#endif
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPopupTransientWindow, wxPopupWindow)
|
||||
@ -284,6 +287,13 @@ bool wxPopupTransientWindow::Show( bool show )
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __WXX11__
|
||||
if (!show)
|
||||
{
|
||||
XUngrabPointer( wxGlobalDisplay(), CurrentTime );
|
||||
}
|
||||
#endif
|
||||
|
||||
bool ret = wxPopupWindow::Show( show );
|
||||
|
||||
#ifdef __WXGTK__
|
||||
@ -303,6 +313,21 @@ bool wxPopupTransientWindow::Show( bool show )
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __WXX11__
|
||||
if (show)
|
||||
{
|
||||
Window xwindow = (Window) m_clientWindow;
|
||||
|
||||
/* int res =*/ XGrabPointer(wxGlobalDisplay(), xwindow,
|
||||
True,
|
||||
ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask,
|
||||
GrabModeAsync,
|
||||
GrabModeAsync,
|
||||
None,
|
||||
None,
|
||||
CurrentTime );
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user