bool wxTaskBarIconAreaBase::IsProtocolSupported()
{
- static int s_supported = -1;
- if (s_supported == -1)
- {
- Display *display = GDK_DISPLAY();
- Screen *screen = DefaultScreenOfDisplay(display);
-
- char name[32];
- g_snprintf(name, sizeof(name), "_NET_SYSTEM_TRAY_S%d",
- XScreenNumberOfScreen(screen));
- Atom atom = XInternAtom(display, name, False);
+ Display *display = GDK_DISPLAY();
+ Screen *screen = DefaultScreenOfDisplay(display);
- Window manager = XGetSelectionOwner(display, atom);
+ char name[32];
+ g_snprintf(name, sizeof(name), "_NET_SYSTEM_TRAY_S%d",
+ XScreenNumberOfScreen(screen));
+ Atom atom = XInternAtom(display, name, False);
- s_supported = (manager != None);
- }
+ Window manager = XGetSelectionOwner(display, atom);
- return (bool)s_supported;
+ return (manager != None);
}
//-----------------------------------------------------------------------------