aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2011-03-01 10:15:14 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2011-03-01 10:15:14 +0000
commitdb48b94b45ebe6ac9dea92a6fa3af8b1a66f7e76 (patch)
tree10216084d7d9fd727b7209986ac57be781124fff
parent00c838a42a27458e2b70f8d40658f49bcc2a3e43 (diff)
implement QuitOnClose
svn path=/trunk/scripts/guiplugins/kiosk-plugin/; revision=14987
-rw-r--r--kiosk-plugin.tcl6
-rw-r--r--kiosk.cfg1
2 files changed, 7 insertions, 0 deletions
diff --git a/kiosk-plugin.tcl b/kiosk-plugin.tcl
index ce3cd94..1b8abd4 100644
--- a/kiosk-plugin.tcl
+++ b/kiosk-plugin.tcl
@@ -23,6 +23,7 @@ set ::kiosk::config(HideMain) True
set ::kiosk::config(WindowTitle) "Pd KIOSK"
set ::kiosk::config(HidePopup) True
set ::kiosk::config(ScrollBars) False
+set ::kiosk::config(QuitOnClose) True
@@ -74,6 +75,11 @@ proc ::kiosk::makekiosk {mywin} {
if { $::kiosk::config(WindowTitle) != "" } {
wm title $mywin $::kiosk::config(WindowTitle)
}
+
+ if { $::kiosk::config(QuitOnClose) } {
+ wm protocol $mywin WM_DELETE_WINDOW "pdsend \"pd quit\""
+ #bind $mywin <Destroy> "pdsend \"pd quit\""
+ }
}
diff --git a/kiosk.cfg b/kiosk.cfg
index 43618df..7240b22 100644
--- a/kiosk.cfg
+++ b/kiosk.cfg
@@ -5,3 +5,4 @@ HideMain True
WindowTitle "Pd KIOSK"
HidePopup True
ScrollBars False
+QuitOnClose True