Skip to content
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

WinSparkle dialogs not centred on parent application #22

Closed
vslavik opened this issue May 27, 2014 · 4 comments
Closed

WinSparkle dialogs not centred on parent application #22

vslavik opened this issue May 27, 2014 · 4 comments

Comments

@vslavik
Copy link
Owner

vslavik commented May 27, 2014

When using WinSparkle on a dual monitor setup and the application is used on the second monitor, all WinSparkle dialogs appear centered in the main monitor rather than the parent application.

Another reason to make the hosting app's main window parent of WinSparkle's dialogs is focus handling: WinSparkle window should stay on top of the app and not be hidden behind it.
The only complication: determining app's main window correctly.

@jasonfagan
Copy link

This is definitely something useful as I am currently having issues with the WinSparkle dialog being hidden behind the parent window. One solution might be to add a SetParentHWND function to and explicitly tell WinSparkle the main window, what are your thoughts?

@vslavik
Copy link
Owner Author

vslavik commented Sep 8, 2014

This is definitely something useful as I am currently having issues with the WinSparkle dialog being hidden behind the parent window.

But that has nothing at all to do with centering on windows, does it? If you have an issue with Z-order, please file a separate issue, preferably with at least some details and ideally a reproducible case (better yet, make that a PR with a fix ;). WinSparkle puts itself at the top of Z-order, so if that doesn't happen, it's clearly a bug.

what are your thoughts?

Speaking of this issue, i.e. centering, I'm against it — that's one more bit of data that the hosting app has to manage (app windows change in time). If anything can be done automatically, it should be. Turns out this is not even a hard problem: http://stackoverflow.com/questions/6202547/win32-get-main-wnd-handle-of-application

@jasonfagan
Copy link

No indeed you are right, just thought that if you were considering centering, then the z-ordering could also be in there. The z-ordering doesn't appear to work but that may have more to do with my application, I will certainly investigate and if there is a fix for it you'll get a PR :)

btw, thanks for a great library.

@vslavik
Copy link
Owner Author

vslavik commented Jan 17, 2015

The z-ordering doesn't appear to work

Related: likely cause of that is something along the lines of #41.

Centering fixed in ae99e5a and f5a0636

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants