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
added topmost and toggle_topmost, for Windows. #478
Conversation
…reen and toggle_fullscreen
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 changed the target branch to on_top
. Better to merge it with master, when all the implementations are done.
@@ -103,7 +103,8 @@ def _create_children(other_windows): | |||
|
|||
def create_window(title, url=None, html=None, js_api=None, width=800, height=600, x=None, y=None, | |||
resizable=True, fullscreen=False, min_size=(200, 100), hidden=False, frameless=False, | |||
minimized=False, confirm_close=False, background_color='#FFFFFF', text_select=False): | |||
minimized=False, topmost=False, confirm_close=False, background_color='#FFFFFF', |
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 prefer the param name on_top
. Topmost sounds too Windows-specific to me.
Toggle topmost mode | ||
""" | ||
self.gui.toggle_topmost(self.uid) | ||
|
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.
Though there is a toggle_fullscreen
, I am not convinced about introducing more toggle_
or set_
functions. We have had a similar dicussion with x, y, width and height attributes and it was decided to implemented those as class properties. Maybe this one could be implemented in a similar fashion, ie window.on_top = True
.
Opinions?
if not self.is_topmost: | ||
self.TopMost = True | ||
else: | ||
self.TopMost = False |
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.
Can be simplified as self.TopMost = not self.is_topmost
Heads up, that unrelated to this feature, my team moved forward with a different package instead, so I'm not going to continue on this. Thanks for the responsiveness. |
Any chance this feature will make it? |
Sure. There is a PR opened with my comments. As soon as somebody will make fixes, I will merge it.
|
Closes #476
Added examples, updated docs, added a trivial test that things don't error out.
Tested on my Windows machine that starting a webview window with topmost=True does in fact keep that window above others.