Running on (Debian) Linux on AMD64 or ARM, Lazarus 1.6.4 and FPC 3.0.2, I'm seeing different behaviour depending on whether a program uses Qt or GTK2. The program changes the hardware configuration of a mouse (Logitech G600) using hidraw, and as such needs to run with root privilege (e.g. kdesudo or sudo -E).

On the main form I've got (a tabbed notebook containing multiple instances of) a TStringGrid. The OnSelection event invokes a modal form (containing nothing of significant complexity) with OK and Cancel buttons, and stripped down looks like this:

procedure TFormLG600.StringGridMode1UnshiftedSelection(Sender: TObject; aCol, aRow: Integer);

begin
{...}
  if ButtonsAndKeys.ShowModal() = mrOk then begin
{...}
  end
end;

This is fine if built for Qt, but if built for GTK2 what I see is that after the modal form is exited any mouse activity over the grid appears to cause an erratic multicell selection and the modal form immediately pops up again. This is reproducible if the Cancel button is pressed, and in at least some cases after OK.

I've seen indeterminate discussion of this in the foramina, and have followed up the indicated wiki pages etc. Does anybody have any suggestions, preferably not along the lines of "don't use GTK2" since I was thinking of sticking this on Sourceforge and that restriction would probably be unpopular?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to