Implemented two-window approach for wxX11.

Implemented wxSTAY_ON_TOP the way Qt does it.
  Added group window support.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-03-24 22:17:53 +00:00
parent df0e1b64e3
commit ab6b6b15e0
11 changed files with 462 additions and 314 deletions

View File

@@ -94,7 +94,7 @@ wxAdoptedWindow::wxAdoptedWindow()
wxAdoptedWindow::wxAdoptedWindow(WXWindow window)
{
m_mainWidget = window;
m_mainWindow = window;
}
wxAdoptedWindow::~wxAdoptedWindow()
@@ -131,15 +131,15 @@ bool wxReparenter::Reparent(wxWindow* newParent, wxAdoptedWindow* toReparent)
int parentOffset = 0;
old = XSetErrorHandler(ErrorHandler);
XReparentWindow((Display*) newParent->GetXDisplay(),
(Window) toReparent->GetXWindow(),
(Window) newParent->GetXWindow(),
0, 0);
XReparentWindow( wxGlobalDisplay(),
(Window) toReparent->GetMainWindow(),
(Window) newParent->GetMainWindow(),
0, 0);
if (!XQueryTree((Display*) newParent->GetXDisplay(),
(Window) toReparent->GetXWindow(),
&returnroot, &returnparent,
&children, &numchildren) || Xerror)
if (!XQueryTree( wxGlobalDisplay(),
(Window) toReparent->GetMainWindow(),
&returnroot, &returnparent,
&children, &numchildren) || Xerror)
{
XSetErrorHandler(old);
return TRUE;
@@ -160,14 +160,14 @@ bool wxReparenter::Reparent(wxWindow* newParent, wxAdoptedWindow* toReparent)
*/
for (each=0; each<numchildren; each++)
{
XGetWindowAttributes((Display*) newParent->GetXDisplay(),
children[each], &xwa);
XGetWindowAttributes( wxGlobalDisplay(),
children[each], &xwa);
fprintf(stderr,
"Reparenting child at offset %d and position %d, %d.\n",
parentOffset, parentOffset+xwa.x, parentOffset+xwa.y);
XReparentWindow((Display*) newParent->GetXDisplay(),
children[each], (Window) newParent->GetXWindow(),
xwa.x, xwa.y);
XReparentWindow( wxGlobalDisplay(),
children[each], (Window) newParent->GetMainWindow(),
xwa.x, xwa.y);
}
}
@@ -187,7 +187,7 @@ bool wxReparenter::WaitAndReparent(wxWindow* newParent, wxAdoptedWindow* toRepar
sm_exactMatch = exactMatch;
sm_name = windowName;
Display* display = (Display*) newParent->GetXDisplay() ;
Display* display = wxGlobalDisplay();
XSelectInput(display,
RootWindowOfScreen(DefaultScreenOfDisplay(display)),
SubstructureNotifyMask);