Typos and other fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -150,6 +150,10 @@
|
|||||||
|
|
||||||
#include "wx/cmdproc.h"
|
#include "wx/cmdproc.h"
|
||||||
|
|
||||||
|
#if wxUSE_CLIPBOARD
|
||||||
|
#include "wx/dataobj.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// turn extra wxTextCtrl-specific debugging on/off
|
// turn extra wxTextCtrl-specific debugging on/off
|
||||||
#define WXDEBUG_TEXT
|
#define WXDEBUG_TEXT
|
||||||
|
|
||||||
|
@@ -349,7 +349,7 @@ void wxApp::ProcessXEvent(WXEvent* _event)
|
|||||||
|
|
||||||
if (event->xclient.message_type == wm_protocols)
|
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)
|
if (win)
|
||||||
{
|
{
|
||||||
|
@@ -19,6 +19,8 @@
|
|||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
|
|
||||||
#include "wx/x11/private.h"
|
#include "wx/x11/private.h"
|
||||||
|
#include "X11/Xatom.h"
|
||||||
|
#include "X11/Xutil.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxPopupWindow
|
// wxPopupWindow
|
||||||
@@ -62,7 +64,9 @@ bool wxPopupWindow::Create( wxWindow *parent, int style )
|
|||||||
xattributes.border_pixel = BlackPixel( xdisplay, xscreen );
|
xattributes.border_pixel = BlackPixel( xdisplay, xscreen );
|
||||||
xattributes.override_redirect = False;
|
xattributes.override_redirect = False;
|
||||||
|
|
||||||
Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y,
|
wxSize size(2, 2);
|
||||||
|
|
||||||
|
Window xwindow = XCreateWindow( xdisplay, xparent, 0, 0, size.x, size.y,
|
||||||
0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
|
0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
|
||||||
|
|
||||||
XSelectInput( xdisplay, xwindow,
|
XSelectInput( xdisplay, xwindow,
|
||||||
@@ -71,7 +75,7 @@ bool wxPopupWindow::Create( wxWindow *parent, int style )
|
|||||||
KeymapStateMask | FocusChangeMask | ColormapChangeMask | StructureNotifyMask |
|
KeymapStateMask | FocusChangeMask | ColormapChangeMask | StructureNotifyMask |
|
||||||
PropertyChangeMask );
|
PropertyChangeMask );
|
||||||
|
|
||||||
m_mainWindow = (WXWindow) xwindow;
|
m_mainWidget = (WXWindow) xwindow;
|
||||||
wxAddWindowToTable( xwindow, (wxWindow*) this );
|
wxAddWindowToTable( xwindow, (wxWindow*) this );
|
||||||
|
|
||||||
XSetTransientForHint( xdisplay, xwindow, xparent );
|
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 )
|
bool wxPopupWindow::Show( bool show )
|
||||||
{
|
{
|
||||||
return wxWindow11::Show( show );
|
return wxWindowX11::Show( show );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_POPUPWIN
|
#endif // wxUSE_POPUPWIN
|
||||||
|
@@ -103,7 +103,7 @@ bool wxTopLevelWindowX11::Create(wxWindow *parent,
|
|||||||
|
|
||||||
Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y,
|
Window xwindow = XCreateWindow( xdisplay, xparent, pos.x, pos.y, size.x, size.y,
|
||||||
0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
|
0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
|
||||||
m_mainWindow = (WXWindow) xwindow;
|
m_mainWidget = (WXWindow) xwindow;
|
||||||
|
|
||||||
XSelectInput( xdisplay, xwindow,
|
XSelectInput( xdisplay, xwindow,
|
||||||
ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
|
ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
|
||||||
@@ -246,14 +246,14 @@ void wxTopLevelWindowX11::SetIcon(const wxIcon& icon)
|
|||||||
if (icon.Ok() && GetMainWindow())
|
if (icon.Ok() && GetMainWindow())
|
||||||
{
|
{
|
||||||
XWMHints *wmHints = XAllocWMHints();
|
XWMHints *wmHints = XAllocWMHints();
|
||||||
wmHints.icon_pixmap = (Pixmap) icon.GetPixmap();
|
wmHints->icon_pixmap = (Pixmap) icon.GetPixmap();
|
||||||
|
|
||||||
wmHints.flags = IconPixmapHint;
|
wmHints->flags = IconPixmapHint;
|
||||||
|
|
||||||
if (icon.GetMask())
|
if (icon.GetMask())
|
||||||
{
|
{
|
||||||
wmHints.flags |= IconMaskHint;
|
wmHints->flags |= IconMaskHint;
|
||||||
wmHints.icon_mask = (Pixmap) icon.GetMask()->GetPixmap();
|
wmHints->icon_mask = (Pixmap) icon.GetMask()->GetPixmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
XSetWMHints(wxGlobalDisplay(), (Window) GetMainWindow(),
|
XSetWMHints(wxGlobalDisplay(), (Window) GetMainWindow(),
|
||||||
@@ -320,7 +320,7 @@ struct MwmHints {
|
|||||||
// given wxWindows style
|
// given wxWindows style
|
||||||
bool wxSetWMDecorations(Window w, long style)
|
bool wxSetWMDecorations(Window w, long style)
|
||||||
{
|
{
|
||||||
if (!MWMIsRunning(w))
|
if (!wxMWMIsRunning(w))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
Atom mwm_wm_hints = XInternAtom(wxGlobalDisplay(),"_MOTIF_WM_HINTS", False);
|
Atom mwm_wm_hints = XInternAtom(wxGlobalDisplay(),"_MOTIF_WM_HINTS", False);
|
||||||
@@ -374,7 +374,7 @@ bool wxSetWMDecorations(Window w, long style)
|
|||||||
|
|
||||||
XChangeProperty(wxGlobalDisplay(),
|
XChangeProperty(wxGlobalDisplay(),
|
||||||
w,
|
w,
|
||||||
mwm_wm_hints, mem_wm_hints,
|
mwm_wm_hints, mwm_wm_hints,
|
||||||
32, PropModeReplace,
|
32, PropModeReplace,
|
||||||
(unsigned char *) &hints, PROP_MOTIF_WM_HINTS_ELEMENTS);
|
(unsigned char *) &hints, PROP_MOTIF_WM_HINTS_ELEMENTS);
|
||||||
|
|
||||||
|
@@ -216,7 +216,7 @@ void wxWindowX11::SetFocus()
|
|||||||
XWMHints wmhints;
|
XWMHints wmhints;
|
||||||
wmhints.flags = InputHint;
|
wmhints.flags = InputHint;
|
||||||
wmhints.input = True;
|
wmhints.input = True;
|
||||||
XSetWMHints(wxGlobalDisplay(), wMain, &wmhints)
|
XSetWMHints(wxGlobalDisplay(), wMain, &wmhints);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,7 +326,6 @@ void wxWindowX11::DoCaptureMouse()
|
|||||||
|
|
||||||
res = XGrabKeyboard(wxGlobalDisplay(), (Window) GetMainWindow(),
|
res = XGrabKeyboard(wxGlobalDisplay(), (Window) GetMainWindow(),
|
||||||
FALSE,
|
FALSE,
|
||||||
ShiftMask, LockMask, Control-Mask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, and Mod5Mask.,
|
|
||||||
GrabModeAsync,
|
GrabModeAsync,
|
||||||
GrabModeAsync,
|
GrabModeAsync,
|
||||||
CurrentTime);
|
CurrentTime);
|
||||||
@@ -1311,7 +1310,7 @@ bool wxWindowX11::SetBackgroundColour(const wxColour& col)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
XSetWindowAttributes attrib;
|
XSetWindowAttributes attrib;
|
||||||
attrib.background_pixel = col.AllocColour(wxGlobalDisplay());
|
attrib.background_pixel = ((wxColour&)col).AllocColour(wxGlobalDisplay());
|
||||||
|
|
||||||
XChangeWindowAttributes(wxGlobalDisplay(),
|
XChangeWindowAttributes(wxGlobalDisplay(),
|
||||||
(Window) GetMainWindow(),
|
(Window) GetMainWindow(),
|
||||||
|
Reference in New Issue
Block a user