Gtk3: check if GetCapture works ok.

This commit is contained in:
zeljan1 2025-01-21 13:37:23 +01:00
parent 86bba40f39
commit c52971d599

View File

@ -1831,8 +1831,14 @@ begin
end;
function TGtk3WidgetSet.GetCapture: HWND;
var
W:PGtkWidget;
begin
Result := HwndFromGtkWidget(gtk_grab_get_current);
W := gtk_grab_get_current;
Result := HwndFromGtkWidget(W);
//debug
if (Result = 0) and (W <> nil) and Gtk3IsWidget(W) then
DebugLn('WARNING: TGtk3WidgetSet.GetCapture returned wrong result grabber is: ',g_type_name(W^.g_type_instance.g_class^.g_type),' please report a bug.');
{$IFDEF VerboseGtk3WinApi}
DebugLn('TGtk3WidgetSet.GetCapture ',dbgHex(Result));
{$ENDIF}