-
Notifications
You must be signed in to change notification settings - Fork 364
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
fix: multi screen window show #450
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
if (Configuration.shared.showWindowMultiScreen == EZShowWindowMultiScreenAuto) { | ||
screen = [self screenOfMousePosition]; | ||
} else { | ||
screen = NSScreen.mainScreen; // EZShowWindowMultiScreenFixed fixed in main screen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it should not use mainScreen here, it should use the screen when selecting words.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally, the position of the word is basically the same as the mouse position, but if the user moves the mouse position quickly during the query, or even across multiple screens, the problem will be complicated, which I have not considered before.
I thought about it and felt that there is no need to add an additional option here. We should use the screen where the selected word is located, rather than the current mouse position.
Adding an extra setting option may confuse users. Using the location of word selection aligns better with user intuition.
okay I will fix it later |
…sydict into fix/show_window_multi_screen
I remove the picker from the settings page. When the user starts the query action I record the mouse-located screen and remove this record when the floating window closes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it, but the current code does not work #442 (comment) :
Get the word on screen A, then move the mouse to screen B, and then use the shortcut keys to translate the word. The query window should be displayed at the word pick-up position on screen A.
This problem can be a bit complex, involving multiple screens of records and the handling of the location of the display query window. If you're not good at solving it, I can take over later. |
Oh, I now understand your issue. I didn't consider issue #442 earlier and only focused on the mouse move duration during query translation. To address this, I will record the screen when starting a query like this
Let me try it first. I'll ask for your help if I find it difficult for me. |
@tisfeng My idea is to record the screen when a word is selected for translation and display a query window on this screen. For other modes of translation, the screen will still be recorded when the query is initiated. What do you think about it? |
I'm not so sure, you can try it and then we'll test it. |
okk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still doesn't work.
Although the latest code can record screen A #450 (review) , the position of the query window displayed when using the shortcut key to stroke the words to translate is inaccurate, and there is a problem that the query window flickers between screen A and screen B.
It's not easy for me to record a video to show you this problem, I suggest you test it yourself using multiple screens, its very easy to reproduce.
@AkaShark When you have time, please continue pushing this PR. |
okay, I will try to fix it in the last few days |
I'm sorry I've been a little busy lately. I'll finish this issue as soon as possible. |
ok, you can schedule as you see fit. |
closed #442
Add a picker in the general page to display the window as auto or fixed when translation finishes.