gdialog icon indicating copy to clipboard operation
gdialog copied to clipboard

Dialog window lies in background

Open swirly opened this issue 1 year ago • 3 comments

Describe the bug I launch gdialog from a terminal with

/usr/local/gDialog/gDialog.app/Contents/MacOS/gDialog msgbox --title "Dialog Title" --header "Dialog Header" --text "Dialog Text" 

the gdialog windows open but in the background. I thought the script was stuck

To Reproduce Steps to reproduce the behavior:

  • open a terminal
  • launch the command

Expected behavior the window should be foreground !

Desktop

  • big sur 11.7.4
  • iterm2

swirly avatar Apr 26 '23 19:04 swirly

Hi @swirly, have you tried using the "--focus" option? --focus | Makes the dialog window take focus and become the active window

giladdarshan avatar Apr 26 '23 19:04 giladdarshan

Thanks for your quick answer. I didn't. It works flawlessly. Shouldn't it be the default ?

swirly avatar Apr 28 '23 14:04 swirly

@swirly, one of the main goals behind gDialog was to provide a simple replacement for CocoaDialog so the syntax and default behavior for similar dialogs should be similar to what CocoaDialog provided (where it made sense). Also --no-focus option name sounded strange to me :)

Changing the default behavior to focus by default can cause negative impact if people update gDialog but not the scripts, so I prefer not to change it for existing dialogs.

giladdarshan avatar May 12 '23 06:05 giladdarshan