Skip to content

Conversation

@chenxiao1990
Copy link
Contributor

This PR resolves feature request #1439.
Add windows 、linux platform WindowSetAlwaysOnTop function .
Darwin platform no environment , Not implemented.
JS runtime interface Not implemented.

Copy link
Member

@leaanthony leaanthony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this. A few things:

  • there's already functions for top level windows that we call during startup so we should reuse those
  • It looks like the calls to set and unset the top window are the same
  • We'd need to add a JavaScript method for completeness
  • The docs will need updating with the new runtime method

It's a good start though! 👍

@chenxiao1990
Copy link
Contributor Author

chenxiao1990 commented Jun 9, 2022

Thanks for opening this. A few things:

  • there's already functions for top level windows that we call during startup so we should reuse those
  • It looks like the calls to set and unset the top window are the same
  • We'd need to add a JavaScript method for completeness
  • The docs will need updating with the new runtime method

It's a good start though! 👍

Because sometimes we need to dynamic set top/untop , so startup option is not enough.

Fix set and unset the top window are the same , i add WindowSetUnalwaysOnTop func.

@chenxiao1990 chenxiao1990 force-pushed the feature/setAlwaysTop branch from 8045a7b to 0ec7a24 Compare June 15, 2022 03:23
@chenxiao1990
Copy link
Contributor Author

Thanks for opening this. A few things:

  • there's already functions for top level windows that we call during startup so we should reuse those
  • It looks like the calls to set and unset the top window are the same
  • We'd need to add a JavaScript method for completeness
  • The docs will need updating with the new runtime method

It's a good start though! 👍

add a JavaScript method for completeness
The docs updating with the new runtime method

@leaanthony
Copy link
Member

This is looking good! Do you think we should refactor it so that we have a single API call WindowSetAlwaysOnTop(bool) ?

@chenxiao1990
Copy link
Contributor Author

Yes, i think a single api call WindowSetAlwaysOnTop(bool) is a good idea.
I will modify it.

@leaanthony
Copy link
Member

LGTM!

@leaanthony leaanthony enabled auto-merge (squash) June 22, 2022 10:54
@leaanthony leaanthony disabled auto-merge June 22, 2022 10:54
@leaanthony leaanthony merged commit 0729296 into wailsapp:master Jun 22, 2022
@leaanthony leaanthony added this to the v2.0.0 milestone Jun 22, 2022
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.

2 participants