View Issue Details

IDProjectCategoryView StatusLast Update
0031826LazarusIDEpublic2018-03-17 13:44
ReporterTheo van Oosten Assigned ToZeljan Rikalo  
Status closedResolutionfixed 
Product Version1.6.4 
Summary0031826: Main window cannot be resized
DescriptionSince version 1.6.2 the main window cannot be resized. After restoring 1.6 it worked again.
Steps To ReproduceInstall Lazarus
Additional InformationAt first I thought it depends on the version of Linux kernel. But many times installing different versions of Lazarus and different versions of the kernel and resetting the snapshot in a virtualbox machine in between to get to a clean install, shows the problem only depends on the version of Lazarus, starting at version 1.6.2
TagsNo tags attached.
Fixed in Revision55184
Attached Files


related to 0031950 resolvedZeljan Rikalo Gtk2: Form with constraints cannot resize 


Ondrej Pokorny

2017-05-16 21:50

developer   ~0100342

Please bisect the guilty revision. Thanks!

Juha Manninen

2017-05-17 17:19

developer   ~0100365

Last edited: 2017-05-17 17:23

View 2 revisions

Does it work with 1.8RC1 or trunk?
Which "main window" do you mean? Main window of Lazarus? Main window of your application?
I don't believe that "Install Lazarus" is enough to reproduce the issue.

Zeljan Rikalo

2017-05-17 20:41

developer   ~0100367

IMO, he's talking about lazarus main window.

Theo van Oosten

2017-05-17 21:44

reporter   ~0100371

Yes, I mean the Lazarus main window: I can only see some of the tabs with controls. Also the maximize icon (+) is missing. I rechecked by installing 1.6 again: the maximize icon is present in that version. I did not check 1.8RC1 because I use only stable versions. In this case this is a regression, happening in version 1.6.2

Ondrej Pokorny

2017-05-17 21:51

developer   ~0100372

> I did not check 1.8RC1 because I use only stable versions

You can use only stable versions but can (and should) test release candidates as well - the one thing does not rule out the other :)

Zeljan Rikalo

2017-05-18 14:12

developer   ~0100436

Confirmed that lazarus main window cannot be resized under gtk2 linux - trunk lazarus 1.9 r54969...well it can be resized in width but not shrinked, height cannot be resized in any way.
Under Qt works fine. So this is still valid bug in 1.8 fixes and trunk.

Ondrej Pokorny

2017-05-18 14:47

developer   ~0100438

> height cannot be resized in any way

this is wanted (there is the option IDE options -> Environment -> Window -> Automatically adjust IDE main window height)

> it can be resized in width but not shrunk

this is the bug. I remember I experienced the same issue when I tested something else on Linux. I don't remember if IDE was built with Gtk2 or Qt

Juha Manninen

2017-05-18 14:49

developer   ~0100439

Last edited: 2017-05-18 14:54

View 4 revisions

The height is adjusted automatically unless the option for it is off. Why should a user change the height?
I can change the width also when built for GTK2. It must be a window manager related issue. The report does not mention which window manager is used. I use KDE + KWin myself.

Zeljan Rikalo

2017-05-18 23:42

developer   ~0100466

I'm using KDE Plasma + KWin on Fedora 24 64bit and cannot resize height in any way, width only to bigger but not to smaller value - so I doubt it's wm issue.
BUT, I didn't touch any default settings for IDE options -> Env -> Window -> Automatically adjust ....

Juha Manninen

2017-05-18 23:52

developer   ~0100470

> ... and cannot resize height in any way.

That is by design. However width should be adjustable.

Theo van Oosten

2017-05-19 09:47

reporter   ~0100481

Last edited: 2017-05-19 13:45

View 3 revisions

Only the main window is effected. All other windows of the ide can be resized and maximized. So it is not a problem with a window manager. Did anyone notice the absence of the maximize icon (+)???

Juha Manninen

2017-05-19 17:51

developer   ~0100496

I don't know what happened to the maximize button but it is not really needed in the main window unless it works as a docking master window.
The window cannot be maximized anyway in the normal sense. Why would the button be there?

Zeljan Rikalo

2017-05-19 18:18

developer   ~0100497

IMO, this have to do something with fixed size of the form (constraints) and gtk2 does not like it.

