diff --git a/src/msw/caret.cpp b/src/msw/caret.cpp index daf68049e9..6dd4f3ccec 100644 --- a/src/msw/caret.cpp +++ b/src/msw/caret.cpp @@ -158,7 +158,10 @@ void wxCaret::DoMove() wxASSERT_MSG( wxWindow::FindFocus() == GetWindow(), wxT("how did we lose focus?") ); - CALL_CARET_API(SetCaretPos, (m_x, m_y)); + // for compatibility with the generic version, the coordinates are + // client ones + wxPoint pt = GetWindow()->GetClientAreaOrigin(); + CALL_CARET_API(SetCaretPos, (m_x + pt.x, m_y + pt.y)); } //else: we don't have caret right now, nothing to do (this does happen) } diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index a39bad8a68..3e385052cb 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -71,6 +71,10 @@ void wxTextCtrl::Init() m_isEditable = TRUE; m_ofsHorz = 0; + + m_curPos = + m_curRow = + m_curLine = 0; } bool wxTextCtrl::Create(wxWindow *parent, @@ -90,7 +94,9 @@ bool wxTextCtrl::Create(wxWindow *parent, // FIXME use renderer wxCaret *caret = new wxCaret(this, 1, GetCharHeight()); +#ifndef __WXMSW__ caret->SetBlinkTime(0); +#endif // __WXMSW__ SetCaret(caret); SetCursor(wxCURSOR_IBEAM); diff --git a/src/univ/themes/gtk.cpp b/src/univ/themes/gtk.cpp index 52b0348053..9395cc98c5 100644 --- a/src/univ/themes/gtk.cpp +++ b/src/univ/themes/gtk.cpp @@ -17,7 +17,7 @@ // headers // --------------------------------------------------------------------------- -// For compilers that support precompilation, includes "wx.h". +// for compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -40,8 +40,11 @@ #include "wx/univ/colschem.h" #include "wx/univ/theme.h" -// define this for tons of debugging messages -#undef DEBUG_MOUSE +// ---------------------------------------------------------------------------- +// constants (to be removed) +// ---------------------------------------------------------------------------- + +static const wxCoord BORDER_THICKNESS = 10; // ---------------------------------------------------------------------------- // wxGTKRenderer: draw the GUI elements in GTK style @@ -676,12 +679,14 @@ void wxGTKRenderer::DrawBorder(wxDC& dc, int WXUNUSED(flags), wxRect *rectIn) { + size_t width; + wxRect rect = rectTotal; switch ( border ) { case wxBORDER_SUNKEN: - for ( int width = 0; width < 10; width++ ) + for ( width = 0; width < BORDER_THICKNESS; width++ ) { DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); DrawShadedRect(dc, &rect, m_penBlack, m_penLightGrey); @@ -693,8 +698,10 @@ void wxGTKRenderer::DrawBorder(wxDC& dc, break; case wxBORDER_RAISED: - for ( int width = 0; width < 10; width++ ) + for ( width = 0; width < BORDER_THICKNESS; width++ ) + { DrawRaisedBorder(dc, &rect); + } break; case wxBORDER_DOUBLE: diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 61fa2cd563..75f6188bb0 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -170,10 +170,10 @@ public: virtual wxRect GetTextTotalArea(const wxTextCtrl *text, const wxRect& rect) - { return rect; } + { wxRect rectTotal = rect; rectTotal.Inflate(1); return rectTotal; } virtual wxRect GetTextClientArea(const wxTextCtrl *text, const wxRect& rect) - { return rect; } + { wxRect rectText = rect; rectText.Inflate(-1); return rectText; } protected: // common part of DrawLabel() and DrawItem() diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 95a70c77d2..5fefce8a89 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -205,6 +205,13 @@ void wxWindow::OnPaint(wxPaintEvent& event) bool wxWindow::DoDrawBackground(wxDC& dc) { wxRect rect = GetUpdateRegion().GetBox(); + if ( !rect.width && !rect.height ) + { + wxSize size = GetSize(); + rect.width = size.x; + rect.height = size.y; + } + if ( GetBackgroundBitmap().Ok() ) { // get the bitmap and the flags