Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-01

Form ordering problem on tiling window manager

15 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sven Barth

Hello together!

I'm using the tiling windows manager Awesome (
http://awesome.naquadah.org/ ) on i386-linux-gtk2. I've set up the IDE in a way to use a floating layout instead of being tiled (because not all windows can be docked yet :( ). This sometimes works ok and I can select a different window using Win+k and then the window comes to front. This also works if I click the window.
But rather often something happens (I don't know what exactly and I'd like to find this out) and then I can click on the window and I use the switching window keyboard shortcut all I want and nothing happens. This even goes so far that modal dialogs (exception windows, open/save dialog) are opened behind(!) all other windows. So I first need to move the IDE and other windows out of the way before I can work in that dialog. I need to restart the IDE to revert to the original behavior again (for a while...).
For now I've only achieved this problem with the IDE, not with a custom program. It would be nice if someone had an idea what I could test to narrow this problem down (the console output does not print anything useful).

Regards,
Sven

Reply by email

Hans-Peter Diettrich
to Sven Barth
For now I've only achieved this problem with the IDE, not with a custom program. It would be nice if someone had an idea what I could test to narrow this problem down (the console output does not print anything useful).

AFAIK the IDE does much default layout management, which can get into the way of other layout managers. An installable layout manager is asked only at the discretion of the IDE, not automatically whenever some layout action should be performed. This leads to problems that cannot be mastered by an installable layout manager, which is not called before or after the default IDE manager causes such problems.

I'd suggest that *all* the default IDE layout code is moved into an dedicated default layout manager, which can be properly (entirely!) replaced by any other layout manager. It should be up to every installable layout manager to delegate some action to the default manager, not in the opposite direction. That's why I stopped working on the EasyLayoutManager, after I had tweaked it and the IDE code (0.9.31) into somewhat usable state on my machine.

DoDi

Reply by email

Sven Barth
to Hans-Peter Diettrich
Hans-Peter Diettrich wrote 22 lines
Sven Barth schrieb: > For now I've only achieved this problem with the IDE, not with a > custom program. It would be nice if someone had an idea what I could > test to narrow this problem down (the console output does not print > anything useful). AFAIK the IDE does much default layout management, which can get into the way of other layout managers. An installable layout manager is asked only at the discretion of the IDE, not automatically whenever some layout action should be performed. This leads to problems that cannot be mastered by an installable layout manager, which is not called before or after the default IDE manager causes such problems. I'd suggest that *all* the default IDE layout code is moved into an dedicated default layout manager, which can be properly (entirely!) replaced by any other layout manager. It should be up to every installable layout manager to delegate some action to the default manager, not in the opposite direction. That's why I stopped working on the EasyLayoutManager, after I had tweaked it and the IDE code (0.9.31) into somewhat usable state on my machine.

Just in case: You are aware that I'm talking about the interaction with my desktop's window manager?

Also: does the layout manager of the IDE affect z-ordering?

Regards,
Sven

Reply by email

Mattias Gaertner
to Sven Barth: Hello together! I'm using the tiling windows manager Awesome (…
Show quoted text 13 lines
[...] But rather often something happens (I don't know what exactly and I'd like to find this out) and then I can click on the window and I use the switching window keyboard shortcut all I want and nothing happens. This even goes so far that modal dialogs (exception windows, open/save dialog) are opened behind(!) all other windows. So I first need to move the IDE and other windows out of the way before I can work in that dialog. I need to restart the IDE to revert to the original behavior again (for a while...). For now I've only achieved this problem with the IDE, not with a custom program. It would be nice if someone had an idea what I could test to narrow this problem down (the console output does not print anything useful).

If you have trouble with ShowModal, then it is a bug in the LCL gtk2 interface or below.
ShowModal had in the past some problems with other window managers too.
Please update to 40085, compile with -dVerboseTransient, then run again. When it happens again look at the end of the output for 'DEFINE transient'.

Mattias

Reply by email

Sven Barth
to Mattias Gaertner: On Wed, 30 Jan 2013 21:24:38 +0100 If you have trouble with ShowModal, then it is a bug…
Mattias Gaertner wrote 24 lines
On Wed, 30 Jan 2013 21:24:38 +0100 Sven Barth wrote: > [...] > But rather often something happens (I don't know what exactly and I'd > like to find this out) and then I can click on the window and I use the > switching window keyboard shortcut all I want and nothing happens. This > even goes so far that modal dialogs (exception windows, open/save > dialog) are opened behind(!) all other windows. So I first need to move > the IDE and other windows out of the way before I can work in that > dialog. I need to restart the IDE to revert to the original behavior > again (for a while...). > For now I've only achieved this problem with the IDE, not with a custom > program. It would be nice if someone had an idea what I could test to > narrow this problem down (the console output does not print anything > useful). If you have trouble with ShowModal, then it is a bug in the LCL gtk2 interface or below. ShowModal had in the past some problems with other window managers too. Please update to 40085, compile with -dVerboseTransient, then run again. When it happens again look at the end of the output for 'DEFINE transient'.

