Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog() Needs System Model Option and/or Added to the start bar so it can be found #2947

Open
dbareis opened this issue Jan 16, 2025 · 3 comments · May be fixed by #2956
Open

Dialog() Needs System Model Option and/or Added to the start bar so it can be found #2947

dbareis opened this issue Jan 16, 2025 · 3 comments · May be fixed by #2956
Labels
feature New feature request

Comments

@dbareis
Copy link

dbareis commented Jan 16, 2025

RE: https://copyq.readthedocs.io/en/latest/scripting-api.html#dialog

On Windows 11 and COPYQ 9.1.0

Sometime dialogs are slow to show and they go behind other windows, there is no way to find those. You may find them if you minimise each window but not if you minimise them all at once (WIN+D). Similar issue if a window opens on top of the copyq dialog. This is happening often enough to be really annoying, and to minimise the window popping on top I first have to close some of its dialogs.

As the dialog() title doesn't get added to the start bar you can't see it that way. It doesn't go into anywhere in copyq that I have seen.

What I'd like is an option to make the dialog system modal (on top) or an always on top option and/or an option to add the title to the start bar. Maybe an option to abort the script after a period on dialog inactivity also.

@dbareis dbareis added the feature New feature request label Jan 16, 2025
@hluk
Copy link
Owner

hluk commented Feb 5, 2025

Can you check if new build fixes this? https://ci.appveyor.com/project/hluk/copyq/builds/51457867/artifacts

There are additional attributes you can set for the dialog():

  • '.modal' - set to true to make the dialog modal (to avoid other windows to get input focus)
  • '.onTop' - set to true for the dialog to stay above other windows
  • '.noParent' - set to true to avoid attaching the dialog to the main window

For example: dialog(..., '.modal', true)

Not sure which combination of attributes would help.

@dbareis
Copy link
Author

dbareis commented Feb 6, 2025

Thanks for the code update.

  • ".onTop" works for me, without any obvious side effects.
  • ".modal" doesn't work so I assume it is application (not system) model (which should keep it above the main CopyQ dialog).
  • ".noParent" doesn't seem to do much :-)

I tried combinations without any obvious effect.

@hluk
Copy link
Owner

hluk commented Feb 6, 2025

Thanks for testing. Would the ".onTop" attribute work for you?

I've added few more attributes to modify the dialog window type: https://ci.appveyor.com/project/hluk/copyq/builds/51462901/artifacts

  • '.popupWindow', '.sheetWindow', '.toolWindow', '.foreignWindow' - set/unset the type of dialog window (see Qt::WindowFlags for details)

Example: dialog(..., '.sheetWindow', false, '.popupWindow', true, '.foreignWindow', true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants