NSStatusItem menu not showing in full screen mode for Mac os 10.13.1

all

I added one NSStatusItem to the status bar of my test app and it works well on Mac ox 10.12, not only in normal model but full screen as well. When I switch to Mac os 10.13 it doesn't display the menu in full screen model.

self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
        self.statusItem.highlightMode = YES;
        self.statusItem.menu = self.dummyMenu;
        [self.statusItem.menu setDelegate:self];
        self.statusItem.image = image;
      

Run codeHide result


Does anyone have any ideas? Popup menu in full screen will not show

+3


source to share


1 answer


I also faced the same problem and found a solution that

[NSApp setActivationPolicy:NSApplicationActivationPolicyAccessory];

      



shows the menu while hiding its main menu and dock. Hope this helps.

-1


source







All Articles