Formatting tidy-up
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -34,57 +34,6 @@
|
|||||||
#include "wx/x11/private.h"
|
#include "wx/x11/private.h"
|
||||||
#include "X11/Xatom.h"
|
#include "X11/Xatom.h"
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Adapted from code by Mike Yang, as follows.
|
|
||||||
|
|
||||||
From: Mike Yang (mikey@eukanuba.wpd.sgi.com)
|
|
||||||
Subject: Re: Wrapping new widget around existing windows
|
|
||||||
Newsgroups: comp.windows.x
|
|
||||||
View: Complete Thread (17 articles) | Original Format
|
|
||||||
Date: 1991-08-09 09:45:48 PST
|
|
||||||
|
|
||||||
|
|
||||||
Enough people asked, so here's my test program which reparents another
|
|
||||||
window. It's a single file (reparent.c), and will work with Motif or
|
|
||||||
Xaw. Xaw users should comment out the "#define MOTIF" line.
|
|
||||||
|
|
||||||
The reparent program first prompts for the application name of the
|
|
||||||
client that it will reparent. If you're going to start the
|
|
||||||
application override_redirect (e.g. -xrm "*overrideRedirect: true"),
|
|
||||||
then this name is ignored and the first override_redirect window is
|
|
||||||
assumed to be the one.
|
|
||||||
|
|
||||||
Input focus is supposed to be correctly handled, as is resizing with
|
|
||||||
window manager hints. If you have input focus problems, try launching
|
|
||||||
your application override_redirect instead. This method is preferred
|
|
||||||
anyway, since you can map it off-screen and then avoid the "window
|
|
||||||
flash" effect as the application's top-level window is reparented.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
|
||||||
Mike Yang Silicon Graphics, Inc.
|
|
||||||
mikey@sgi.com 415/335-1786
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------- cut here ------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Copyright 1991 by Mike Yang, mikey@sgi.com, Silicon Graphics, Inc.
|
|
||||||
|
|
||||||
Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
the above copyright notice appear in all copies and that both that
|
|
||||||
copyright notice and this permission notice appear in supporting
|
|
||||||
documentation, and that the name of SGI not be used in advertising or
|
|
||||||
publicity pertaining to distribution of the software without specific,
|
|
||||||
written prior permission. SGI makes no representations about the
|
|
||||||
suitability of this software for any purpose. It is provided "as is"
|
|
||||||
without express or implied warranty.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxAdoptedWindow
|
* wxAdoptedWindow
|
||||||
*/
|
*/
|
||||||
@@ -101,6 +50,7 @@ wxAdoptedWindow::wxAdoptedWindow(WXWindow window)
|
|||||||
wxAdoptedWindow::~wxAdoptedWindow()
|
wxAdoptedWindow::~wxAdoptedWindow()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxReparenter
|
* wxReparenter
|
||||||
*/
|
*/
|
||||||
@@ -113,8 +63,7 @@ wxWindow* wxReparenter::sm_newParent = NULL;
|
|||||||
wxString wxReparenter::sm_name;
|
wxString wxReparenter::sm_name;
|
||||||
bool wxReparenter::sm_exactMatch = FALSE;
|
bool wxReparenter::sm_exactMatch = FALSE;
|
||||||
|
|
||||||
static int
|
static int ErrorHandler(Display* dpy, XErrorEvent* event)
|
||||||
ErrorHandler(Display* dpy, XErrorEvent* event)
|
|
||||||
{
|
{
|
||||||
Xerror = True;
|
Xerror = True;
|
||||||
return False;
|
return False;
|
||||||
@@ -286,7 +235,9 @@ WXWindow wxReparenter::FindAClientWindow(WXWindow window, const wxString& name)
|
|||||||
0, 1, False,
|
0, 1, False,
|
||||||
AnyPropertyType, &actualtype, &actualformat,
|
AnyPropertyType, &actualtype, &actualformat,
|
||||||
&nitems, &bytesafter, &propreturn);
|
&nitems, &bytesafter, &propreturn);
|
||||||
|
|
||||||
XSetErrorHandler(old);
|
XSetErrorHandler(old);
|
||||||
|
|
||||||
if (!Xerror && rvalue == Success && actualtype != None)
|
if (!Xerror && rvalue == Success && actualtype != None)
|
||||||
{
|
{
|
||||||
if (rvalue == Success)
|
if (rvalue == Success)
|
||||||
|
Reference in New Issue
Block a user