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

Allow window to remain on top #445

Closed
NBurley93 opened this Issue Apr 27, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@NBurley93

NBurley93 commented Apr 27, 2018

It seems that there is no way currently to set a flag for the window to always remain on top. This can be a bit annoying when testing gui changes with a full-screen IDE environment like VSCode where the window is created behind the IDE.

I'm also not sure if there's platform specific code required for Win32/Mac/x11 to implement this

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented Apr 28, 2018

Not sure about this one... when the GUI is launched, it should come to the font. However, if you're in full screen, then Windows might be preventing it? What happens when you launch other applications while in fullscreen mode in VSCode?

There is specific code for Mac, which is necessary to have the GUI appear at the front. When you launch it from a fullscreen app (like the terminal) the GUI will appear on a different desktop.

I don't think linux (at least on the raspberry pi) really has fullscreen apps...

@NBurley93

This comment has been minimized.

NBurley93 commented May 3, 2018

When I launch other Win32 programs while VSCode is running full screen, they come to the front. I'm not sure if this is true with Mac/Linux as I haven't tested them. I may try on a Linux VM and see if it shares the same behavior for x11 windows.

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented May 5, 2018

OK - I've been doing a bit of googling, the following command will force your GUI to stay on top:
app.topLevel.attributes("-topmost", True)

But, currently appJar will override it.

So, you will need to set it as a start function:

def onTop():
    app.topLevel.attributes("-topmost", True)

app.setStartFunction(onTop)

That forces the window to stay on top in OSX, but still doesn't go over a fullscreen app, instead launching on a separate desktop.

I'm going to add this to appJar as a property.

@NBurley93 can you let me know if it makes any difference?

jarvisteach added a commit that referenced this issue May 6, 2018

Stay on top #445 & refactor subWindow #453
New property to keep the GUI on top
SubWindow refactored, to move most code into the SubWindow class.

Also:
* setPosition now accepts comma separated values
* visible now operates on current container
@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented May 6, 2018

Added new properties:

  • app.top = True
  • app.setOnTop(True)

@jarvisteach jarvisteach closed this May 6, 2018

@NBurley93

This comment has been minimized.

NBurley93 commented May 7, 2018

Hi @jarvisteach, Sorry for the late reply

It did the trick! The window now remains on top! Thank you so much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment