-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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 lags for UWP application in full screen mode #12860
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.
If this is used on places where we might need to do retries and other places where we might not need to do retries, why not make retryAttempts an argument for the function?
It could be called with 10 from fancyzones and 1 from everywhere else.
Just make sure you don't sleep at the end if this is the last retry, also. |
We also need to call it with one retry from fancyzones because @SeraphimaZ |
@mykhailopylyp those calls should be retried.
|
@SeraphimaZ
we still would have the lag on switching( Alt+Tab ) from full-screen uwp applications.
What is weird is that the following code is called on switching( PowerToys/src/modules/fancyzones/FancyZonesLib/FancyZones.cpp Lines 682 to 686 in 0440a89
Probably we should add some checks here. |
@SeraphimaZ |
I tested it with the Windows Settings app when I worked on #12284, only the second or third attempt was successful. The window was opening and after a short time it was moved to a zone. However, now it succeeds on the first attempt, I can't reproduce the same behavior. |
@SeraphimaZ IMO, even if sometimes uwp window is not moved to a last know fancy zone, it's not a big deal. On the other hand, lag for @SeraphimaZ, @jaimecbernardo, thoughts? |
@mykhailopylyp I agree that the lag is more important to fix. I think we could try to find another solution for moving uwp window to the last zone. |
Fixing the lag is more important. While 'move newly created window to the last known zone' failing is an annoyance, causing delays in other applications, especially making some unusable, such as games, is worse. Let's get this in then. |
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! Great work.
The retry loop has been removed as of microsoft#12860 , but the comment stayed.
The retry loop has been removed as of #12860 , but the comment stayed.
Summary of the Pull Request
What is this about:
Remove retries from
get_process_path
as this function is used in different places and should be generic. For example, when used in low-level keyboard hook it is unacceptable to block execution for 1 second(it happens for full screen UWP applications).When
alt+tab
is pressed in full-screen UWP application we receiveWM_PRIV_WINDOWCREATED
message andFancyZones::WndProc
is blocked for one second. Take into account, thatMove newly created windows to their last known zone
should be checked. So basically we have cases whenEnumChildWindows
doesn't find a different pid and retry doesn't make sense in this case.What is include in the PR:
How does someone test / validate:
Test for KBM
Ctrl(Left) + Q -> Play/Pause Media
forvideo.ui.exe
(Movies & TV)Test for fancy zones
Move newly created windows to their last known zone
Movies & TV
in full-screen modeAlt+Tab
@SeraphimaZ
Any idea how we can keep #12284 changes?
Quality Checklist
Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.