[pm-h] Disabling the Close Window X
Fraser Baker
flbaker at sbcglobal.net
Mon Nov 17 14:18:52 PST 2014
Hi:
Getting the Client Computer Name or any other identifying feature is
difficult. The Fingerprint idea may be defeated by updating a browser
plugin. I am now working to control my Event Notification page using links
in the page, but this can be defeated if the user closes the page using the
Close Window X.
I am able to trap this action using Javascript but can't get it to do what I
need.
It appears that Perl can redraw the title bar without the X. I have tried a
couple of examples but can't get this to work either. The shortest code is
below. This is inserted into my page at the beginning. Any thoughts?
use Tk;
my $main=MainWindow->new();
my $quit=$main->Button(-text=>"Exit",-command=>sub
{$main->destroy})->pack();
$main->resizable(0,0);
$main->protocol('WM_DELETE_WINDOW',sub{return;});
$main->bind('<Unmap>',sub{$main->deiconify});
$main->overrideredirect(1);
Fraser
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/houston/attachments/20141117/37509369/attachment.html>
More information about the Houston
mailing list