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

added topmost and toggle_topmost, for Windows. #478

Closed
wants to merge 1 commit into from

Conversation

tscizzlebg
Copy link
Contributor

@tscizzlebg tscizzlebg commented Feb 26, 2020

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.

@r0x0r r0x0r changed the base branch from master to ontop March 2, 2020 09:15
Copy link
Owner

@r0x0r r0x0r left a 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',
Copy link
Owner

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)

Copy link
Owner

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
Copy link
Owner

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

@tscizzlebg
Copy link
Contributor Author

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.

@N0ich
Copy link

N0ich commented Mar 24, 2020

Any chance this feature will make it?
I can check the changes if needed

@r0x0r
Copy link
Owner

r0x0r commented Mar 24, 2020 via email

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

Successfully merging this pull request may close these issues.

Always-in-front / Always-on-top window, on Windows
3 participants