[ltk-user] resizing canvas, exiting main loop, fullscreen

Tamas K Papp tkpapp at gmail.com
Fri Apr 27 14:22:20 UTC 2012


cage <cage at katamail.com> writes:

> On Fri, Apr 27, 2012 at 01:53:38PM +0200, Tamas K Papp wrote:
>> Hi,
>
> Hello!
>  
>>         (bind canvas "<ButtonPress-2>"
>>               (lambda (evt)
>>                 (declare (ignore evt))
>>                 (setf *exit-mainloop* t)))))))
>> 
>> However, 
>> 
>> a. the application does not exit (maybe I am doing it wrong, I found
>> *exit-mainloop* in some examples),
>
> I can not help for the rest of the questions but "buttonpress-2" binds
> to the "wheel" button of the mouse on my system, try "<ButtonPress-3>"
> instead.

Thanks!  I basically have it under control now, see:
http://paste.lisp.org/display/129192

In particular, I defined set-wm-attributes to make the window full
screen.  I wonder if that would be a useful addition to LTK.

Currently I have the following issues:

1. I can't make the border disappear around the canvas.

2. If I go near the top/bottom of the screen, or move around too much
with the mouse, the script crashes with the following message:

"The value 0 is not of type CHARACTER."

and I get a debugging window.  Suggestions to resolve these would be
appreciated.  Also, comments on the code are welcome, I figured things
out by reading the source.

But LTK is truly amazing!  I wrote this application in about 30 minutes
and it basically does what I want it to do.

Best,

Tamas




More information about the ltk-user mailing list