simplify how the XWindow is extracted for GetHandle

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-04-14 05:57:47 +00:00
parent ac12ef6e5f
commit 98bc3dcf46

View File

@ -23,9 +23,17 @@
#endif
#ifdef __WXGTK__
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>
#include <wx/gtk/win_gtk.h>
#define GetXWindow(wxwin) GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
#endif
#ifdef __WXX11__
#include "wx/x11/privx.h"
#define GetXWindow(wxwin) ((Window)(wxwin)->GetHandle())
#endif
#ifdef __WXMAC__
@ -1805,20 +1813,10 @@ long wxPyGetWinHandle(wxWindow* win) {
return (long)win->GetHandle();
#endif
// Find and return the actual X-Window.
#ifdef __WXGTK__
if (win->m_wxwindow) {
#ifdef __WXGTK20__
return (long) GDK_WINDOW_XWINDOW(GTK_PIZZA(win->m_wxwindow)->bin_window);
#else
GdkWindowPrivate* bwin = (GdkWindowPrivate*)GTK_PIZZA(win->m_wxwindow)->bin_window;
if (bwin) {
return (long)bwin->xwindow;
}
#if defined(__WXGTK__) || defined(__WXX11)
return (long)GetXWindow(win);
#endif
}
#endif
#ifdef __WXMAC__
return (long)MAC_WXHWND(win->MacGetRootWindow());
#endif