Tk Source Code

Artifact [fe92d0f3]
Login

Artifact fe92d0f381f67202adef69e1ca4686ace6aaa693f1dc8a21f243c30accee4246:

Attachment "tksystrayexists.diff" to ticket [92ab4292] added by emiliano 2023-07-21 03:57:11. (unpublished)
Index: library/systray.tcl
==================================================================
--- library/systray.tcl
+++ library/systray.tcl
@@ -108,11 +108,11 @@
 		uplevel #0 [dict get $_current -button3]
 	    }
 	}
     }
 
-    namespace export create configure destroy
+    namespace export create configure destroy exists
     namespace ensemble create
 }
 
 
 # Pure-Tcl system notification window for use if native implementation not available.
@@ -320,10 +320,15 @@
     }
     set _created 0
     set _current {}
     return
 }
+
+proc tk::systray::exists {} {
+    variable _created
+    return $_created
+}
 
 # Check systray options
 proc ::tk::systray::_check_options {argsList singleOk} {
     variable _options