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

On Windows, set name of Window Class #769 for v0.16 #773

Closed
wants to merge 1 commit into from

Conversation

geraudloup
Copy link
Contributor

allow to customize it instead of current value hard coded "Window Class"

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Checklist

Other information

allow to customize it instead of current value hard coded "Window Class"
@geraudloup geraudloup requested a review from a team as a code owner July 26, 2023 16:29
Copy link
Member

@amrbashir amrbashir 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 your contribution, could you also add a changefile in .changes directory?

@@ -1131,8 +1131,8 @@ unsafe fn init<T: 'static>(
Ok(win)
}

unsafe fn register_window_class() -> Vec<u16> {
let class_name = util::encode_wide("Window Class");
unsafe fn register_window_class<T: 'static>(window_classname: &String) -> Vec<u16> {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
unsafe fn register_window_class<T: 'static>(window_classname: &String) -> Vec<u16> {
unsafe fn register_window_class(window_classname: &str) -> Vec<u16> {

@@ -945,7 +945,7 @@ unsafe fn init<T: 'static>(
event_loop: &EventLoopWindowTarget<T>,
) -> Result<Window, RootOsError> {
// registering the window class
let class_name = register_window_class();
let class_name = register_window_class::<T>(&pl_attribs.window_classname);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let class_name = register_window_class::<T>(&pl_attribs.window_classname);
let class_name = register_window_class(&pl_attribs.window_classname);

@amrbashir
Copy link
Member

Just noticed this PR was opened against v0.16 branch, lets just focus on #770 and then I will cherry-pick it into v0.16 branch

@amrbashir amrbashir closed this Jul 26, 2023
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