crategus / cl-cffi-gtk

cl-cffi-gtk is a Lisp binding to the GTK+ 3 library.
http://www.crategus.com/books/cl-cffi-gtk
146 stars 33 forks source link

If the window title is "clock" the window is not toplevel, even when explicitly requested. #30

Open plops opened 9 years ago

plops commented 9 years ago

The functions run and run-works have identical code except for the window title. The function run created the window without close button.

2014-10-17-21 09 10

(eval-when (:compile-toplevel :load-toplevel :execute)
  (ql:quickload :cl-cffi-gtk))

(defpackage :myclock 
  (:use :gtk :gdk :gobject :glib :pango :cairo :cffi :iterate :cl))

(in-package :myclock)
(defun run-works ()
  (sb-int:with-float-traps-masked (:divide-by-zero)
   (within-main-loop
     (let ((window (make-instance 'gtk-window
                  :type :toplevel
                  :title "clock-works"
                  :default-width 300
                  )))
       (g-signal-connect window "destroy"
             (lambda (widget)
               (declare (ignore widget))
               (leave-gtk-main)))
       (gtk-widget-show-all window))))
  (join-gtk-main))
(defun run ()
  (sb-int:with-float-traps-masked (:divide-by-zero)
   (within-main-loop
     (let ((window (make-instance 'gtk-window
                  :type :toplevel
                  :title "clock"
                  :default-width 300
                  )))
       (g-signal-connect window "destroy"
             (lambda (widget)
               (declare (ignore widget))
               (leave-gtk-main)))
       (gtk-widget-show-all window))))
  (join-gtk-main))
#+nil
(run-works)
#+nil
(run)
Ferada commented 8 years ago

Does this look like it? In which case it's unrelated to either this library or GTK in general.