mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:20:46 +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
|
if (w = nil) and (QApplication_mouseButtons() > 0) then
|
||||||
w := QApplication_focusWidget()
|
w := QApplication_focusWidget()
|
||||||
else
|
else
|
||||||
if w <> QWidget_mouseGrabber then
|
if (w <> QWidget_mouseGrabber) and (QWidget_mouseGrabber <> nil) then
|
||||||
w := QWidget_mouseGrabber;
|
w := QWidget_mouseGrabber;
|
||||||
|
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -5014,8 +5014,7 @@ begin
|
|||||||
if Result then
|
if Result then
|
||||||
begin
|
begin
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
if (w is TQtMainWindow) or
|
if (w is TQtMainWindow) then
|
||||||
(w.ChildOfComplexWidget in [ccwCustomControl, ccwScrollingWinControl]) then
|
|
||||||
w.releaseMouse()
|
w.releaseMouse()
|
||||||
else
|
else
|
||||||
windows.ReleaseCapture;
|
windows.ReleaseCapture;
|
||||||
@ -5450,11 +5449,7 @@ begin
|
|||||||
if IsValidHandle(AHandle) then
|
if IsValidHandle(AHandle) then
|
||||||
begin
|
begin
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
if TQtWidget(AHandle).ChildOfComplexWidget in
|
Windows.SetCapture(QWidget_winID(TQtWidget(AHandle).Widget));
|
||||||
[ccwCustomControl, ccwScrollingWinControl] then
|
|
||||||
TQtWidget(AHandle).grabMouse()
|
|
||||||
else
|
|
||||||
Windows.SetCapture(AHandle);
|
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
TQtWidget(AHandle).grabMouse();
|
TQtWidget(AHandle).grabMouse();
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
Loading…
Reference in New Issue
Block a user