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
Shell integration always open restored window in Windows10 #2322
Comments
If CudaText was closed in maximized state, it must open maximized- this is ok in separate run but not so with shell dll? |
Hi @Alexey-T, Result OK - Maximized view:
Result OK - Restored view:
Result FAIL:
Another result FAIL:
|
so app don't know that it was maximized before it was minimized, and makes normal view (restored). can we do something here? |
The test cases 3 and 4 (the ones which failed) only fail when I test under Windows 10 x64 v1809 with CudaText v1.91.0. When I test under Windows 7 x64 with same version of CudaText the program behaves as expected. Seems like this issue is a combination of a "special behaviour" (not to call it "bug") of Windows 10 and the current state of the related LCL code. Not sure how to handle that. I would have to set up a development environment on a Windows 10 machine or VM to debug that. But currently I'm out of time for that. |
Maybe it's worth a try to replace |
|
Hi @Alexey-T At the end I proceeded with the uninstall of the Shell-Integration-Dll (of @dinkumoil) for the above issues, then I installed cuda-explorer-integration that uses registry entries for add context menu options, but the behavior is the same, even If I launch CudaText as a external tool from others programs (IDE, DB Manager, etc) I am getting the same issues, it opens in restored view or no showing the editor. Its possible that the problem is with the editor itself? Thanks in advance. |
it is "true"? If not then Cud must not be maximized.
|
I found another fail that happens only under Windows 10 (tested with v1809 x64):
When in step 3. the "Minimize" button in the window's title bar is clicked, the window minimizes immediately. If the sequence above is tested under Windows 7 x64, everything works as expected. The window minimizes after a single click on its task bar symbol. This whole issue is related to Windows 10 and the window handling code of the LCL only, my shell integration DLL is not involved. |
@dinkumoil I will give this info to Lazarus dev's, in the mailing list. |
Hi @Alexey-T This is my config:
I suppose that @dinkumoil is enough. I am testing it on a Windows 10 Pro v1909 x64. |
@jairomtzant I guess (not sure) that when Win runs Cud, it uses ShellExecute with SW_SHOW* flag to open program in a normal window- so the maximized state is lost... Cud must restore maximized state but OS may overdo it |
Hi @Alexey-T What you mention is something that I can verify? o_O? But is ok, when I open Cud the first time It can be opened in Maximized state, If I don't change that status (Alt+Tab by example) Cud remembers this status even If I open some file using a Shell/Integration Explorer/Launching as ExternalTool from another program, but, but If I Minimize Cud, is when happens what I mention, its open in Restored View, and I If Maximize and then Minimize, the second time, Cud is not restored anymore when I open a new file. |
I see what code does it
here we set Normal state. Will see how to fix it. |
@dinkumoil It's fixed, see very simple patch linked above. 1.94.5 beta-- https://yadi.sk/d/XBA6P9Hmxl2yGA |
I have tested quickly, Cud shows to work properly. |
I can confirm that the two failing test cases from @jairomtzant initial posting are working now. But the test case I elaborated about in my last posting is still failing. |
Moving to #2411 |
Hi @Alexey-T
I was testing the plugin Explorer Integration and the new shell-dll developed by @dinkumoil, but the result is the same, when I have CudaText in minimized or closed state, after launch the "Open with CudaText" context menu option, it always open the CudaText in restored window. Is there a config to open in Maximized window? as when you open CudaText with icon click?
The text was updated successfully, but these errors were encountered: