GTK3 gui apps fail
Original Reporter info from Mantis: dbannon @davidbannon
-
Reporter name: David
Original Reporter info from Mantis: dbannon @davidbannon
- Reporter name: David
Description:
On Fedora (using default Gnome 3) but not Ubuntu, GTK3 apps fail because, I suspect ScreenInfo.PixelsPerInch is set to zero during Application.Initialization. The zero value is then used while the main form is being first displayed. TCustomForm.AfterConstruction() has -
if Application.Scaled and Scaled and (Monitor.PixelsPerInch <>PixelsPerInch) then
AutoAdjustLayout(lapAutoAdjustForDPI, PixelsPerInch, Monitor.PixelsPerInch .......
... and Monitor.PixelsPerInch is zero. This causes a "gtk_window_resize: assertion 'width > 0' failed" and goes on to trigger a series of pixman_region32 warning from GTK.
Steps to reproduce:
A blank form, select GTK3 widget set, run it. Problem is run time, does not matter if the binary is made on Fedora or not, all that matters is its run there.
I tested for this bug on a Virtual Machines running Fedora 30, on a high DPI screen. So, I think its possible that it may not happen if the screen is not high DPI or even, perhaps its sensitive to being run in the VM ? If you have problems duplicating the issue, let me know and I'll run some more tests to see just what is really necessary to see it.
ScreenInfo is set to zero in GTK3winapi.inc, in function TGTK3WidgetSet.GetDeviceCaps() when passed LOGPIXELSX, it calls the GTK3 api gdk_screen_width_mm - beyond there, its too deep for me !
Davo