Recent

Author Topic: Qt5 dummy widget with size 75x32 is visible on app start  (Read 1868 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2365
    • UVviewsoft
Qt5 dummy widget with size 75x32 is visible on app start
« on: March 21, 2022, 09:10:38 pm »
Please see the description of the problem + youtube video.
I  found the Qt5 WS part which creates such a window: posted there to Github.

https://github.com/Alexey-T/CudaText/issues/4011

How can we avoid that tiny window?

AlexTP

  • Hero Member
  • *****
  • Posts: 2365
    • UVviewsoft
Re: Qt5 dummy widget with size 75x32 is visible on app start
« Reply #1 on: March 21, 2022, 09:14:57 pm »
Can we have new IFDEF for that dummy-window?
This place must be changed
Code: Pascal  [Select][+][-]
  1.   {$IFDEF HASX11}
  2.   if QtMainWindow.IsMainForm and not Application.HasOption('disableaccurateframe') then
  3.   begin
  4.     (*
  5.     AWindowManager := LowerCase(GetWindowManager);
  6.     //Kwin,Openbox,wmaker-common - ok
  7.     if Application.HasOption('hideaccurateframe') or not
  8.     ( (AWindowManager = 'kwin') or (AWindowManager = 'openbox') or (AWindowManager = 'wmaker-common') ) then
  9.       QtWidgetSet.CreateDummyWidgetFrame(AWinControl.Left, AWinControl.Top, AWinControl.Width, AWinControl.Height)
  10.     else
  11.     *)
  12.     QtWidgetSet.CreateDummyWidgetFrame(-1, -1, -1, -1); {only mentioned window managers literally move dummy widget out of screen - no flickering}
  13.   end;
  14.   {$ENDIF}

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Qt5 dummy widget with size 75x32 is visible on app start
« Reply #2 on: March 22, 2022, 12:23:55 am »
I cannot replicate this problem on a Debian Bullseye running KDE Plasma with the Qt5 version of tomboy-ng.  Is its OS specific ?  What OS are you testing on and do you know what OS your end user is using ?

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

AlexTP

  • Hero Member
  • *****
  • Posts: 2365
    • UVviewsoft
Re: Qt5 dummy widget with size 75x32 is visible on app start
« Reply #3 on: March 22, 2022, 10:44:23 am »
It is Window Manager specific. It is visible under configuration of GitHub user who reported it.

Plasma 5.24 in KDE Neon; KWin.
« Last Edit: March 22, 2022, 10:46:15 am by AlexTP »

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Qt5 dummy widget with size 75x32 is visible on app start
« Reply #4 on: March 22, 2022, 12:27:33 pm »
It must be more than Window Manager specific, my Debian KDE Plasma also uses KWin as Window Manager (of course, its the default).  So maybe specific to 5.24 ?

Apparently, I'm using KDE 5:20.5 (I say apparently because the version reported by synaptic is 5:111 but kwin gets 4:5.20.5-1 ??).   Anyway, Debian unstable, right now, does have 5.24, I will see if I can get it going ....

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

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Qt5 dummy widget with size 75x32 is visible on app start
« Reply #5 on: March 22, 2022, 01:39:16 pm »
No, no sign of the problem on Debian Unstable running KDE Plasma 5.24 when I use tomboy-ng to open a file from Dolphin.

So, its either a Neon specific thing or a CudeText specific thing. Do I have to install CudaText from Source ?   Or can you demonstrate the problem with a smaller app ?

(and, wow, did I find out why they call Debian Unstable 'unstable' !)

Davo

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

AlexTP

  • Hero Member
  • *****
  • Posts: 2365
    • UVviewsoft
Re: Qt5 dummy widget with size 75x32 is visible on app start
« Reply #6 on: March 22, 2022, 03:01:35 pm »
Quote
Do I have to install CudaText from Source ?   Or can you demonstrate the problem with a smaller app ?
I don't know - I don't have the problem on Ubuntu...

zeljko

  • Hero Member
  • *****
  • Posts: 1591
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt5 dummy widget with size 75x32 is visible on app start
« Reply #7 on: March 22, 2022, 04:25:35 pm »
Actually it can be visible on slow machine or slow virtual machine, there's cmd option where it can be disabled (-disableaccurateframe).

AlexTP

  • Hero Member
  • *****
  • Posts: 2365
    • UVviewsoft
Re: Qt5 dummy widget with size 75x32 is visible on app start
« Reply #8 on: March 22, 2022, 06:29:34 pm »
@zeljko
User confirmed (you can read the Github issue) that commandline option helps.
but anyway - I cannot recommend users of text editor to use this commandline option.
The separate IFDEF is needed.

AlexTP

  • Hero Member
  • *****
  • Posts: 2365
    • UVviewsoft
Re: Qt5 dummy widget with size 75x32 is visible on app start
« Reply #9 on: March 23, 2022, 02:51:57 pm »
@zeljko
What do you think about this user suggestion about detecting window frame size?
https://github.com/Alexey-T/CudaText/issues/4011#issuecomment-1074365091

zeljko

  • Hero Member
  • *****
  • Posts: 1591
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt5 dummy widget with size 75x32 is visible on app start
« Reply #10 on: March 24, 2022, 02:07:46 pm »
I think that guy does not understand exact problem. _NET_FRAME_EXTENTS can be used when an X window is mapped, but LCL needs such info before window is mapped by wm. That's exact reason why I'm created dummy window before Application.MainForm is mapped, but created so it is really mainform for Qt and LCL. There's already _NET_FRAME_EXTENTS function in qtx11.inc in lcl/interfaces/qt(5)/
 see AskX11_NET_REQUEST_FRAME_EXTENTS() there ...it simply does not work as expected by LCL, also see Qt(5) known problems about x11.

 

TinyPortal © 2005-2018