mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 00:19:32 +02:00
Qt: fix focus patch, qtwin32 doesn'' like it.
git-svn-id: trunk@16283 -
This commit is contained in:
parent
f3be183c27
commit
a5bf37a4f3
@ -4168,8 +4168,17 @@ begin
|
||||
WriteLn('********* TQtWidgetSet.SetFocus INIT focusing ', TQtWidget(hwnd).lclobject.name);
|
||||
{$endif}
|
||||
result := GetFocus;
|
||||
if Result <> 0 then
|
||||
|
||||
{apply clearFocus only to X11 & Mac,
|
||||
qt win32 doesn't like this}
|
||||
{$IFDEF UNIX}
|
||||
if (Result <> 0) and not
|
||||
((TQtWidget(Hwnd) is TQtMainWindow) or
|
||||
(TQtWidget(Result) is TQtMainWindow))
|
||||
then
|
||||
QWidget_clearFocus(TQtWidget(Result).Widget);
|
||||
{$ENDIF}
|
||||
|
||||
TQtWidget(hWnd).setFocus;
|
||||
{$ifdef VerboseFocus}
|
||||
DebugLn('********* TQtWidgetSet.SetFocus END was %x now is %x',[result,hwnd]);
|
||||
|
Loading…
Reference in New Issue
Block a user