From: Julian Smart Date: Mon, 11 Feb 2002 11:42:06 +0000 (+0000) Subject: Typos and other fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6a44bffd1ac68163e4c1cfe8aa8fe4f7f98a02e7 Typos and other fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 2f552fe063..3a2bf8b547 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -150,6 +150,10 @@ #include "wx/cmdproc.h" +#if wxUSE_CLIPBOARD +#include "wx/dataobj.h" +#endif + // turn extra wxTextCtrl-specific debugging on/off #define WXDEBUG_TEXT diff --git a/src/x11/app.cpp b/src/x11/app.cpp index 9e840d40a5..b1e8fa532b 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -349,7 +349,7 @@ void wxApp::ProcessXEvent(WXEvent* _event) if (event->xclient.message_type == wm_protocols) { - if (event->xclient.data.l[0] == wm_delete_window) + if ((Atom) (event->xclient.data.l[0]) == wm_delete_window) { if (win) { diff --git a/src/x11/popupwin.cpp b/src/x11/popupwin.cpp index 6f9c4b7e50..8dd6adbc61 100644 --- a/src/x11/popupwin.cpp +++ b/src/x11/popupwin.cpp @@ -19,6 +19,8 @@ #include "wx/app.h" #include "wx/x11/private.h" +#include "X11/Xatom.h" +#include "X11/Xutil.h" //----------------------------------------------------------------------------- // wxPopupWindow @@ -61,8 +63,10 @@ bool wxPopupWindow::Create( wxWindow *parent, int style ) xattributes.background_pixel = BlackPixel( xdisplay, xscreen ); xattributes.border_pixel = BlackPixel( xdisplay, xscreen ); xattributes.override_redirect = False; + + wxSize size(2, 2); - Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y, + Window xwindow = XCreateWindow( xdisplay, xparent, 0, 0, size.x, size.y, 0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes ); XSelectInput( xdisplay, xwindow, @@ -71,7 +75,7 @@ bool wxPopupWindow::Create( wxWindow *parent, int style ) KeymapStateMask | FocusChangeMask | ColormapChangeMask | StructureNotifyMask | PropertyChangeMask ); - m_mainWindow = (WXWindow) xwindow; + m_mainWidget = (WXWindow) xwindow; wxAddWindowToTable( xwindow, (wxWindow*) this ); XSetTransientForHint( xdisplay, xwindow, xparent ); @@ -106,7 +110,7 @@ void wxPopupWindow::DoSetSize( int x, int y, int width, int height, int sizeFlag bool wxPopupWindow::Show( bool show ) { - return wxWindow11::Show( show ); + return wxWindowX11::Show( show ); } #endif // wxUSE_POPUPWIN diff --git a/src/x11/toplevel.cpp b/src/x11/toplevel.cpp index c958328cef..59b2ee7479 100644 --- a/src/x11/toplevel.cpp +++ b/src/x11/toplevel.cpp @@ -103,7 +103,7 @@ bool wxTopLevelWindowX11::Create(wxWindow *parent, Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y, 0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes ); - m_mainWindow = (WXWindow) xwindow; + m_mainWidget = (WXWindow) xwindow; XSelectInput( xdisplay, xwindow, ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | @@ -246,14 +246,14 @@ void wxTopLevelWindowX11::SetIcon(const wxIcon& icon) if (icon.Ok() && GetMainWindow()) { XWMHints *wmHints = XAllocWMHints(); - wmHints.icon_pixmap = (Pixmap) icon.GetPixmap(); + wmHints->icon_pixmap = (Pixmap) icon.GetPixmap(); - wmHints.flags = IconPixmapHint; + wmHints->flags = IconPixmapHint; if (icon.GetMask()) { - wmHints.flags |= IconMaskHint; - wmHints.icon_mask = (Pixmap) icon.GetMask()->GetPixmap(); + wmHints->flags |= IconMaskHint; + wmHints->icon_mask = (Pixmap) icon.GetMask()->GetPixmap(); } XSetWMHints(wxGlobalDisplay(), (Window) GetMainWindow(), @@ -320,7 +320,7 @@ struct MwmHints { // given wxWindows style bool wxSetWMDecorations(Window w, long style) { - if (!MWMIsRunning(w)) + if (!wxMWMIsRunning(w)) return FALSE; Atom mwm_wm_hints = XInternAtom(wxGlobalDisplay(),"_MOTIF_WM_HINTS", False); @@ -374,7 +374,7 @@ bool wxSetWMDecorations(Window w, long style) XChangeProperty(wxGlobalDisplay(), w, - mwm_wm_hints, mem_wm_hints, + mwm_wm_hints, mwm_wm_hints, 32, PropModeReplace, (unsigned char *) &hints, PROP_MOTIF_WM_HINTS_ELEMENTS); @@ -401,4 +401,4 @@ bool wxMWMIsRunning(Window w) return (ret == Success); } - \ No newline at end of file + diff --git a/src/x11/window.cpp b/src/x11/window.cpp index c7dc89cd39..d20a6b9190 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -216,7 +216,7 @@ void wxWindowX11::SetFocus() XWMHints wmhints; wmhints.flags = InputHint; wmhints.input = True; - XSetWMHints(wxGlobalDisplay(), wMain, &wmhints) + XSetWMHints(wxGlobalDisplay(), wMain, &wmhints); } } @@ -326,7 +326,6 @@ void wxWindowX11::DoCaptureMouse() res = XGrabKeyboard(wxGlobalDisplay(), (Window) GetMainWindow(), FALSE, - ShiftMask, LockMask, Control-Mask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, and Mod5Mask., GrabModeAsync, GrabModeAsync, CurrentTime); @@ -1311,7 +1310,7 @@ bool wxWindowX11::SetBackgroundColour(const wxColour& col) return FALSE; XSetWindowAttributes attrib; - attrib.background_pixel = col.AllocColour(wxGlobalDisplay()); + attrib.background_pixel = ((wxColour&)col).AllocColour(wxGlobalDisplay()); XChangeWindowAttributes(wxGlobalDisplay(), (Window) GetMainWindow(),