[Patch] GTK2: TGtk2WidgetSet.GetWindowRect() returns wrong origin of an invisible TForm
Original Reporter info from Mantis: biloky @biloky
-
Reporter name: Joeny Ang
Original Reporter info from Mantis: biloky @biloky
- Reporter name: Joeny Ang
Description:
TGtk2WidgetSet.GetWindowRect() returns wrong origin of an invisible TForm if a TLabel is inside a TPanel or TRadioGroup.
gdk_window_get_origin() returns an invalid TPoint if the widget is invisible. If a TLabel is inside a TPanel on the TForm, Widget^.window "somehow" gets initialized, thus the check "not GDK_IS_WINDOW(Widget^.window)" will be FALSE and this will skip the size initialization workaround.
Steps to reproduce:
Using the test project, the form is supposed to be screen centered.
Without the TLabel, the form is properly centered.
Mantis conversion info:
- Mantis ID: 37414
- Build: trunk
- Version: 2.1 (SVN)
- Fixed in revision: r63641 (#5fa1cdcf)