mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
Changed a way how caret is painted in X11 - results in more snappy feeling
git-svn-id: svn://ultimatepp.org/upp/trunk@813 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5ae5f1ff31
commit
4200943fba
6 changed files with 43 additions and 75 deletions
|
|
@ -278,7 +278,21 @@ void Ctrl::DefferedFocusSync()
|
|||
}
|
||||
}
|
||||
|
||||
void Ctrl::RefreshCaret()
|
||||
{
|
||||
if(caretCtrl)
|
||||
caretCtrl->Refresh(caretCtrl->caretx, caretCtrl->carety,
|
||||
caretCtrl->caretcx, caretCtrl->caretcy);
|
||||
}
|
||||
|
||||
void Ctrl::SyncCaret() {
|
||||
#ifdef PLATFORM_X11
|
||||
if(focusCtrl != caretCtrl) {
|
||||
RefreshCaret();
|
||||
caretCtrl = focusCtrl;
|
||||
RefreshCaret();
|
||||
}
|
||||
#else
|
||||
Rect cr;
|
||||
cr.Clear();
|
||||
if(focusCtrl && focusCtrl->IsVisible()) {
|
||||
|
|
@ -301,6 +315,7 @@ void Ctrl::SyncCaret() {
|
|||
caretCtrl = focusCtrl;
|
||||
caretRect = cr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Ctrl *Ctrl::GetActiveWindow()
|
||||
|
|
|
|||
Loading…
Reference in a new issue