From f0cd76b3a548d0b828601a5b3ebc22d0f7d985be Mon Sep 17 00:00:00 2001 From: zeljko Date: Thu, 8 Dec 2011 17:16:47 +0000 Subject: [PATCH] Qt: removed usage of slow QApplication_syncX() when showing forms, all X11 code merged into one ifdef inside ShowHide(). git-svn-id: trunk@34051 - --- lcl/interfaces/qt/qtwsforms.pp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/lcl/interfaces/qt/qtwsforms.pp b/lcl/interfaces/qt/qtwsforms.pp index 1282f709ad..0a7ba5cec5 100644 --- a/lcl/interfaces/qt/qtwsforms.pp +++ b/lcl/interfaces/qt/qtwsforms.pp @@ -476,23 +476,28 @@ begin {$IFDEF HASX11} if AWinControl.HandleObjectShouldBeVisible and - (fsModal in TForm(AWinControl).FormState) then + not (csDesigning in TForm(AWinControl).ComponentState) and + (TForm(AWinControl).FormStyle <> fsMDIChild) then begin - if (Application.TaskBarBehavior <> tbSingleButton) then + if (fsModal in TForm(AWinControl).FormState) then begin - SetSkipX11Taskbar(Widget.Widget, True); - Widget.setShowInTaskBar(False); + if (Application.TaskBarBehavior <> tbSingleButton) then + begin + SetSkipX11Taskbar(Widget.Widget, True); + Widget.setShowInTaskBar(False); + end; + if (QtWidgetSet.WindowManagerName = 'metacity') then + X11Raise(QWidget_winID(Widget.Widget)); + end else + if (TForm(AWinControl).FormStyle = fsSplash) then + begin + //process only qt sys events + QCoreApplication_processEvents(QEventLoopExcludeUserInputEvents); + //now send repaint to splash form + QWidget_repaint(Widget.Widget); end; - if (QtWidgetSet.WindowManagerName = 'metacity') then - X11Raise(QWidget_winID(Widget.Widget)); end; {$ENDIF} - - {$IFDEF HASX11} - if (QtVersionMajor = 4) and (QtVersionMinor >= 6) - and (TForm(AWinControl).FormStyle <> fsMDIChild) then - QApplication_syncX(); - {$ENDIF} end; {------------------------------------------------------------------------------