View Issue Details

IDProjectCategoryView StatusLast Update
0032635LazarusIDEpublic2017-11-15 01:55
Reporterertank Assigned ToJesus Reyes  
Status resolvedResolutionfixed 
PlatformRaspberry Pi 3OSRaspbian Jessie&Raspbian Stretch 
Product Version1.8RC5 
Target Version1.8Fixed in Version1.9 (SVN) 
Summary0032635: Lazarus Dialog modal windows go behind regular windows and won't come on top
DescriptionProblem is that, when ever I open a dialog windows of Lazarus - be it open file, options, form list (Shift+F12) - that window shows up and instantly refresh itself and go behind all open Lazarus windows having focus on itself. If current windows allows, I can drag that modal window. I can use keys, or click its visible parts. Everything works. Except it stays behind no matter what.

I also cannot select a design form because Lazarus dialog is a modal one.

With these explanations, now I hope it is easier to understand it using attached pictures.
Steps To ReproduceSimply open Help->About and see if it comes on top of design forum or editor window. It will get focus, but won't come on top.
Additional InformationDiscussed in here. Also some solution is provided by GetMem in the thread.,38787.msg264591/topicseen.html#new
TagsNo tags attached.
Fixed in Revision56413
WidgetsetGTK 2
Attached Files


related to 0032575 feedbackJesus Reyes Codetools sets focus to another window (Ctrl + Space) 
related to 0032249 resolvedJesus Reyes ShowMessage dialog (and related) executed from modal dialog can hide behind the caller form (GTK2) 



2017-11-02 12:17


capture4.jpg (68,449 bytes)   
capture4.jpg (68,449 bytes)   


2017-11-02 12:17


capture2.jpg (67,396 bytes)   
capture2.jpg (67,396 bytes)   

Balázs Székely

2017-11-02 15:24

developer   ~0103850

Few notes:
The issue is caused by r55848. It affects every Linux system I tested: Ubuntu 16, Linux Mint 17(Mate), Kali Linux. Every newly created form(form1, form2) goes behind object inspector, message window, etc. More over, under Raspberry Pi it's even worse, Lazarus dialogs are always in background.
The issue is also mentioned here:

Zeljan Rikalo

2017-11-03 17:23

developer   ~0103855

hm...we should postpone 1.8 until this is fixed or removing r55848 and raise issue that is fixed with r55848

Jesus Reyes

2017-11-04 19:14

developer   ~0103861

Last edited: 2017-11-04 19:20

View 2 revisions

I cannot reproduce this problem, I tried Linux Mint 17, see the pictures.
The first image is just after the about lazarus dialog is opened.
The second image is after I clicked in the source editor window, the modal dialog is still at front.

Jesus Reyes

2017-11-04 19:17


Jesus Reyes

2017-11-04 19:18


Balázs Székely

2017-11-04 22:23

developer   ~0103864

>>I cannot reproduce this problem, I tried Linux Mint 17, see the pictures.
The image was taken on Raspberry PI, that is a special case. Any other Linux distro will show the following symptoms: newly created forms goes behind Object Inspector, Message window: . Reverting r55848 fixes both issues.

Jesus Reyes

2017-11-06 01:14


winhint.diff (977 bytes)   
Index: lcl/interfaces/gtk2/gtk2wsforms.pp
--- lcl/interfaces/gtk2/gtk2wsforms.pp	(revisión: 56284)
+++ lcl/interfaces/gtk2/gtk2wsforms.pp	(copia de trabajo)
@@ -725,8 +725,6 @@
     if AForm.HandleObjectShouldBeVisible and
       GTK_IS_WINDOW({%H-}PGtkWindow(AForm.Handle)) then
-        gtk_window_set_type_hint({%H-}PGtkWindow(AForm.Handle),
-           GtkWindowTypeHints[AForm.BorderStyle]);
           GBoolean(AForm.FormStyle in fsAllStayOnTop))
@@ -741,6 +739,8 @@
     gtk_window_set_default_size(GtkWindow, Max(1,AForm.Width), Max(1,AForm.Height));
     gtk_widget_set_uposition(PGtkWidget(GtkWindow), AForm.Left, AForm.Top);
