don't cache tray protocol availability result in wxTaskBarIconAreaBase::IsProtocolSupported(), it may change at runtime
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -59,9 +59,6 @@ wxTaskBarIconAreaBase::wxTaskBarIconAreaBase()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool wxTaskBarIconAreaBase::IsProtocolSupported()
|
bool wxTaskBarIconAreaBase::IsProtocolSupported()
|
||||||
{
|
|
||||||
static int s_supported = -1;
|
|
||||||
if (s_supported == -1)
|
|
||||||
{
|
{
|
||||||
Display *display = GDK_DISPLAY();
|
Display *display = GDK_DISPLAY();
|
||||||
Screen *screen = DefaultScreenOfDisplay(display);
|
Screen *screen = DefaultScreenOfDisplay(display);
|
||||||
@@ -73,10 +70,7 @@ bool wxTaskBarIconAreaBase::IsProtocolSupported()
|
|||||||
|
|
||||||
Window manager = XGetSelectionOwner(display, atom);
|
Window manager = XGetSelectionOwner(display, atom);
|
||||||
|
|
||||||
s_supported = (manager != None);
|
return (manager != None);
|
||||||
}
|
|
||||||
|
|
||||||
return (bool)s_supported;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user