NSWindow makeKeyAndOrderFront makes window appear, but not Key or Front

后端 未结 3 1824
死守一世寂寞
死守一世寂寞 2021-02-01 18:28

makeKeyAndOrderFront is not making my NSWindow key or front.

My app does not have a main window or menubar, which may be part of the proble

3条回答
  •  温柔的废话
    2021-02-01 19:09

    Both of these answers are correct. You'll also need to make sure you override canBecomeKey in your window subclass if it's borderless.

    This took be forever to figure out. (I wrote a blog post about the entirety of my solution.)

提交回复
热议问题