>From fbdcaad56109592e10d0f20b1b62c1bd334447b8 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Wed, 17 Aug 2011 15:13:50 +0200 Subject: [PATCH 6/6] Create focus/unfocus color stuff for float-group. Self update :-) --- AUTHORS | 2 +- floating-group.lisp | 4 ++-- primitives.lisp | 4 ++++ screen.lisp | 14 ++++++++++++++ stumpwm.texi.in | 2 ++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 19e241b..aa2dd7c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,7 +3,7 @@ The Stump Window Manager Authors Shawn Betts sabetts at gmail com Ryan M. Golbeck rmgolbeck at uwaterloo ca -Manuel Giraud manuel.giraud at cetp ipsl fr +Manuel Giraud manuel.giraud at univ-nantes fr Andreas Scholta andreas.scholta at gmail com Philippe Brochard hocwp at free fr Matthew Kennedy mkennedy at gentoo org diff --git a/floating-group.lisp b/floating-group.lisp index 2715edc..a501068 100644 --- a/floating-group.lisp +++ b/floating-group.lisp @@ -56,8 +56,8 @@ (let ((group (window-group window))) (setf (xlib:window-background (window-parent window)) (if (eq (group-current-window group) window) - (screen-focus-color (window-screen window)) - (screen-unfocus-color (window-screen window)))) + (screen-float-focus-color (window-screen window)) + (screen-float-unfocus-color (window-screen window)))) (xlib:clear-area (window-parent window)))) (defmethod window-sync ((window float-window) hint) diff --git a/primitives.lisp b/primitives.lisp index 005236e..6bc3d94 100644 --- a/primitives.lisp +++ b/primitives.lisp @@ -357,6 +357,8 @@ are valid values. (defparameter +default-font-name+ "9x15bold") (defparameter +default-focus-color+ "White") (defparameter +default-unfocus-color+ "Black") +(defparameter +default-float-focus-color+ "Orange") +(defparameter +default-float-unfocus-color+ "SteelBlue4") (defparameter +default-frame-outline-width+ 2) ;; Don't set these variables directly, use set- instead @@ -419,6 +421,8 @@ Use the window's resource name. (win-bg-color :initform nil :accessor screen-win-bg-color) (focus-color :initform nil :accessor screen-focus-color) (unfocus-color :initform nil :accessor screen-unfocus-color) + (float-focus-color :initform nil :accessor screen-float-focus-color) + (float-unfocus-color :initform nil :accessor screen-float-unfocus-color) (msg-border-width :initform nil :accessor screen-msg-border-width) (frame-outline-width :initform nil :accessor screen-frame-outline-width) (font :initform nil :accessor screen-font) diff --git a/screen.lisp b/screen.lisp index 92782e2..97560fd 100644 --- a/screen.lisp +++ b/screen.lisp @@ -34,6 +34,8 @@ set-win-bg-color set-focus-color set-unfocus-color + set-float-focus-color + set-float-unfocus-color set-msg-border-width set-frame-outline-width set-font)) @@ -287,6 +289,14 @@ there is more than one frame." there is more than one frame." (set-any-color screen-unfocus-color color)) +(defun set-float-focus-color (color) + "Set the border color for focused windows in a float group." + (set-any-color screen-float-focus-color color)) + +(defun set-float-unfocus-color (color) + "Set the border color for windows without focus in a float group." + (set-any-color screen-float-unfocus-color color)) + (defun set-msg-border-width (width) "Set the border width for the message bar and input bar." @@ -392,6 +402,8 @@ FOCUS-WINDOW is an extra window used for _NET_SUPPORTING_WM_CHECK." (border (ac +default-border-color+)) (focus (ac +default-focus-color+)) (unfocus (ac +default-unfocus-color+)) + (float-focus (ac +default-float-focus-color+)) + (float-unfocus (ac +default-float-unfocus-color+)) (win-bg (ac +default-window-background-color+)) (input-window (xlib:create-window :parent (xlib:screen-root screen-number) :x 0 :y 0 :width 20 :height 20 @@ -447,6 +459,8 @@ FOCUS-WINDOW is an extra window used for _NET_SUPPORTING_WM_CHECK." (screen-border-color screen) border (screen-focus-color screen) focus (screen-unfocus-color screen) unfocus + (screen-float-focus-color screen) float-focus + (screen-float-unfocus-color screen) float-unfocus (screen-msg-border-width screen) 1 (screen-frame-outline-width screen) +default-frame-outline-width+ (screen-input-window screen) input-window diff --git a/stumpwm.texi.in b/stumpwm.texi.in index 4b6cdd1..1661a90 100644 --- a/stumpwm.texi.in +++ b/stumpwm.texi.in @@ -862,6 +862,8 @@ list. Some commands operate only on marked windows. @@@ set-win-bg-color @@@ set-focus-color @@@ set-unfocus-color +@@@ set-float-focus-color +@@@ set-float-unfocus-color @@@ set-normal-gravity @@@ set-maxsize-gravity @@@ set-transient-gravity -- 1.7.6