From 64d1536bb447561a8e37a50e85f5d14df8d5550a Mon Sep 17 00:00:00 2001 From: zeljko Date: Tue, 5 Aug 2008 12:32:27 +0000 Subject: [PATCH] Qt: TQtCaret is more responsive now, added high priority to postEvent() for OnWakeMainThread() and PostMessage(). git-svn-id: trunk@15957 - --- lcl/interfaces/qt/qtcaret.pas | 10 ++++++++-- lcl/interfaces/qt/qtobject.inc | 2 +- lcl/interfaces/qt/qtwinapi.inc | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lcl/interfaces/qt/qtcaret.pas b/lcl/interfaces/qt/qtcaret.pas index 0c86658e72..18ef2e8efd 100644 --- a/lcl/interfaces/qt/qtcaret.pas +++ b/lcl/interfaces/qt/qtcaret.pas @@ -374,12 +374,18 @@ end; procedure TEmulatedCaret.Lock; begin - EnterCriticalSection(FCritSect); + {$note TEmulatedCaret.Lock() + remove this routine later, after + testing on all platforms} + // EnterCriticalSection(FCritSect); end; procedure TEmulatedCaret.Unlock; begin - LeaveCriticalSection(FCritSect); + {$note TEmulatedCaret.UnLock() + remove this routine later, after + testing on all platforms} + // LeaveCriticalSection(FCritSect); end; function TEmulatedCaret.CreateColorPixmap(Color: PtrUInt): QPixmapH; diff --git a/lcl/interfaces/qt/qtobject.inc b/lcl/interfaces/qt/qtobject.inc index fa2af754ed..c26055873c 100644 --- a/lcl/interfaces/qt/qtobject.inc +++ b/lcl/interfaces/qt/qtobject.inc @@ -356,7 +356,7 @@ var Event: QEventH; begin Event := QEvent_create(LCLQt_CheckSynchronize); - QCoreApplication_postEvent(QCoreApplication_instance(), Event); + QCoreApplication_postEvent(QCoreApplication_instance(), Event, 1 {high priority}); end; function TQtWidgetSet.LCLPlatform: TLCLPlatform; diff --git a/lcl/interfaces/qt/qtwinapi.inc b/lcl/interfaces/qt/qtwinapi.inc index a3756df0c6..b193d6575e 100644 --- a/lcl/interfaces/qt/qtwinapi.inc +++ b/lcl/interfaces/qt/qtwinapi.inc @@ -3639,7 +3639,7 @@ begin if Handle <> 0 then begin Event := QLCLMessageEvent_create(QEventLCLMessage, Msg, wParam, lParam, 0); - QCoreApplication_postEvent(Widget.Widget, Event); + QCoreApplication_postEvent(Widget.Widget, Event, 1 {high priority}); Result := True; end; end;