mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 03:31:19 +02:00
Qt, Qt5: make interface snappy under x11 after menuitem triggered.
git-svn-id: trunk@54137 -
This commit is contained in:
parent
4064104009
commit
a05c58ebb1
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user