question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SetWindowIcon not working on MacOS (Apple Silicon)

See original GitHub issue

Summary

I just started using Silk.Net and I created basic window. As a developer I want to be able to set window icon for MacOS.

Steps to reproduce

  • Platform: Desktop (macOS Silicon)
  • Framework Version: .NET 6
  • API: OpenGL
  • API Version: OpenGL 4.5 Core
  1. Create Window
  2. Initialize Window
  3. SetWindowIcon

SetWindow icon not working in MacOS. I tried these extensions .png, .ico, .icns

@Beyley here is code example;

var bytes = File.ReadAllBytes(".//assets//icons//icon.icns");
var rawImage = new RawImage(64, 64, new Memory<byte>(bytes));
window.Initialize();
window.SetWindowIcon(ref rawImage);
window.Run();

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Beyleycommented, Oct 16, 2022

Summary

I just started using Silk.Net and I created basic window. As a developer I want to be able to set window icon for MacOS.

Steps to reproduce

* Platform: Desktop (macOS Silicon)

* Framework Version: .NET 6

* API: OpenGL

* API Version: OpenGL 4.5 Core


1. Create Window

2. Initialize Window

3. SetWindowIcon

SetWindow icon not working in MacOS. I tried these extensions .png, .ico, .icns

can you give us your example code? you likely are making a mistake when loading the image

0reactions
Beyleycommented, Nov 20, 2022

Confirmed to be an upstream issue, see remarks Not sure why wayland works now, i assume its just that the docs havent been updated yet (or maybe im running under Xwayland and thats whats giving it the icon?)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dock icon is overriden on Mac by setWindowIcon #3093
Dock icon is overriden on Mac by setWindowIcon #3093 ... a noticeable "jump" in the dock icon because the two icons are not...
Read more >
QT/C++ on MAC - Application Icon doesn't set
Two interesting points. Firstly, setting the icon using this->setWindowIcon in the main application window does not unfortunately set the dock ...
Read more >
Task Bar Icons not opening apps
When I click onto taskbar icons opens up applications folder instead of the actual app so have to click on the app in...
Read more >
Monterey dock icons not working
I recently upgraded to Monterey and now the dock icons do not function. I must go into my applications folder, find the software...
Read more >
Change your icons not working - Apple Community
hi everyone,. I've been trying to change a folder icon to a .jpeg image, but having followed the instructions in HT2493 I am...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found