From db48b94b45ebe6ac9dea92a6fa3af8b1a66f7e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 1 Mar 2011 10:15:14 +0000 Subject: implement QuitOnClose svn path=/trunk/scripts/guiplugins/kiosk-plugin/; revision=14987 --- kiosk-plugin.tcl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'kiosk-plugin.tcl') 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 "pdsend \"pd quit\"" + } } -- cgit v1.2.1