Recent

Author Topic: Qt5 and Showmodal  (Read 617 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2280
    • tomboy-ng, a rewrite of the classic Tomboy
Qt5 and Showmodal
« on: November 14, 2022, 03:49:52 am »
I am intensely embarrassed about this, I am sure its so obvious it cannot be a bug but I cannot see what I am doing wrong !

In Qt5 (and I am pretty sure, Qt6) on Linux, Lazarus 2.2.0rc2 and Lazarus Main, if a form is showmodal, it looses its buttons from across the top, particularly, Minimise, Mazimise and Close.

Its fine under GTK2 and its fine if its a Show rather than Showmodal. Can anyone else replicate ?

Just two forms, ShowModal the second one from the main one, with a button or from FormShow. See image.

Davo
« Last Edit: November 14, 2022, 09:30:52 am by dbannon »
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

jujibo

  • Full Member
  • ***
  • Posts: 113
Re: Qt5 and Showmodal
« Reply #1 on: November 14, 2022, 09:18:50 am »
I have seen this for a long time.
It works for Gnome and KDE (Plasma).
This fails on Cinnamon and Mate.

I don't know if this happens on other desktops as well.

In this case, it loses Minimize and Maximize buttons.

Attached image is on Cinnamon
« Last Edit: November 14, 2022, 09:21:11 am by jujibo »

zeljko

  • Hero Member
  • *****
  • Posts: 1381
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt5 and Showmodal
« Reply #2 on: November 14, 2022, 09:39:43 am »
Seen that already long time ago, but didn't investigate. What distro do you use ? Is it wayland or x11 ?

jujibo

  • Full Member
  • ***
  • Posts: 113
Re: Qt5 and Showmodal
« Reply #3 on: November 14, 2022, 09:56:13 am »
Seen that already long time ago, but didn't investigate. What distro do you use ? Is it wayland or x11 ?

In my case I it works on Gnome (Wayland and Xorg) and Plasma (Xorg).
It fails on Cinnamon and Mate (XOrg).
Running Debian 11 amd64.

dbannon

  • Hero Member
  • *****
  • Posts: 2280
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Qt5 and Showmodal
« Reply #4 on: November 14, 2022, 11:32:01 am »
A mystery indeed.

I found all three buttons missing on U2004 Mate, Ubuntu Testing Mate (a VM).

And two missing, Minimize and Maximize missing but the Close one there on another U2004 Mate.  So, now I wonder if it somehow relates to desktop settings ?

I'm about to embark on a series of pre-release tests on a number of VM, I let you know what I find.

But the bad news is, same problem with Qt6 !

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

zeljko

  • Hero Member
  • *****
  • Posts: 1381
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt5 and Showmodal
« Reply #5 on: November 14, 2022, 05:50:55 pm »
Does it work with xfce ?

jujibo

  • Full Member
  • ***
  • Posts: 113
Re: Qt5 and Showmodal
« Reply #6 on: November 14, 2022, 06:49:23 pm »
Does it work with xfce ?

Yes, it works.

zeljko

  • Hero Member
  • *****
  • Posts: 1381
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt5 and Showmodal
« Reply #7 on: November 14, 2022, 07:08:13 pm »
Ok, thanks, I'll install mate to check if it's fixable inside WS.

jujibo

  • Full Member
  • ***
  • Posts: 113
Re: Qt5 and Showmodal
« Reply #8 on: November 14, 2022, 07:59:51 pm »
IIRC this isn't only related to Lazarus applications. It happens to other QT aplications too.

zeljko

  • Hero Member
  • *****
  • Posts: 1381
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt5 and Showmodal
« Reply #9 on: November 14, 2022, 08:16:02 pm »
Yes, not lazarus issue. Just tested mate under Fedora 35 and it's same as jujibo said. There's no min/max buttons, only close button.
Mate uses "metacity (marco)" as window manager, so fork of metacity. Pure metacity have all buttons.

dbannon

  • Hero Member
  • *****
  • Posts: 2280
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Qt5 and Showmodal
« Reply #10 on: November 15, 2022, 01:09:52 am »
Hmm, be careful, there are two issues going on here. When we see just one, Close button, that by design.

Gnome desktops don't have the minimize and maximize buttons on any windows any more. Its because they think too many things like buttons will confuse their users.  So, on Gnome, its only ever the Close button.

I found that all the KDE/Plasma show all three, Linux Mint showed all three using Cinnamon with XFCe.  So, I added Mate to the Linux Mint install and when running Mate, no buttons !

So, no question its a Mate or at least upstream of where we play, issue !

In my app, its rare that I trigger the situation, I have just added a standalone Close button to that (for this release) but I think its needs chasing one way or another.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

 

TinyPortal © 2005-2018