+    gtk_window_set_type_hint({%H-}PGtkWindow(AForm.Handle),
+       GtkWindowTypeHints[AForm.BorderStyle]);
     GtkWindowShowModal(AForm, GtkWindow);
   end else
winhint.diff (977 bytes)   

Jesus Reyes

2017-11-06 01:15

developer   ~0103894

Please try the attached patch

Balázs Székely

2017-11-06 06:06

developer   ~0103895

The attached patch fixes the issue on every Linux system I have. Unfortunately I cannot test on Raspberry Pi since I don't own one.

Balázs Székely

2017-11-08 05:40

developer   ~0103949,38787.msg265251.html#msg265251
Please add it to the merge list for 1.8 RC6 until it's not too late.


2017-11-14 09:35

reporter   ~0104093

Last edited: 2017-11-14 09:37

View 3 revisions

I get new 1.80RC5 sources SVN 56371 in a new directory and applied the patch. Everything seems to be working OK. No modal window problem as far as I can see.

Tested with Raspberry Pi 3 running Jessie and Strech OSes both.

Jesus Reyes

2017-11-14 14:12

developer   ~0104101

is possible, please check also that the problem reported in the related bug report 0032249 is still fixed, thanks.


2017-11-14 19:58

reporter   ~0104106

Checked report 0032249. Used sample project provided. All worked nicely on my RPi3 Stretch system. Did not try it on Jessie though, but I think it should be fine.

Jesus Reyes

2017-11-15 01:55

developer   ~0104110

Thanks for testing, patch applied.

Issue History

Date Modified Username Field Change
2017-11-02 12:17 ertank New Issue
2017-11-02 12:17 ertank File Added: capture4.jpg
2017-11-02 12:17 ertank File Added: capture2.jpg
2017-11-02 15:24 Balázs Székely Note Added: 0103850
2017-11-02 15:53 Juha Manninen Relationship added related to 0032575
2017-11-02 15:53 Juha Manninen Assigned To => Jesus Reyes
2017-11-02 15:53 Juha Manninen Status new => assigned
2017-11-02 15:54 Juha Manninen Relationship added related to 0032249
2017-11-03 17:23 Zeljan Rikalo Note Added: 0103855
2017-11-04 19:14 Jesus Reyes Note Added: 0103861
2017-11-04 19:15 Jesus Reyes File Added: Screenshot at 2017-11-04 12:08:14.png
2017-11-04 19:17 Jesus Reyes File Deleted: Screenshot at 2017-11-04 12:08:14.png
2017-11-04 19:17 Jesus Reyes File Added: Screenshot at 2017-11-04 12:08:14.jpg
2017-11-04 19:18 Jesus Reyes File Added: Screenshot at 2017-11-04 12:08:35.jpg
2017-11-04 19:20 Jesus Reyes Note Edited: 0103861 View Revisions
2017-11-04 22:23 Balázs Székely Note Added: 0103864
2017-11-06 01:14 Jesus Reyes File Added: winhint.diff
2017-11-06 01:15 Jesus Reyes LazTarget => -
2017-11-06 01:15 Jesus Reyes Note Added: 0103894
2017-11-06 01:15 Jesus Reyes Status assigned => feedback
2017-11-06 06:06 Balázs Székely Note Added: 0103895
2017-11-08 05:40 Balázs Székely Note Added: 0103949
2017-11-14 09:35 ertank Note Added: 0104093
2017-11-14 09:35 ertank Status feedback => assigned
2017-11-14 09:36 ertank Note Edited: 0104093 View Revisions
2017-11-14 09:37 ertank Note Edited: 0104093 View Revisions
2017-11-14 14:12 Jesus Reyes Note Added: 0104101
2017-11-14 19:58 ertank Note Added: 0104106
2017-11-15 01:55 Jesus Reyes Fixed in Revision => 56413
2017-11-15 01:55 Jesus Reyes LazTarget - => 1.8
2017-11-15 01:55 Jesus Reyes Note Added: 0104110
2017-11-15 01:55 Jesus Reyes Status assigned => resolved
2017-11-15 01:55 Jesus Reyes Fixed in Version => 1.9 (SVN)
2017-11-15 01:55 Jesus Reyes Resolution open => fixed
2017-11-15 01:55 Jesus Reyes Target Version => 1.8