X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c3e0999b06defc9055adbc54e222af8bc10b8691..404b319a85dadd7decf7a5a5331020520031a41c:/src/stc/ScintillaWX.cpp diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 7433b1d641..9077933669 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -132,7 +132,7 @@ public: void OnPaint(wxPaintEvent& WXUNUSED(evt)) { wxAutoBufferedPaintDC dc(this); - Surface* surfaceWindow = Surface::Allocate(); + Surface* surfaceWindow = Surface::Allocate(0); surfaceWindow->Init(&dc, m_ct->wDraw.GetID()); m_ct->PaintCT(surfaceWindow); surfaceWindow->Release(); @@ -364,7 +364,6 @@ bool ScintillaWX::HaveMouseCapture() { void ScintillaWX::ScrollText(int linesToMove) { int dy = vs.lineHeight * (linesToMove); stc->ScrollWindow(0, dy); - stc->Update(); } void ScintillaWX::SetVerticalScrollPos() { @@ -672,6 +671,8 @@ sptr_t ScintillaWX::DefWndProc(unsigned int /*iMessage*/, uptr_t /*wParam*/, spt sptr_t ScintillaWX::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { switch (iMessage) { +#if 0 // TODO: check this + case SCI_CALLTIPSHOW: { // NOTE: This is copied here from scintilla/src/ScintillaBase.cxx // because of the little tweak that needs done below for wxGTK. @@ -712,6 +713,7 @@ sptr_t ScintillaWX::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) ct.wCallTip.Show(); break; } +#endif #ifdef SCI_LEXER case SCI_LOADLEXERLIBRARY: @@ -746,8 +748,16 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { if (paintState == paintAbandoned) { // Painting area was insufficient to cover new styling or brace - // highlight positions + // highlight positions. So trigger a new paint event that will + // repaint the whole window. + stc->Refresh(false); + +#if defined(__WXOSX__) + // On Mac we also need to finish the current paint to make sure that + // everything is on the screen that needs to be there between now and + // when the next paint event arrives. FullPaintDC(dc); +#endif } paintState = notPainting; } @@ -755,8 +765,8 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { // Force the whole window to be repainted void ScintillaWX::FullPaint() { - wxClientDC dc(stc); - FullPaintDC(&dc); + stc->Refresh(false); + stc->Update(); } @@ -827,7 +837,7 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta, int lines; if (ctrlDown) { // Zoom the fonts if Ctrl key down - if (rotation < 0) { + if (rotation > 0) { KeyCommand(SCI_ZOOMIN); } else { @@ -991,7 +1001,7 @@ int ScintillaWX::DoKeyDown(const wxKeyEvent& evt, bool* consumed) case WXK_CONTROL: key = 0; break; case WXK_ALT: key = 0; break; case WXK_SHIFT: key = 0; break; - case WXK_MENU: key = 0; break; + case WXK_MENU: key = SCK_MENU; break; } #ifdef __WXMAC__