Ondrej Pokorny

2017-05-19 19:54

developer   ~0100505

It must be a side effect of some bug fix. Because the constraints code didn't change between 1.6.0 and 1.6.2

Zeljan Rikalo

2017-05-22 10:13

developer   ~0100581

Under gtk2/gtk3 you cannot resize width less than menubar size. So that's the reason of this problem.

Ondrej Pokorny

2017-05-22 10:18

developer   ~0100582

> Under gtk2/gtk3 you cannot resize width less than menubar size.

Has anything changed regarding this? AFAIK it was possible before: 0028031

Zeljan Rikalo

2017-05-22 12:48

developer   ~0100595

No it wasn't. Gtk2 works in that way (and that issue you mentioned is resolved as "no change required). Right now tested thunderbird and firefox, and width cannot be smaller than menubar width (menubar width = top items width + spacings), so IMO this should be resolved as "no change required".

Ondrej Pokorny

2017-05-22 16:43

developer   ~0100606

Zeljko, if you look at the screenshot in 0028031 you'll see that the window is resized so that menu bar is partly hidden. Maybe Thunderbird/Firefox uses some constraints. But there is no limitation in LCL applications.

Please also take a look at Gtk2Resize.mp4 - you'll see the effect.

The problem is when the component palette needs to become higher - you cannot shrink the width of the window over the point where a new component row has to be added.

This is a valid issue.

Ondrej Pokorny

2017-05-22 16:44


Theo van Oosten

2017-05-25 12:40

reporter   ~0100671

My problem is not that the main window can not be made smaller, but I can not make it bigger! I want to see all tabs of the packages in case I am searching for a specific item. Now I must use the small arrow on the side and click on it to see the other tabs. Yes, I do not need the maximize button, but I mentioned it as an indicator to the cause of the problem. I do not think gtk2/3 is the problem, because in 1.6 I could resize the height too(!), only after releasing the mouse button the height went back to it's original size. That is not done by gtk2/3 but by the application. Besides, if I would use the maximize button in 1.6, it's not just the width that is maximized, the height too!! If gtk2/3 was controlling it, that would not happen.
Extra hint: When I move the mouse on the side of the window in 1.6, the mouse pointer would change from an arrow to >| on the right side and a ^ with a line on top on the bottom of the window. In 1.6.2 and above this still happens with all the other windows, but not with the main window. So there is no longer a constraint on the size of the main window, but the size is frozen, unalterable. I created an application with max. and min. size equal to the initial size, so the size cannot be changed. But still the mouse pointer will change at the sides, the sides just cannot be moved.
IMHO there is a boolean attribute of the main window that controls if the window is fixed in size toggled from false to true or something like that. That would explain why the maximize button disappeared at the same time the window cannot be resized.

Theo van Oosten

2017-06-07 18:07

reporter   ~0100936

Last edited: 2017-06-07 18:18

View 2 revisions

Correction!!! I tested my self created application on Lazarus 1.6.4 again and the mouse pointer will not change and the maximize button is gone! Retesting on version 1.6 and the mouse changes and the maximize button is back. So what ever is effecting the main window of Lazarus is effecting my application as well. Setting the constraints of my application larger will make the maximize button reappear and the mouse pointer changes again on version 1.6.4, so I am wrong: It might be just the width constraint of the main window of Lazarus being too small.

Zeljan Rikalo

2017-06-07 18:32

developer   ~0100937

Please test with trunk >= r55184

Ondrej Pokorny

2017-06-07 20:21

developer   ~0100938

> Please test with trunk >= r55184

Works fine for me. Thanks!

Zeljan Rikalo

2017-06-08 16:49

developer   ~0100946

Please test and close if ok. Note that revision r55184 will be merged into Lazarus 1.8 RC3 , so test with trunk or wait for RC3.

Theo van Oosten

2017-06-09 16:40

reporter   ~0100975

I agree with AlexeyT (0031950) that the code in is wrong, the "or" should be "and".
This error was also present in fpc 2.6.4, so this is not the thing that changed, causing the problem with the main window.
But if fixing the code in also fixes the problem with the main window, I am happy.
I checked my own application with version 1.6.4 and to my suprize I only needed to enlarge just 1 of the constraints to get the maximize button back.
The mouse would change at the sides in the direction (up/down or left/right) where the constraint was enlarged and I could resize the window, but not at the sides in the other direction (left/right or up/down).
This would not happen if the code in is the cause of the problem, so.....
But if Ondrej Pokorny has checked it, it must be fine.
I will wait for the release of 1.8 to check it.

