]> git.saurik.com Git - wxWidgets.git/commitdiff
don't cache tray protocol availability result in wxTaskBarIconAreaBase::IsProtocolSup...
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 30 Sep 2008 20:55:52 +0000 (20:55 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 30 Sep 2008 20:55:52 +0000 (20:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/taskbar.cpp

index 80bfd6b119dcebb03b89a2ef53f6bf55867374a8..ee192ae7b92c0f220f0d38145bdd5310da7a7300 100644 (file)
@@ -60,23 +60,17 @@ wxTaskBarIconAreaBase::wxTaskBarIconAreaBase()
 
 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);
 }
 
 //-----------------------------------------------------------------------------