mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 11:18:22 +02:00
Qt: fixed wrong SetCapture() under win32. Problem was passed TQtWidget handle instead of underlaying widget winID() which is native handle.
git-svn-id: trunk@37451 -
This commit is contained in:
parent
fb9c855546
commit
d182302cc7
@ -2433,7 +2433,7 @@ begin
|
||||
if (w = nil) and (QApplication_mouseButtons() > 0) then
|
||||
w := QApplication_focusWidget()
|
||||
else
|
||||
if w <> QWidget_mouseGrabber then
|
||||
if (w <> QWidget_mouseGrabber) and (QWidget_mouseGrabber <> nil) then
|
||||
w := QWidget_mouseGrabber;
|
||||
|
||||
{$ELSE}
|
||||
@ -5014,8 +5014,7 @@ begin
|
||||
if Result then
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
if (w is TQtMainWindow) or
|
||||
(w.ChildOfComplexWidget in [ccwCustomControl, ccwScrollingWinControl]) then
|
||||
if (w is TQtMainWindow) then
|
||||
w.releaseMouse()
|
||||
else
|
||||
windows.ReleaseCapture;
|
||||
@ -5450,11 +5449,7 @@ begin
|
||||
if IsValidHandle(AHandle) then
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
if TQtWidget(AHandle).ChildOfComplexWidget in
|
||||
[ccwCustomControl, ccwScrollingWinControl] then
|
||||
TQtWidget(AHandle).grabMouse()
|
||||
else
|
||||
Windows.SetCapture(AHandle);
|
||||
Windows.SetCapture(QWidget_winID(TQtWidget(AHandle).Widget));
|
||||
{$ELSE}
|
||||
TQtWidget(AHandle).grabMouse();
|
||||
{$ENDIF}
|
||||
|
Loading…
Reference in New Issue
Block a user