Qt, Qt5: make interface snappy under x11 after menuitem triggered.

git-svn-id: trunk@54137 -
This commit is contained in:
zeljko 2017-02-11 10:28:29 +00:00
parent 4064104009
commit a05c58ebb1
2 changed files with 30 additions and 0 deletions

View File

@ -16270,6 +16270,21 @@ begin
case QEvent_type(Event) of
LCLQt_PopupMenuTriggered:
begin
{$IFDEF HASX11}
// make interface snappy after menuitem triggers
if Assigned(Application) and not Application.Terminated then
begin
if QApplication_activePopupWidget = nil then
begin
if QApplication_activeModalWidget <> nil then
QWidget_repaint(QApplication_activeModalWidget)
else
if QApplication_activeWindow <> nil then
QWidget_repaint(QApplication_activeWindow);
QCoreApplication_processEvents(QEventLoopAllEvents);
end;
end;
{$ENDIF}
FillChar(Msg{%H-}, SizeOf(Msg), 0);
Msg.msg := LM_ACTIVATE;
if MenuItemEnabled then

View File

@ -16350,6 +16350,21 @@ begin
case QEvent_type(Event) of
LCLQt_PopupMenuTriggered:
begin
{$IFDEF HASX11}
// make interface snappy after menuitem triggers
if Assigned(Application) and not Application.Terminated then
begin
if QApplication_activePopupWidget = nil then
begin
if QApplication_activeModalWidget <> nil then
QWidget_repaint(QApplication_activeModalWidget)
else
if QApplication_activeWindow <> nil then
QWidget_repaint(QApplication_activeWindow);
QCoreApplication_processEvents(QEventLoopAllEvents);
end;
end;
{$ENDIF}
FillChar(Msg{%H-}, SizeOf(Msg), 0);
Msg.msg := LM_ACTIVATE;
if MenuItemEnabled then