View Issue Details

IDProjectCategoryView StatusLast Update
0022568LazarusWidgetsetpublic2012-08-22 08:58
ReporterPeter Tomcsányi Assigned ToZeljan Rikalo  
Status resolvedResolutionfixed 
Product Version1.1 (SVN) 
Summary0022568: BorderStyle = bsNone is ignored when a form is shown by ShowModal
DescriptionWhen I create a form Form2 and in the IDE I set:
BorderStyle = bsNone
BorderIcons = []

Then if I show the form by

It still has the border and caption.

This seems to happen only with qt and only with ShowModal.
gtk2 shows Form2 correctly with ShowModal and qt shows the form correctly if Show is used instead of ShowModal (but only until no ShowModal is called for that Form).

I am attaching my small project.

See "Steps To Reproduce" for more details.
Steps To ReproduceCompile and run the project (qt+Linux, but maybe the same will happen with qt+win).

1. Push the button "Form2.Show" - Form2 is shown without border (= correctly as designed) and Form1 still works (can be activated etc.) as usually.

2. Close Form2 using its "Close" button

3. Push the button "Form2.ShowModal" - Form2 will be shown with border (= incorrectly). Form1 is disabled (which is correct).

4. Close Form2 using its "Cancel" button (but the same happens if you use the "Close" button)

5. Push again button "Form2.Show" - Form2 will be shown with border (= incorrectly) and Form1 is disabled (which is incorrect). So it is in fact show as if ShowModal was called, but Cancel does not work (only Close).

Additional InformationSetting BorderStyle inside Form2.OnShow does not help either.
TagsNo tags attached.
Fixed in Revision38148,38326
Attached Files


2012-08-03 18:24 (130,030 bytes)

Zeljan Rikalo

2012-08-04 10:45

developer   ~0061413

Please test and close if ok.

Peter Tomcsányi

2012-08-05 13:29

reporter   ~0061433

Unfortunately, it is not yet fully solved.

The border is correct now (i.e. no border if BorderStyle = bsNone).

But when BorderStyle = bsNone and the user clicks on the main form (Form1 in my example), then it pops in front of the modal window (Form2 in my example).

Try this:

1. Run my example ( attached originally to this point)
2. Click the button "Form2.ShowModal"
3. Now when Form2 is shown (and has no border), click anywhere on Form1. It pops in front of Form2 (Form1 changes its z-order to be the top window, so it (partly) obscures Form2). Moreover, clicking on Form2 does not change the z-order of windows anymore (Form2 stays behind Form1 even if clicked).

This problem does not occur for other BorderStyle values and it does not occur at all in gtk2.

Zeljan Rikalo

2012-08-09 20:26

developer   ~0061540

It works fine here (using KDE - kwin window manager).Such scenario heavily depends on wm and it's iteraction with widgetset.My wild guess is that you use metacity, but please write more details on distro and wm.

Peter Tomcsányi

2012-08-11 18:47

reporter   ~0061573

I use Ubuntu 10.04 LTS and I did not change the window manager, so I suppose that it is Metacity (I am new in Linux...)

As I wrote, GTK2 has no problems with this combination.

Peter Tomcsányi

2012-08-11 21:23

reporter   ~0061578

Just to make sure: the problem occurs to me only with bsNone. bsSingle works ok.

Additional remark:
I tried another combination - Arch Linux on ARM with pekwm.
It works "better", but not perfect.
Clicking on Form1 does not bring Form1 to front, but clicking on the caption bar of Form1 AND moving it a bit does bring in in front of Form2. Fortunately any further click into Form1 brings Form2 to front (so it should not happen that easily that the user is "lost" because his dialog is hidden below the main window).

Zeljan Rikalo

2012-08-13 12:16

developer   ~0061609

Exactly as I mentioned.Problem is wm and how it interacts with widgetset. I think that modal problems with metacity were fixed in ubuntus >= 11 but not sure. Try xfce or lxde, that should work better.

Zeljan Rikalo

2012-08-22 08:58

developer   ~0061805

Please test and close if ok. I've tested gtk2 and qt example under xfce and gnome and they have same behaviour now.

Issue History

Date Modified Username Field Change
2012-08-03 18:24 Peter Tomcsányi New Issue
2012-08-03 18:24 Peter Tomcsányi File Added:
2012-08-03 18:24 Peter Tomcsányi Widgetset => QT
2012-08-04 10:37 Zeljan Rikalo Status new => assigned
2012-08-04 10:37 Zeljan Rikalo Assigned To => Zeljan Rikalo
2012-08-04 10:45 Zeljan Rikalo Fixed in Revision => 38148
2012-08-04 10:45 Zeljan Rikalo LazTarget => -
2012-08-04 10:45 Zeljan Rikalo Status assigned => resolved
2012-08-04 10:45 Zeljan Rikalo Resolution open => fixed
2012-08-04 10:45 Zeljan Rikalo Note Added: 0061413
2012-08-05 13:29 Peter Tomcsányi Status resolved => assigned
2012-08-05 13:29 Peter Tomcsányi Resolution fixed => reopened
2012-08-05 13:29 Peter Tomcsányi Note Added: 0061433
2012-08-09 20:26 Zeljan Rikalo Note Added: 0061540
2012-08-09 20:26 Zeljan Rikalo Status assigned => feedback
2012-08-11 18:47 Peter Tomcsányi Note Added: 0061573
2012-08-11 21:23 Peter Tomcsányi Note Added: 0061578
2012-08-13 12:16 Zeljan Rikalo Note Added: 0061609
2012-08-22 08:58 Zeljan Rikalo Fixed in Revision 38148 => 38148,38326
2012-08-22 08:58 Zeljan Rikalo Status feedback => resolved
2012-08-22 08:58 Zeljan Rikalo Resolution reopened => fixed
2012-08-22 08:58 Zeljan Rikalo Note Added: 0061805