Ondrej Pokorny

2017-06-09 17:09

developer   ~0100978

> But if Ondrej Pokorny has checked it, it must be fine.

You may have experienced a different problem. Gtk is quite a fun and capricious girl :)

Theo van Oosten

2018-03-17 13:44

reporter   ~0107195

Tested it with version 1.8, everything OK!

Issue History

Date Modified Username Field Change
2017-05-16 21:02 Theo van Oosten New Issue
2017-05-16 21:50 Ondrej Pokorny Note Added: 0100342
2017-05-17 17:19 Juha Manninen Note Added: 0100365
2017-05-17 17:23 Juha Manninen Note Edited: 0100365 View Revisions
2017-05-17 20:41 Zeljan Rikalo Note Added: 0100367
2017-05-17 21:44 Theo van Oosten Note Added: 0100371
2017-05-17 21:51 Ondrej Pokorny Note Added: 0100372
2017-05-18 14:12 Zeljan Rikalo LazTarget => -
2017-05-18 14:12 Zeljan Rikalo Note Added: 0100436
2017-05-18 14:12 Zeljan Rikalo Status new => confirmed
2017-05-18 14:47 Ondrej Pokorny Note Added: 0100438
2017-05-18 14:49 Juha Manninen Note Added: 0100439
2017-05-18 14:50 Juha Manninen Note Edited: 0100439 View Revisions
2017-05-18 14:53 Juha Manninen Note Edited: 0100439 View Revisions
2017-05-18 14:54 Juha Manninen Note Edited: 0100439 View Revisions
2017-05-18 23:42 Zeljan Rikalo Note Added: 0100466
2017-05-18 23:52 Juha Manninen Note Added: 0100470
2017-05-19 09:47 Theo van Oosten Note Added: 0100481
2017-05-19 13:44 Theo van Oosten Note Edited: 0100481 View Revisions
2017-05-19 13:45 Theo van Oosten Note Edited: 0100481 View Revisions
2017-05-19 17:51 Juha Manninen Note Added: 0100496
2017-05-19 18:18 Zeljan Rikalo Note Added: 0100497
2017-05-19 19:54 Ondrej Pokorny Note Added: 0100505
2017-05-20 22:05 Juha Manninen Note View State: 0100466: private
2017-05-22 10:13 Zeljan Rikalo Note Added: 0100581
2017-05-22 10:18 Ondrej Pokorny Note Added: 0100582
2017-05-22 12:38 Juha Manninen Note View State: 0100466: public
2017-05-22 12:48 Zeljan Rikalo Note Added: 0100595
2017-05-22 16:43 Ondrej Pokorny Note Added: 0100606
2017-05-22 16:44 Ondrej Pokorny File Added: Gtk2Resize.mp4
2017-05-25 12:40 Theo van Oosten Note Added: 0100671
2017-06-07 18:07 Theo van Oosten Note Added: 0100936
2017-06-07 18:18 Theo van Oosten Note Edited: 0100936 View Revisions
2017-06-07 18:32 Zeljan Rikalo Note Added: 0100937
2017-06-07 20:21 Ondrej Pokorny Note Added: 0100938
2017-06-08 16:49 Zeljan Rikalo Fixed in Revision => 55184
2017-06-08 16:49 Zeljan Rikalo Note Added: 0100946
2017-06-08 16:49 Zeljan Rikalo Status confirmed => resolved
2017-06-08 16:49 Zeljan Rikalo Resolution open => fixed
2017-06-08 16:49 Zeljan Rikalo Assigned To => Zeljan Rikalo
2017-06-08 16:51 Zeljan Rikalo Relationship added related to 0031950
2017-06-09 16:40 Theo van Oosten Note Added: 0100975
2017-06-09 17:09 Ondrej Pokorny Note Added: 0100978
2018-03-17 13:44 Theo van Oosten Note Added: 0107195
2018-03-17 13:44 Theo van Oosten Status resolved => closed