2

I am using Zenity 3.10.2 and any time I use Zenity, regardless of dialog type, the dialog it brings up has focus. i.e. I can straight away press "Enter" straight away and proceed. (I need this ability for automation)

However, there is one exception and it is very difficult to test. It occurs during the KIWI installation of a custom Linux distro and involved a question dialog being created with no focus. Neither enter nor tab have any effect.

There is a bash script which creates this dialog. When I run this in all other contexts, It has focus, but in this install it does not, the cursor appears in random places all around the place. However, from what I can see, the whole point of Zenity is on-top, already focused dialogs.

The actual call to create the dialog is the result of sourcing a file that has the bash script in it i.e. ". ~/.bashrc". Even this approach, always works when I test it manually.

Any ideas as to what could cause a Zenity dialog to be created without focus? Or any way using just Zenity to reclaim / change the focus?

I am aware you can use a window manager such as wmctrl to bring the Dialog to the focus. However this currently not a used package and shouldn't have to do anything else as this is just a simple dialog.

WINDOWMANAGER=/usr/bin/gnome-session

Any guidance would be much appreciated!

mgibson
  • 6,103
  • 4
  • 34
  • 49
  • `wmctrl` is not a "window manager" in the general use of that term. It does manage windows but a "window manager" is the application that manages windows in general (i.e. metacity, kwin, fluxbox, etc.). – Etan Reisner Apr 05 '16 at 14:49
  • That said the choice of giving a new window default focus is, in part, up to the actual window manager. Is the issue here that the dialog doesn't work or that it isn't given the input focus by default? If the latter than do other dialogs created by the same script/process get input focus by default? Does this dialog *differ* in some way from the others? Does it happen under different circumstances (in terms of other window management actions the user might be taking)? – Etan Reisner Apr 05 '16 at 14:51

0 Answers0