I've done as you proposed (it's an IDE with virgin settings and without docking, just in case) and I've attached two debug outputs. In both cases I have started the IDE and opened the File Open dialog with Ctrl+O. In the "normal" case I've closed the dialog using "ESC" in the "problem" case I've first used "Win+k" to switch to a different window of the IDE (which wasn't moved to front of course, but the windows manager nevertheless marked the windows as focused) and then I've closed the dialog. After this forceful switch the behavior described in my original mail appeared (reproduceable).

I've also checked whether some output happens directly after using "Win+k", but this is not the case...

Regards,
Sven

-------------- next part --------------
SetPrimaryConfigPath NewValue="/home/sven/.lazarus/1.1-new" -> "/home/sven/.lazarus/1.1-new" TMainIDE.ParseCmdLineOptions:
PrimaryConfigPath="/home/sven/.lazarus/1.1-new/"
SecondaryConfigPath="/etc/lazarus"
Hinweis: CodeTools-Konfigurationsdatei nicht gefunden - verwende Voreinstellungen NOTE: help options config file not found - using defaults TGtk2WidgetSet.ShowHide HIDE TSplashForm
TGtk2WidgetSet.UntransientWindow 099B98E0 LCLObject=TSplashForm TGtk2WidgetSet.UpdateTransientWindows
TGtk2WidgetSet.UpdateTransientWindows Untransient 4 MainIDE:TMainIDEBar TGtk2WidgetSet.UpdateTransientWindows Untransient 3 Form1:TForm1 TGtk2WidgetSet.UpdateTransientWindows Untransient 2 SourceNotebook:TSourceNotebook TGtk2WidgetSet.UpdateTransientWindows Untransient 1 ObjectInspectorDlg:TObjectInspectorDlg TGtk2WidgetSet.UpdateTransientWindows Untransient 0 MessagesView:TMessagesView TGtk2WidgetSet.UntransientWindow 099B98E0 LCLObject=TSplashForm TGtk2WidgetSet.UpdateTransientWindows
TGtk2WidgetSet.UpdateTransientWindows Untransient 4 MainIDE:TMainIDEBar TGtk2WidgetSet.UpdateTransientWindows Untransient 3 Form1:TForm1 TGtk2WidgetSet.UpdateTransientWindows Untransient 2 SourceNotebook:TSourceNotebook TGtk2WidgetSet.UpdateTransientWindows Untransient 1 ObjectInspectorDlg:TObjectInspectorDlg TGtk2WidgetSet.UpdateTransientWindows Untransient 0 MessagesView:TMessagesView TGtkWidgetSet.GtkWindowShowModal nil
TGtk2WidgetSet.UpdateTransientWindows
Define TRANSIENT Parent=MessagesView:TMessagesView Index=4 Wnd=09BA9CD0 Child=SourceNotebook:TSourceNotebook Index=3 Wnd=09BD2D80 Define TRANSIENT Parent=SourceNotebook:TSourceNotebook Index=3 Wnd=09BD2D80 Child=Form1:TForm1 Index=2 Wnd=09BE0F00 Define TRANSIENT Parent=Form1:TForm1 Index=2 Wnd=09BE0F00 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=1 Wnd=09BAA0B8 Define TRANSIENT Parent=ObjectInspectorDlg:TObjectInspectorDlg Index=1 Wnd=09BAA0B8 Child=MainIDE:TMainIDEBar Index=0 Wnd=099B9C50 Define TRANSIENT Parent=MainIDE:TMainIDEBar Index=0 Wnd=099B9C50 Child=:TOpenDialog Index=0 Wnd=09CA1820 Break old TRANSIENT i=5/6 OldTransientParent=00000000 Child=:TOpenDialog Index=0 Wnd=09CA1820 Break old TRANSIENT i=4/6 OldTransientParent=00000000 Child=MainIDE:TMainIDEBar Index=0 Wnd=099B9C50 Break old TRANSIENT i=3/6 OldTransientParent=00000000 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=1 Wnd=09BAA0B8 Break old TRANSIENT i=2/6 OldTransientParent=00000000 Child=Form1:TForm1 Index=2 Wnd=09BE0F00 Break old TRANSIENT i=1/6 OldTransientParent=00000000 Child=SourceNotebook:TSourceNotebook Index=3 Wnd=09BD2D80 Set TRANSIENT i=1/6 Child=SourceNotebook:TSourceNotebook Index=3 Wnd=09BD2D80 Parent=09BA9CD0 Set TRANSIENT i=2/6 Child=Form1:TForm1 Index=2 Wnd=09BE0F00 Parent=09BD2D80 Set TRANSIENT i=3/6 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=1 Wnd=09BAA0B8 Parent=09BE0F00 Set TRANSIENT i=4/6 Child=MainIDE:TMainIDEBar Index=0 Wnd=099B9C50 Parent=09BAA0B8 Set TRANSIENT i=5/6 Child=:TOpenDialog Index=0 Wnd=09CA1820 Parent=099B9C50 DestroyCommonDialogAddOns :TOpenDialog
DestroyCommonDialogAddOns :TOpenDialog
TGtk2WidgetSet.UntransientWindow 09CA1820 LCLObject=TOpenDialog TGtk2WidgetSet.UpdateTransientWindows
TGtk2WidgetSet.UpdateTransientWindows Untransient 4 MainIDE:TMainIDEBar TGtk2WidgetSet.UpdateTransientWindows Untransient 3 Form1:TForm1 TGtk2WidgetSet.UpdateTransientWindows Untransient 2 SourceNotebook:TSourceNotebook TGtk2WidgetSet.UpdateTransientWindows Untransient 1 ObjectInspectorDlg:TObjectInspectorDlg TGtk2WidgetSet.UpdateTransientWindows Untransient 0 MessagesView:TMessagesView

