Recent

Author Topic: QuestionDlg opened under ShowModal form  (Read 3501 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 16145
  • Censorship about opinions does not belong here.
Re: QuestionDlg opened under ShowModal form
« Reply #15 on: June 15, 2024, 02:17:34 pm »
Zoran, what I suggested works on most. The Parent and Owner are important, because if the owner is the mainform the extra dialog gets hidden, but if the owner is the modal form, the dialog is shown on top of that, bypassing the mainform. You have to do that in code, including the dialog creation.
If I smell bad code it usually is bad code and that includes my own code.

Zoran

  • Hero Member
  • *****
  • Posts: 1882
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: QuestionDlg opened under ShowModal form
« Reply #16 on: June 15, 2024, 06:54:19 pm »
Zoran, what I suggested works on most. The Parent and Owner are important, because if the owner is the mainform the extra dialog gets hidden, but if the owner is the modal form, the dialog is shown on top of that, bypassing the mainform. You have to do that in code, including the dialog creation.

I don't have relevant system to test at the moment, but I remember that setting PopupParent property of the form-to-be-shown to the currently shown modal form, together with PopupMode set to pmExplicit helped sometimes. These properties should be set before the form is shown.
Even that could not help in some window managers.

So, I think that what you mention as the Owner here is not the Owner property (from component creation system), but the form to which PopupParent is set. I might be wrong though.

Yurgenz

  • New Member
  • *
  • Posts: 20
Re: QuestionDlg opened under ShowModal form
« Reply #17 on: June 18, 2024, 12:44:51 am »
Thank you, Zoran!
I changed the test project (show non-modal forms) - added the choice of StayOnTop or PopupMode. StayOnTop works more reliably on XFCE:xfwm4.
Can someone check it out on other Linux configurations? I am interested in whether it is possible to hide the dialog under the form so that it does not go up, on whatever form you click.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8007
Re: QuestionDlg opened under ShowModal form
« Reply #18 on: June 21, 2024, 09:11:10 am »
Thank you, Zoran!
I changed the test project (show non-modal forms) - added the choice of StayOnTop or PopupMode. StayOnTop works more reliably on XFCE:xfwm4.
Can someone check it out on other Linux configurations? I am interested in whether it is possible to hide the dialog under the form so that it does not go up, on whatever form you click.

Superficially, that's OK on Debian 12 with KDE compiled with the defaults (GTK2?).

Don't have XFCE etc. conveniently to hand.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MarkMLl

  • Hero Member
  • *****
  • Posts: 8007
Re: QuestionDlg opened under ShowModal form
« Reply #19 on: June 23, 2024, 02:06:34 pm »
I think I might have come across an interesting example of this sort of problem in the Lazarus v2 IDE itself, at least under Linux+KDE+X11.

If you're running a program (waiting for any exceptions etc.) using the IDE you can edit the sourcecode without problems.

If you try to create a TODO however you appear to get locked into the (modal) TODO editor, with no alternative but to kill the IDE hence lose your debugging session.

I won't raise it as an issue until I've checked the current version.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018