tisfeng/Easydict

๐Ÿž Bug Report: window arrangement been changed after query text

Closed this issue ยท 5 comments

Please confirm the following:

  • Be sure to check out FAQ
  • I have carefully read the README
  • I have searched through the issues page but couldn't find a solution.(Including issue that has been closed)
  • Easydict has been upgraded to the latest version
  • I understand and agree to the above, and understand that the project maintainer has limited energy, issues that do not follow the rules may be ignored or closed directly

Problem description

window arrangement been changed after query text

Is the issue consistently reproducible?

Reproducible

Steps to Reproduce

  1. Open two Chrome(or any other app) window and one is focused
  2. Open a window next to Chrome window
  3. Query some content in Chrom
  4. Back to Chrome

Screenshot

Screen.Recording.2024-04-16.at.22.37.45.mov

Expected result

Not change window arrangement after back to the last frontmost app, current behavior is not proper in this case, I have to manually open the notes application after each query completed.

Proposed solution (optional)

Is it possible not to actively activate the previous window when closing the query window?

Device type and OS version

macOS 14.2.1

Are you willing to submit a PR to fix this issue?

  • I'm willing to submit a PR

I understand, indeed this could be a problem.

But this situation where one application has multiple windows is relatively rare, and should be acceptable for most users.

How should we fix it? Should we add an option to allow not automatically activating the previous application window?

I have compared Bob's behavior and found that its query window does not request to be focused, Chrom window has always been in focus, so they don't have such issue. Can we do the same?

No, I tried it and it automatically activates the previous frontend app as well.

I think this action is fine for the vast majority of users in most scenarios, especially when the user is typing in an input box, in this case hiding the Easydict window and then automatically activating the input box of the foreground application is useful, it makes it easy for the user to continue typing.

In some scenarios, activating the foreground application is necessary, for example, when using translated text to replace the original text.

Well, let's leave things as they are for now. Maybe we can see how to improve later.

ok