-------------- next part --------------
SetPrimaryConfigPath NewValue="/home/sven/.lazarus/1.1-new" -> "/home/sven/.lazarus/1.1-new" TMainIDE.ParseCmdLineOptions:
PrimaryConfigPath="/home/sven/.lazarus/1.1-new/"
SecondaryConfigPath="/etc/lazarus"
Hinweis: CodeTools-Konfigurationsdatei nicht gefunden - verwende Voreinstellungen NOTE: help options config file not found - using defaults TGtk2WidgetSet.ShowHide HIDE TSplashForm
TGtk2WidgetSet.UntransientWindow 0A0CD8E0 LCLObject=TSplashForm TGtk2WidgetSet.UpdateTransientWindows
TGtk2WidgetSet.UpdateTransientWindows Untransient 4 MainIDE:TMainIDEBar TGtk2WidgetSet.UpdateTransientWindows Untransient 3 Form1:TForm1 TGtk2WidgetSet.UpdateTransientWindows Untransient 2 SourceNotebook:TSourceNotebook TGtk2WidgetSet.UpdateTransientWindows Untransient 1 ObjectInspectorDlg:TObjectInspectorDlg TGtk2WidgetSet.UpdateTransientWindows Untransient 0 MessagesView:TMessagesView TGtk2WidgetSet.UntransientWindow 0A0CD8E0 LCLObject=TSplashForm TGtk2WidgetSet.UpdateTransientWindows
TGtk2WidgetSet.UpdateTransientWindows Untransient 4 MainIDE:TMainIDEBar TGtk2WidgetSet.UpdateTransientWindows Untransient 3 Form1:TForm1 TGtk2WidgetSet.UpdateTransientWindows Untransient 2 SourceNotebook:TSourceNotebook TGtk2WidgetSet.UpdateTransientWindows Untransient 1 ObjectInspectorDlg:TObjectInspectorDlg TGtk2WidgetSet.UpdateTransientWindows Untransient 0 MessagesView:TMessagesView TGtkWidgetSet.GtkWindowShowModal nil
TGtk2WidgetSet.UpdateTransientWindows
Define TRANSIENT Parent=MessagesView:TMessagesView Index=4 Wnd=0A2BDCD0 Child=SourceNotebook:TSourceNotebook Index=3 Wnd=0A2E5D80 Define TRANSIENT Parent=SourceNotebook:TSourceNotebook Index=3 Wnd=0A2E5D80 Child=Form1:TForm1 Index=2 Wnd=0A2F4700 Define TRANSIENT Parent=Form1:TForm1 Index=2 Wnd=0A2F4700 Child=MainIDE:TMainIDEBar Index=1 Wnd=0A0CDC50 Define TRANSIENT Parent=MainIDE:TMainIDEBar Index=1 Wnd=0A0CDC50 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=0 Wnd=0A2BE0B8 Define TRANSIENT Parent=ObjectInspectorDlg:TObjectInspectorDlg Index=0 Wnd=0A2BE0B8 Child=:TOpenDialog Index=0 Wnd=0A3B4808 Break old TRANSIENT i=5/6 OldTransientParent=00000000 Child=:TOpenDialog Index=0 Wnd=0A3B4808 Break old TRANSIENT i=4/6 OldTransientParent=00000000 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=0 Wnd=0A2BE0B8 Break old TRANSIENT i=3/6 OldTransientParent=00000000 Child=MainIDE:TMainIDEBar Index=1 Wnd=0A0CDC50 Break old TRANSIENT i=2/6 OldTransientParent=00000000 Child=Form1:TForm1 Index=2 Wnd=0A2F4700 Break old TRANSIENT i=1/6 OldTransientParent=00000000 Child=SourceNotebook:TSourceNotebook Index=3 Wnd=0A2E5D80 Set TRANSIENT i=1/6 Child=SourceNotebook:TSourceNotebook Index=3 Wnd=0A2E5D80 Parent=0A2BDCD0 Set TRANSIENT i=2/6 Child=Form1:TForm1 Index=2 Wnd=0A2F4700 Parent=0A2E5D80 Set TRANSIENT i=3/6 Child=MainIDE:TMainIDEBar Index=1 Wnd=0A0CDC50 Parent=0A2F4700 Set TRANSIENT i=4/6 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=0 Wnd=0A2BE0B8 Parent=0A0CDC50 Set TRANSIENT i=5/6 Child=:TOpenDialog Index=0 Wnd=0A3B4808 Parent=0A2BE0B8 DestroyCommonDialogAddOns :TOpenDialog
TGtk2WidgetSet.UntransientWindow 0A3B4808 LCLObject=TOpenDialog TGtk2WidgetSet.UpdateTransientWindows
TGtk2WidgetSet.UpdateTransientWindows Untransient 4 MainIDE:TMainIDEBar TGtk2WidgetSet.UpdateTransientWindows Untransient 3 Form1:TForm1 TGtk2WidgetSet.UpdateTransientWindows Untransient 2 SourceNotebook:TSourceNotebook TGtk2WidgetSet.UpdateTransientWindows Untransient 1 ObjectInspectorDlg:TObjectInspectorDlg TGtk2WidgetSet.UpdateTransientWindows Untransient 0 MessagesView:TMessagesView

