-
Notifications
You must be signed in to change notification settings - Fork 18
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
Would you mind merging my recent code update to window-finder-control? #1
Open
chjfth
wants to merge
80
commits into
joeyespo:master
Choose a base branch
from
chjfth:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generate binary files in bin\Debug, bin\Release respectively.
…so that the program works on Target Platform=AnyCPU. The DllImport that caused problem was WindowFromPoint(). It accepts one POINT parameter as opposed to two int parameter. With two int parameters, it happens to work ONLY on Target Platform=x86, but not AnyCPU or x64.
… ChildWindowFromPoint was wrong. Fix repetitive and erroneous code in picTarget_MouseUp().
Roughly tested on Win10.1909 and Win7, both OK.
* WindowFinder add new property isFindOnlyTopLevel, setting it to true to find/target only top-level window. * Even if isFindOnlyTopLevel=false, human user can press Ctrl(while aiming) to target only top-level window. // Implementation is a bit ugly yet, using a 100ms timer to check for Ctrl key. Pending Q: picTarget_KeyDown() cannot be triggered, why?
…this works for DWM-enabled top-level window. -- user determines which to use via property WindowFinder.tgwHighlightMethod . (roughly tested)
…D, not blindly placed at TOP-MOST.
dpiAware.manifest is provided as a spare. If you tell csproj to embed it, it will become Sys-dpi aware on Win7 and Per-monitor-dpi aware on Win81+.
dpiAware-SysDpi.manifest -- use at your request.
… grabber highlight a StdDpi target window with wrong FrameRgn size.
internal static class Win32 -> public static class Win32
… work correctly when Win7 System-DPI is set to non-100%. The program could not distinguish whether a target window is a DPI-unaware one or an Sys-dpi-aware one. Now, with the help of DwmGetWindowAttribute(DWMWA_EXTENDED_FRAME_BOUNDS), we can distinguish them finally. Key function: Win7_SpecialAdjust().
…ebug-Output window.
Remove code: this.CancelButton = this.btnClose;
…onstrating and debugging.
…ned by ClientToScreen). This reveals a subtle problem: When we set primary screen DPI to non-100%, we will see different behavior on Win7 vs Win10 when we drag the finder *across* a DPI-unaware window and a DPI-aware window. Win7 will exhibit some buggy(or say, inconsistent) behavior, while Win10 behaves consistently.
…y when the target-window is REALLY changed(avoid verbose repetitive calls).
I think we should use a new name that is a bit more unique.
If monitor is 150% DPI and wcFinder is SysDpi-aware, the target-window physical pixel width WAS reported too large.
… report pixel width as if all monitors are of same DPI-scaling value, that is, I may give wrong result in case of Win81 using mixmode-scaling.
So TestApp title says ver:2.1.10 . Update Win81 warning text.
On Win81, when "Let me choose one scaling level for all my displays" is NOT ticked, changing DPI scaling does NOT require user logout and login. This means, DESKTOPHORZRES and HORZRES value can change dynamically. So on Win81, the caller should pass in need_fresh=true to get fresh value. Rename: Win7_SystemDpi() -> Win_GetPrimaryScreenDpi().
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
README.md has been updated to reflect the new features.