View Issue Details

IDProjectCategoryView StatusLast Update
0027894LazarusLCLpublic2020-03-17 00:27
Reporterchronos Assigned ToJuha Manninen  
Status closedResolutionfixed 
Product Version1.5 (SVN) 
Summary0027894: TForm RestoredWidth and RestoredHeight updated incorrectly if window maximized under Gtk2
DescriptionThere is a problem that RestoredWidth and RestoredHeight is updated to maximized form size if form is maximized. These values have to keep original dimensions from normal state to be able to restore maximized form back to normal state to original size. This works correctly under Windows but with Gtk2 which simulate LM_SIZE is working incorrectly.
Steps To ReproduceRun attached demo on Linux with Gtk2 and switch between normal and maximized state and see how RestoredWidth and RestoredHeight is changed after maximization.
Additional InformationNot sure how to fix this. Code which updates FRestoredWidth is located at end of method TCustomForm.WMSize at

LM_SIZE is sent from file from SendSizeNotificationToLCL function "if WidthHeightChanged then begin" section.

It seems that WindowState and size is not updated in right order so maximized size is sent with normal window state and not with maximize window state as should.

There is also gtk2WSDelayedWindowStateChange function in Gtk2WSForms.pp and as name suggests window state is sent as delayed which with SendSizeNotificationToLCL is apparently problem.
TagsNo tags attached.
Fixed in Revisionr61997, r62113
WidgetsetGTK 2
Attached Files


related to 0036127 resolvedJuha Manninen [Patch] TForm's bounds and restored bounds are inconsistent 



2015-04-18 12:08

reporter (4,570 bytes)

Juha Manninen

2020-03-16 19:15

developer   ~0121623

Fixed together with the related issue.


2020-03-16 23:48

reporter   ~0121633

It works ok. Thanks.

Issue History

Date Modified Username Field Change
2015-04-18 12:08 chronos New Issue
2015-04-18 12:08 chronos File Added:
2019-10-03 14:33 Juha Manninen Relationship added related to 0036127
2020-03-16 19:15 Juha Manninen Assigned To => Juha Manninen
2020-03-16 19:15 Juha Manninen Status new => resolved
2020-03-16 19:15 Juha Manninen Resolution open => fixed
2020-03-16 19:15 Juha Manninen Fixed in Revision => r61997, r62113
2020-03-16 19:15 Juha Manninen LazTarget => -
2020-03-16 19:15 Juha Manninen Widgetset GTK 2 => GTK 2
2020-03-16 19:15 Juha Manninen Note Added: 0121623
2020-03-16 23:48 chronos Status resolved => closed
2020-03-16 23:48 chronos Note Added: 0121633