From 0ff435ca00f6ab1f2e434087dfa38048a1527808 Mon Sep 17 00:00:00 2001 From: Philippe Brochard Date: Wed, 30 May 2012 22:49:15 +0200 Subject: [PATCH] contrib/toolbar.lisp (clock): Add a clock module. --- ChangeLog | 4 ++++ contrib/toolbar.lisp | 9 ++++++--- src/clfswm.lisp | 4 ++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b90db3..1cf1374 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-05-30 Philippe Brochard + + * contrib/toolbar.lisp (clock): Add a clock module. + 2012-05-28 Philippe Brochard * contrib/toolbar.lisp: begining of toolbar support. diff --git a/contrib/toolbar.lisp b/contrib/toolbar.lisp index a5a5b30..17205b3 100644 --- a/contrib/toolbar.lisp +++ b/contrib/toolbar.lisp @@ -154,7 +154,7 @@ :width width :height height :background (get-color *toolbar-window-background*) - :border-width *border-size* + :border-width 0 :border (get-color *toolbar-window-border*) :colormap (xlib:screen-default-colormap *screen*) :event-mask '(:exposure :key-press)) @@ -213,8 +213,11 @@ (define-toolbar-module (clock) "The clock module" - (toolbar-draw-text toolbar (second module) (/ *toolbar-default-thickness* 2) - "Clock")) + (multiple-value-bind (s m h) + (get-decoded-time) + (declare (ignore s)) + (toolbar-draw-text toolbar (second module) (/ *toolbar-default-thickness* 2) + (format nil "~A:~A" h m)))) (define-toolbar-module (label) diff --git a/src/clfswm.lisp b/src/clfswm.lisp index c1bb567..51a44ed 100644 --- a/src/clfswm.lisp +++ b/src/clfswm.lisp @@ -134,6 +134,9 @@ (awhen (find-frame-window window) (display-frame-info it))) +(define-handler main-mode :resize-request (window) + (dbg :resize-request window)) + (defun error-handler (display error-key &rest key-vals &key asynchronous &allow-other-keys) "Handle X errors" @@ -204,6 +207,7 @@ (setf (xlib:window-event-mask *root*) (xlib:make-event-mask :substructure-redirect :substructure-notify :property-change + :resize-redirect :exposure :button-press :button-release -- 2.11.4.GIT