Skip to content

fix: center and focus not being allowed in config#2199

Merged
lucasfernog merged 2 commits intotauri-apps:devfrom
FabianLars:fix/window-config
Jul 12, 2021
Merged

fix: center and focus not being allowed in config#2199
lucasfernog merged 2 commits intotauri-apps:devfrom
FabianLars:fix/window-config

Conversation

@FabianLars
Copy link
Member

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Docs
  • New Binding Issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes. Issue #___
  • No

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

@FabianLars FabianLars requested a review from a team as a code owner July 12, 2021 08:53
@FabianLars FabianLars requested a review from a team July 12, 2021 08:53
window = window.position(x, y);
}

if config.center {
Copy link
Member Author

Choose a reason for hiding this comment

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

This way center overwrites x and y. I don't know if it should do that tho.

pub fullscreen: bool,
/// Whether the window will be initially hidden or focused.
#[serde(default = "default_focus")]
pub focus: bool,
Copy link
Member Author

Choose a reason for hiding this comment

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

Changing this in tauri.conf.json doesn't seem to make a difference (at least on Windows).

Copy link
Member

Choose a reason for hiding this comment

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

We decided to remove focus from WindowBuilder and WindowAttributes at Tao, so if tauri wants to support this, they would have to explicitly call window.set_focus().

Copy link
Member Author

Choose a reason for hiding this comment

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

Should i remove the focus stuff again? -> Make this pr only about the center thingy?

Copy link
Member

Choose a reason for hiding this comment

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

It is @lucasfernog decision.

@lucasfernog lucasfernog merged commit bc2c331 into tauri-apps:dev Jul 12, 2021
@FabianLars FabianLars deleted the fix/window-config branch July 12, 2021 15:04
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.

3 participants