Reply by email

Mattias Gaertner
to Sven Barth
Show quoted text 35 lines
On 31.01.2013 09:39, Mattias Gaertner wrote: > On Wed, 30 Jan 2013 21:24:38 +0100 > Sven Barth wrote: > >> [...] >> But rather often something happens (I don't know what exactly and I'd >> like to find this out) and then I can click on the window and I use the >> switching window keyboard shortcut all I want and nothing happens. This >> even goes so far that modal dialogs (exception windows, open/save >> dialog) are opened behind(!) all other windows. So I first need to move >> the IDE and other windows out of the way before I can work in that >> dialog. I need to restart the IDE to revert to the original behavior >> again (for a while...). >> For now I've only achieved this problem with the IDE, not with a custom >> program. It would be nice if someone had an idea what I could test to >> narrow this problem down (the console output does not print anything >> useful). > > If you have trouble with ShowModal, then it is a bug in the LCL gtk2 > interface or below. > ShowModal had in the past some problems with other window managers > too. > Please update to 40085, compile with -dVerboseTransient, then run again. > When it happens again look at the end of the output for 'DEFINE > transient'. I've done as you proposed (it's an IDE with virgin settings and without docking, just in case) and I've attached two debug outputs. In both cases I have started the IDE and opened the File Open dialog with Ctrl+O. In the "normal" case I've closed the dialog using "ESC" in the "problem" case I've first used "Win+k" to switch to a different window of the IDE (which wasn't moved to front of course, but the windows manager nevertheless marked the windows as focused) and then I've closed the dialog. After this forceful switch the behavior described in my original mail appeared (reproduceable).

From the output: The LCL gtk2 interfaces sets the right order. TOpenDialog on top of OI on top of MainIDE on Form1 on SrcNB on MsgView.
So, the question is what does this WM need more than gtk_window_set_transient_for.
http://developer.gimp.org/api/2.0/gtk/GtkWindow.html#gtk-window-set-transient-for

I've also checked whether some output happens directly after using "Win+k", but this is not the case...

Mattias

Reply by email

Hans-Peter Diettrich
to Mattias Gaertner
Show quoted text 6 lines
>From the output: The LCL gtk2 interfaces sets the right order. TOpenDialog on top of OI on top of MainIDE on Form1 on SrcNB on MsgView. So, the question is what does this WM need more than gtk_window_set_transient_for. http://developer.gimp.org/api/2.0/gtk/GtkWindow.html#gtk-window-set-transient-for

A WM manages the windows, and a widgetset (gtk...) only can tell the WM how his windows should be ordered. A WM may e.g. reorder the window order on focus switch or other actions, without telling or asking the widgetset.

DoDi

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich
Show quoted text 13 lines
Mattias Gaertner schrieb: >>From the output: The LCL gtk2 interfaces sets the right order. > TOpenDialog on top of OI on top of MainIDE on Form1 on SrcNB on > MsgView. > So, the question is what does this WM need more than > gtk_window_set_transient_for. > http://developer.gimp.org/api/2.0/gtk/GtkWindow.html#gtk-window-set-transient-for A WM manages the windows, and a widgetset (gtk...) only can tell the WM how his windows should be ordered. A WM may e.g. reorder the window order on focus switch or other actions, without telling or asking the widgetset.

According to its source code, "awesome" knows
the transient WM HINT.
To make sure:
Sven, please test if you can focus or bring to front other IDE windows while a modal dialog is open. Before the error happens and after.

Mattias

Reply by email

zeljko
to Mattias Gaertner: On Thu, 31 Jan 2013 22:15:26 +0100 From the output: The LCL gtk2 interfaces sets the…
Mattias Gaertner wrote 47 lines
On Thu, 31 Jan 2013 22:15:26 +0100 Sven Barth wrote: > On 31.01.2013 09:39, Mattias Gaertner wrote: > > On Wed, 30 Jan 2013 21:24:38 +0100 > > > > Sven Barth wrote: > >> [...] > >> But rather often something happens (I don't know what exactly and I'd > >> like to find this out) and then I can click on the window and I use > >> the switching window keyboard shortcut all I want and nothing > >> happens. This even goes so far that modal dialogs (exception windows, > >> open/save dialog) are opened behind(!) all other windows. So I first > >> need to move the IDE and other windows out of the way before I can > >> work in that dialog. I need to restart the IDE to revert to the > >> original behavior again (for a while...). > >> For now I've only achieved this problem with the IDE, not with a > >> custom program. It would be nice if someone had an idea what I could > >> test to narrow this problem down (the console output does not print > >> anything useful). > > > > If you have trouble with ShowModal, then it is a bug in the LCL gtk2 > > interface or below. > > ShowModal had in the past some problems with other window managers > > too. > > Please update to 40085, compile with -dVerboseTransient, then run > > again. When it happens again look at the end of the output for 'DEFINE > > transient'. > > I've done as you proposed (it's an IDE with virgin settings and without > docking, just in case) and I've attached two debug outputs. In both > cases I have started the IDE and opened the File Open dialog with > Ctrl+O. In the "normal" case I've closed the dialog using "ESC" in the > "problem" case I've first used "Win+k" to switch to a different window > of the IDE (which wasn't moved to front of course, but the windows > manager nevertheless marked the windows as focused) and then I've closed > the dialog. After this forceful switch the behavior described in my > original mail appeared (reproduceable). > >From the output: The LCL gtk2 interfaces sets the right order. TOpenDialog on top of OI on top of MainIDE on Form1 on SrcNB on MsgView. So, the question is what does this WM need more than gtk_window_set_transient_for. http://developer.gimp.org/api/2.0/gtk/GtkWindow.html#gtk-window-set-transie nt-for

Maybe an trial with same behaviour as for 'kwin' wm. TGtk2WidgetSet.Create
...
if (GetWindowManager = 'kwin') or (GetWindowManager='YOURWM') then ...

With that part I've fixed transient windows behaviour under kwin (KDE).

Real name you can find with DebugLn(GetWindowManager).

zeljko

Reply by email

Sven Barth
to Mattias Gaertner: On Fri, 01 Feb 2013 01:44:17 +0100 According to its source code, "awesome" knows the…
Mattias Gaertner wrote 22 lines
On Fri, 01 Feb 2013 01:44:17 +0100 Hans-Peter Diettrich wrote: > Mattias Gaertner schrieb: > >> >From the output: The LCL gtk2 interfaces sets the right order. >> TOpenDialog on top of OI on top of MainIDE on Form1 on SrcNB on >> MsgView. >> So, the question is what does this WM need more than >> gtk_window_set_transient_for. >> http://developer.gimp.org/api/2.0/gtk/GtkWindow.html#gtk-window-set-transient-for > > A WM manages the windows, and a widgetset (gtk...) only can tell the WM > how his windows should be ordered. A WM may e.g. reorder the window > order on focus switch or other actions, without telling or asking the > widgetset. According to its source code, "awesome" knows the transient WM HINT. To make sure: Sven, please test if you can focus or bring to front other IDE windows while a modal dialog is open. Before the error happens and after.

The point is: I can focus other windows without problems (I'm using the "focus follows mouse cursor" feature), but I can't interact with those other non-modal windows and they also aren't brought to the front.

I've attached a log where I did the following:
* openen open file dialog
* focused object inspector by moving the mouse there
* closed the dialog
* moved the mouse (and thus the focus) onto the following windows (in that order)
- object inspector
- form
- source editor
- message window
* opened the dialog again
=> the dialog now appeared behind all other windows

Regards,
Sven
-------------- next part --------------
SetPrimaryConfigPath NewValue="/home/sven/.lazarus/1.1-new" -> "/home/sven/.lazarus/1.1-new" TMainIDE.ParseCmdLineOptions:
PrimaryConfigPath="/home/sven/.lazarus/1.1-new/"
SecondaryConfigPath="/etc/lazarus"
Hinweis: CodeTools-Konfigurationsdatei nicht gefunden - verwende Voreinstellungen NOTE: help options config file not found - using defaults TGtk2WidgetSet.ShowHide HIDE TSplashForm
TGtk2WidgetSet.UntransientWindow 0AFE38E0 LCLObject=TSplashForm TGtk2WidgetSet.UpdateTransientWindows
TGtk2WidgetSet.UpdateTransientWindows Untransient 4 MainIDE:TMainIDEBar TGtk2WidgetSet.UpdateTransientWindows Untransient 3 Form1:TForm1 TGtk2WidgetSet.UpdateTransientWindows Untransient 2 SourceNotebook:TSourceNotebook TGtk2WidgetSet.UpdateTransientWindows Untransient 1 ObjectInspectorDlg:TObjectInspectorDlg TGtk2WidgetSet.UpdateTransientWindows Untransient 0 MessagesView:TMessagesView TGtk2WidgetSet.UntransientWindow 0AFE38E0 LCLObject=TSplashForm TGtk2WidgetSet.UpdateTransientWindows
TGtk2WidgetSet.UpdateTransientWindows Untransient 4 MainIDE:TMainIDEBar TGtk2WidgetSet.UpdateTransientWindows Untransient 3 Form1:TForm1 TGtk2WidgetSet.UpdateTransientWindows Untransient 2 SourceNotebook:TSourceNotebook TGtk2WidgetSet.UpdateTransientWindows Untransient 1 ObjectInspectorDlg:TObjectInspectorDlg TGtk2WidgetSet.UpdateTransientWindows Untransient 0 MessagesView:TMessagesView TGtkWidgetSet.GtkWindowShowModal nil
TGtk2WidgetSet.UpdateTransientWindows
Define TRANSIENT Parent=MessagesView:TMessagesView Index=4 Wnd=0B1D3CD0 Child=SourceNotebook:TSourceNotebook Index=3 Wnd=0B1FBD80 Define TRANSIENT Parent=SourceNotebook:TSourceNotebook Index=3 Wnd=0B1FBD80 Child=Form1:TForm1 Index=2 Wnd=0B20A700 Define TRANSIENT Parent=Form1:TForm1 Index=2 Wnd=0B20A700 Child=MainIDE:TMainIDEBar Index=1 Wnd=0AFE3C50 Define TRANSIENT Parent=MainIDE:TMainIDEBar Index=1 Wnd=0AFE3C50 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=0 Wnd=0B1D40B8 Define TRANSIENT Parent=ObjectInspectorDlg:TObjectInspectorDlg Index=0 Wnd=0B1D40B8 Child=:TOpenDialog Index=0 Wnd=0B2CB020 Break old TRANSIENT i=5/6 OldTransientParent=00000000 Child=:TOpenDialog Index=0 Wnd=0B2CB020 Break old TRANSIENT i=4/6 OldTransientParent=00000000 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=0 Wnd=0B1D40B8 Break old TRANSIENT i=3/6 OldTransientParent=00000000 Child=MainIDE:TMainIDEBar Index=1 Wnd=0AFE3C50 Break old TRANSIENT i=2/6 OldTransientParent=00000000 Child=Form1:TForm1 Index=2 Wnd=0B20A700 Break old TRANSIENT i=1/6 OldTransientParent=00000000 Child=SourceNotebook:TSourceNotebook Index=3 Wnd=0B1FBD80 Set TRANSIENT i=1/6 Child=SourceNotebook:TSourceNotebook Index=3 Wnd=0B1FBD80 Parent=0B1D3CD0 Set TRANSIENT i=2/6 Child=Form1:TForm1 Index=2 Wnd=0B20A700 Parent=0B1FBD80 Set TRANSIENT i=3/6 Child=MainIDE:TMainIDEBar Index=1 Wnd=0AFE3C50 Parent=0B20A700 Set TRANSIENT i=4/6 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=0 Wnd=0B1D40B8 Parent=0AFE3C50 Set TRANSIENT i=5/6 Child=:TOpenDialog Index=0 Wnd=0B2CB020 Parent=0B1D40B8 DestroyCommonDialogAddOns :TOpenDialog
DestroyCommonDialogAddOns :TOpenDialog
TGtk2WidgetSet.UntransientWindow 0B2CB020 LCLObject=TOpenDialog TGtk2WidgetSet.UpdateTransientWindows
TGtk2WidgetSet.UpdateTransientWindows Untransient 4 MainIDE:TMainIDEBar TGtk2WidgetSet.UpdateTransientWindows Untransient 3 Form1:TForm1 TGtk2WidgetSet.UpdateTransientWindows Untransient 2 SourceNotebook:TSourceNotebook TGtk2WidgetSet.UpdateTransientWindows Untransient 1 ObjectInspectorDlg:TObjectInspectorDlg TGtk2WidgetSet.UpdateTransientWindows Untransient 0 MessagesView:TMessagesView TGtkWidgetSet.GtkWindowShowModal nil
TGtk2WidgetSet.UpdateTransientWindows
Define TRANSIENT Parent=MainIDE:TMainIDEBar Index=4 Wnd=0AFE3C50 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=3 Wnd=0B1D40B8 Define TRANSIENT Parent=ObjectInspectorDlg:TObjectInspectorDlg Index=3 Wnd=0B1D40B8 Child=Form1:TForm1 Index=2 Wnd=0B20A700 Define TRANSIENT Parent=Form1:TForm1 Index=2 Wnd=0B20A700 Child=SourceNotebook:TSourceNotebook Index=1 Wnd=0B1FBD80 Define TRANSIENT Parent=SourceNotebook:TSourceNotebook Index=1 Wnd=0B1FBD80 Child=MessagesView:TMessagesView Index=0 Wnd=0B1D3CD0 Define TRANSIENT Parent=MessagesView:TMessagesView Index=0 Wnd=0B1D3CD0 Child=:TOpenDialog Index=0 Wnd=0B2CB458 Break old TRANSIENT i=5/6 OldTransientParent=00000000 Child=:TOpenDialog Index=0 Wnd=0B2CB458 Break old TRANSIENT i=4/6 OldTransientParent=00000000 Child=MessagesView:TMessagesView Index=0 Wnd=0B1D3CD0 Break old TRANSIENT i=3/6 OldTransientParent=00000000 Child=SourceNotebook:TSourceNotebook Index=1 Wnd=0B1FBD80 Break old TRANSIENT i=2/6 OldTransientParent=00000000 Child=Form1:TForm1 Index=2 Wnd=0B20A700 Break old TRANSIENT i=1/6 OldTransientParent=00000000 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=3 Wnd=0B1D40B8 Set TRANSIENT i=1/6 Child=ObjectInspectorDlg:TObjectInspectorDlg Index=3 Wnd=0B1D40B8 Parent=0AFE3C50 Set TRANSIENT i=2/6 Child=Form1:TForm1 Index=2 Wnd=0B20A700 Parent=0B1D40B8 Set TRANSIENT i=3/6 Child=SourceNotebook:TSourceNotebook Index=1 Wnd=0B1FBD80 Parent=0B20A700 Set TRANSIENT i=4/6 Child=MessagesView:TMessagesView Index=0 Wnd=0B1D3CD0 Parent=0B1FBD80 Set TRANSIENT i=5/6 Child=:TOpenDialog Index=0 Wnd=0B2CB458 Parent=0B1D3CD0

Reply by email

Sven Barth
to zeljko: Maybe an trial with same behaviour as for 'kwin' wm. TGtk2WidgetSet.Create ... if…
zeljko wrote 57 lines
On Thursday 31 of January 2013 22:44:33 Mattias Gaertner wrote: > On Thu, 31 Jan 2013 22:15:26 +0100 > > Sven Barth wrote: >> On 31.01.2013 09:39, Mattias Gaertner wrote: >>> On Wed, 30 Jan 2013 21:24:38 +0100 >>> >>> Sven Barth wrote: >>>> [...] >>>> But rather often something happens (I don't know what exactly and I'd >>>> like to find this out) and then I can click on the window and I use >>>> the switching window keyboard shortcut all I want and nothing >>>> happens. This even goes so far that modal dialogs (exception windows, >>>> open/save dialog) are opened behind(!) all other windows. So I first >>>> need to move the IDE and other windows out of the way before I can >>>> work in that dialog. I need to restart the IDE to revert to the >>>> original behavior again (for a while...). >>>> For now I've only achieved this problem with the IDE, not with a >>>> custom program. It would be nice if someone had an idea what I could >>>> test to narrow this problem down (the console output does not print >>>> anything useful). >>> >>> If you have trouble with ShowModal, then it is a bug in the LCL gtk2 >>> interface or below. >>> ShowModal had in the past some problems with other window managers >>> too. >>> Please update to 40085, compile with -dVerboseTransient, then run >>> again. When it happens again look at the end of the output for 'DEFINE >>> transient'. >> >> I've done as you proposed (it's an IDE with virgin settings and without >> docking, just in case) and I've attached two debug outputs. In both >> cases I have started the IDE and opened the File Open dialog with >> Ctrl+O. In the "normal" case I've closed the dialog using "ESC" in the >> "problem" case I've first used "Win+k" to switch to a different window >> of the IDE (which wasn't moved to front of course, but the windows >> manager nevertheless marked the windows as focused) and then I've closed >> the dialog. After this forceful switch the behavior described in my >> original mail appeared (reproduceable). >> > >From the output: The LCL gtk2 interfaces sets the right order. > > TOpenDialog on top of OI on top of MainIDE on Form1 on SrcNB on > MsgView. > So, the question is what does this WM need more than > gtk_window_set_transient_for. > http://developer.gimp.org/api/2.0/gtk/GtkWindow.html#gtk-window-set-transie > nt-for Maybe an trial with same behaviour as for 'kwin' wm. TGtk2WidgetSet.Create ... if (GetWindowManager = 'kwin') or (GetWindowManager='YOURWM') then ... With that part I've fixed transient windows behaviour under kwin (KDE). Real name you can find with DebugLn(GetWindowManager).

With that extension (Note: I used a variable instead of calling GetWindowsManager twice) the behavior is now like this:
* when a modal dialog is open and you click(!) on a non-modal window than this window is brought to the front, but you can not interact with it (this does not happen if you just move the mouse onto that window to focus it)
* after the dialog is closed (and a another window was brought to the front while the dialog was open) I can still bring windows to the front by focusing them (and if I open a modal dialog again it's shown at the top of the other windows)

So while it's unnice that windows can be brought to the front while a modal dialog is open it at least solves the problem that I can't bring any windows to the front anymore...

I'll now also try Qt and report back...

Regards,
Sven

Reply by email

Sven Barth
to Sven Barth
Sven Barth wrote
I'll now also try Qt and report back...

Ok, Qt nearly has the same behavior as Gtk2 with the GetWindowManager workaround applied. I can move the cursor onto non-modal windows if a modal one is open and if I click them the window is moved to the top, but I can't interact with it.

There is one difference though: Qt forces the focus back to the modal window. I've noticed this, because awesome shows me a windows button for each open IDE window. Now in Gtk2 if I move the mouse to a different window than the modal one than this second windows stays active (the window's button is highlighted). But in Qt if I move the cursor to another window this window's button is only highlighted shortly and then the modal window one's is highlighted again.

Regards,
Sven

Reply by email

Hans-Peter Diettrich
to Sven Barth: The point is: I can focus other windows without problems (I'm using the "focus follows…
The point is: I can focus other windows without problems (I'm using the "focus follows mouse cursor" feature), but I can't interact with those other non-modal windows and they also aren't brought to the front.

Just a note:
The "focus follows mouse" is/was a dangerous feature of the XWindows manager. In the 80s some people found it funny to move the mouse of somebody else, who was entering text. As soon as the mouse left the current window, further keystrokes ended up in nirvana, or in another window.

The (later?) introduction of modal forms is implemented in both an window manager (system modal) *and* application (application modal), with possibly strange effects when used together with "focus follows mouse". When the WM doesn't honor or even doesn't know about application modal windows, and redirects input to other than the application top-level modal window, the results can become inpredictable.

DoDi

Reply by email

Sven Barth
to Sven Barth: With that extension (Note: I used a variable instead of calling GetWindowsManager twice)…
Sven Barth wrote 71 lines
On 01.02.2013 07:19, zeljko wrote: > On Thursday 31 of January 2013 22:44:33 Mattias Gaertner wrote: >> On Thu, 31 Jan 2013 22:15:26 +0100 >> >> Sven Barth wrote: >>> On 31.01.2013 09:39, Mattias Gaertner wrote: >>>> On Wed, 30 Jan 2013 21:24:38 +0100 >>>> >>>> Sven Barth wrote: >>>>> [...] >>>>> But rather often something happens (I don't know what exactly and I'd >>>>> like to find this out) and then I can click on the window and I use >>>>> the switching window keyboard shortcut all I want and nothing >>>>> happens. This even goes so far that modal dialogs (exception windows, >>>>> open/save dialog) are opened behind(!) all other windows. So I first >>>>> need to move the IDE and other windows out of the way before I can >>>>> work in that dialog. I need to restart the IDE to revert to the >>>>> original behavior again (for a while...). >>>>> For now I've only achieved this problem with the IDE, not with a >>>>> custom program. It would be nice if someone had an idea what I could >>>>> test to narrow this problem down (the console output does not print >>>>> anything useful). >>>> >>>> If you have trouble with ShowModal, then it is a bug in the LCL gtk2 >>>> interface or below. >>>> ShowModal had in the past some problems with other window managers >>>> too. >>>> Please update to 40085, compile with -dVerboseTransient, then run >>>> again. When it happens again look at the end of the output for 'DEFINE >>>> transient'. >>> >>> I've done as you proposed (it's an IDE with virgin settings and without >>> docking, just in case) and I've attached two debug outputs. In both >>> cases I have started the IDE and opened the File Open dialog with >>> Ctrl+O. In the "normal" case I've closed the dialog using "ESC" in the >>> "problem" case I've first used "Win+k" to switch to a different window >>> of the IDE (which wasn't moved to front of course, but the windows >>> manager nevertheless marked the windows as focused) and then I've >>> closed >>> the dialog. After this forceful switch the behavior described in my >>> original mail appeared (reproduceable). >>> >> >From the output: The LCL gtk2 interfaces sets the right order. >> >> TOpenDialog on top of OI on top of MainIDE on Form1 on SrcNB on >> MsgView. >> So, the question is what does this WM need more than >> gtk_window_set_transient_for. >> http://developer.gimp.org/api/2.0/gtk/GtkWindow.html#gtk-window-set-transie >> >> nt-for > > Maybe an trial with same behaviour as for 'kwin' wm. > TGtk2WidgetSet.Create > ... > if (GetWindowManager = 'kwin') or (GetWindowManager='YOURWM') then ... > > With that part I've fixed transient windows behaviour under kwin (KDE). > > Real name you can find with DebugLn(GetWindowManager). With that extension (Note: I used a variable instead of calling GetWindowsManager twice) the behavior is now like this: * when a modal dialog is open and you click(!) on a non-modal window than this window is brought to the front, but you can not interact with it (this does not happen if you just move the mouse onto that window to focus it) * after the dialog is closed (and a another window was brought to the front while the dialog was open) I can still bring windows to the front by focusing them (and if I open a modal dialog again it's shown at the top of the other windows)

I have put up a patch here: http://bugs.freepascal.org/view.php?id=23917 It would be nice if it would be applied. :) (maybe I should have set the category to "Patches"...)

Regards,
Sven

Reply by email