xwem-devel
[Top] [All Lists]

Summary for xwem--main--2.1--patch-12

From: Zajcev Evgeny <lg@xxxxxxxx>
Subject: Summary for xwem--main--2.1--patch-12
Date: Thu, 3 Feb 2005 01:11:44 +0300 (MSK)
Location: lg@xxxxxxxxxxxxxx http://arch.xwem.org/2005/

Revision: xwem--main--2.1--patch-12
Archive: lg@xxxxxxxxxxxxxx
Creator: Zajcev Evgeny <lg@xxxxxxxx>
Date: Thu Feb  3 01:11:35 MSK 2005
Standard-date: 2005-02-02 22:11:35 GMT
Modified-files: lisp/xwem-clients.el lisp/xwem-clswi.el
    lisp/xwem-edmacro.el lisp/xwem-frame.el
    lisp/xwem-keyboard.el lisp/xwem-keymacro.el
    lisp/xwem-manage.el lisp/xwem-netwm.el
    lisp/xwem-selections.el lisp/xwem-win.el
New-patches: dev@xxxxxxxxxxxxxxxx/xwem--dev--2.1--patch-4
    dev@xxxxxxxxxxxxxxxx/xwem--dev--2.1--patch-5
    dev@xxxxxxxxxxxxxxxx/xwem--dev--2.1--patch-6
    dev@xxxxxxxxxxxxxxxx/xwem--dev--2.1--patch-7
    lg@xxxxxxxxxxxxxx/xwem--main--2.1--patch-12
Summary: general fixes
Keywords: keymacro, record, clients, keyboard

* lisp/xwem-clients.el (xwem-cl-other-strategy): [rem] Was not used for
  long time.

* lisp/xwem-clients.el (xwem-cl-other-include-active): [new] To customise
  other client choosing politics.

* lisp/xwem-clients.el (xwem-cl-other-include-iconified): [new] Ditto.

* lisp/xwem-clients.el (xwem-cl-other): [sem] Use defun* and keywording.

* lisp/xwem-edmacro.el (xwem-edmacro-store): [bug fix] Check
  `xwem-keymacro-macros-stack' for emptyness.

* lisp/xwem-frame.el (xwem-frame-total-remove): [try] do `xwem-withdraw'
  on frame's clients.

* lisp/xwem-keyboard.el (xwem-keyboard-use-syth-events): [typo fix]
  renamed to xwem-keyboard-use-synth-events.

* lisp/xwem-keyboard.el (xwem-kbd-force-mods-release): [fix] Take into
  account `xwem-keyboard-use-synth-events' value.

* lisp/xwem-keyboard.el (xwem-kbd-wait-button-release): [fix] Ditto.

* lisp/xwem-keyboard.el (xwem-kbd-filter-keycodes): [new] Filter valid
  keycodes from keycodes list.

* lisp/xwem-keyboard.el (xwem-kbd-initialize-modifiers): [fix] Use
  `xwem-kbd-filter-keycodes' to create proper keycodes lists.

* lisp/xwem-keymacro.el (xwem-keymacro-init): [try] defadvice
  xwem-key-send-xtest-internal removed.  Recursive macroses are inlined
  now.  This is because of race condition of XRECORD enable/disable.

* lisp/xwem-keymacro.el (xwem-keymacro-internal-play): [try] Do nothing
  if already executing keyboard macro.  Recursive macroses are inlined to
  self-insert commands.

* lisp/xwem-manage.el (xwem-applications-alist): [fix] Mozilla
  application entry fixed.

* lisp/xwem-selections.el (xwem-copy-cutbuffer): [addon]
  `xwem-copy-cutbuffer' is smart now.  If there is some active region in
  Emacs it copies it, if not it copies WHICH-ONE cutbuffer to
  `xwem-selections'.

* lisp/xwem-win.el (xwem-win-redraw-win): [bug fix] win&frame validation
  added, it is required because `xwem-win-redraw-win' is deffered function.

* added files

    {arch}/xwem/xwem--dev/xwem--dev--2.1/dev@xxxxxxxxxxxxxxxx/patch-log/patch-4
    {arch}/xwem/xwem--dev/xwem--dev--2.1/dev@xxxxxxxxxxxxxxxx/patch-log/patch-5
    {arch}/xwem/xwem--dev/xwem--dev--2.1/dev@xxxxxxxxxxxxxxxx/patch-log/patch-6
    {arch}/xwem/xwem--dev/xwem--dev--2.1/dev@xxxxxxxxxxxxxxxx/patch-log/patch-7
    {arch}/xwem/xwem--main/xwem--main--2.1/lg@xxxxxxxxxxxxxx/patch-log/patch-12

* modified files

--- orig/lisp/xwem-clients.el
+++ mod/lisp/xwem-clients.el
@@ -129,13 +129,22 @@
   :type 'string
   :group 'xwem-cl)
 
-(defcustom xwem-cl-other-strategy 'samewin
-  "*Strategy to be used to select other CL.
-One of 'any 'samewin 'sameframe.
-TODO: add more strategies."
-  :type '(choice (const :tag "Same Window" samewin)
-                 (const :tag "Same Frame" sameframe)
-                 (const :tag "Any" any))
+(defcustom xwem-cl-other-include-active t
+    "*Non-nil mean include active clients in clients list when switching.
+If `xwem-clswi-include-active' is function, it must be a function that
+accepts one argument - CL and returns non-nil if CL must be included."
+  :type '(choice (const :tag "No" nil)
+                (const :tag "Yes" t)
+                (function :tag "Custom function"))
+  :group 'xwem-cl)
+
+(defcustom xwem-cl-other-include-iconified nil
+  "*Non-nil mean include iconified clients in clients list when switching.
+If `xwem-clswi-include-iconified' is function, it must be a function that
+accepts one argument - CL and returns non-nil if CL must be included."
+  :type '(choice (const :tag "No" nil)
+                (const :tag "Yes" t)
+                (function :tag "Custom function"))
   :group 'xwem-cl)
 
 (defcustom xwem-frame-iresize-mode 'normal
@@ -675,41 +684,51 @@
                                        nil)
                                       (t t)))))))))))
 
-;;;###xwem-autoload
-(defun xwem-cl-other (cl &optional clients-list also-active no-sort)
-  "Return xwem client other then CL selecting from CLIENTS-LIST.
-Default CLIENTS-LIST is what is returned by `xwem-clients-list'.
+;;;###xwem-autoload(autoload 'xwem-cl-other "xwem-clients")
+(defun* xwem-cl-other (cl &key clients no-sort also-active also-iconified)
+  "Return xwem client other then CL selecting from CLIENTS.
+Default CLIENTS is what is returned by `xwem-clients-list'.
 Deactivated clients are preferred to activated, unless ALSO-ACTIVE
 is non-nil. Special clients excluded.
+Unless ALSO-ICONIFIED is non-nil iconified clients will be excluded.
 
-Use `(xwem-cl-other cl nil t)' form to fetch most recent
+Use `(xwem-cl-other cl :no-sort t)' form to fetch most recent
 client, other then CL.
 
-CLIENTS-LIST is sorted by recency unless NO-SORT is non-nil."
-  (unless clients-list
-    (setq clients-list (xwem-clients-list)))
+CLIENTS is sorted by recency unless NO-SORT is non-nil."
+  (unless clients
+    (setq clients (xwem-clients-list)))
 
   (unless no-sort
-    (setq clients-list
-          (xwem-cl-list-sort-by-recency clients-list)))
+    (setq clients
+          (xwem-cl-list-sort-by-recency clients)))
 
   (let ((rcl nil)
         (notgoodcl nil))                ;not so good candidate as rcl
 
-    (while clients-list
-      (when (and (xwem-cl-p (car clients-list)) ; skip non-clients
-                 (not (eq (car clients-list) cl)) ; skip ourself
+    (while clients
+      (when (and (xwem-cl-p (car clients)) ; skip non-clients
+                 (not (eq (car clients) cl)) ; skip ourself
                  ;; skip iconified
-                 (not (eq (xwem-cl-state (car clients-list)) 'iconified)))
+                (or also-iconified
+                    (not (eq (xwem-cl-state (car clients)) 'iconified))
+                    (if (functionp xwem-cl-other-include-iconified)
+                        (funcall xwem-cl-other-include-iconified
+                                 (car clients))
+                      xwem-cl-other-include-iconified)))
         (if (or also-active
-                (not (eq (xwem-cl-state (car clients-list)) 'active)))
+                (not (eq (xwem-cl-state (car clients)) 'active))
+               (if (functionp xwem-cl-other-include-active)
+                   (funcall xwem-cl-other-include-active
+                            (car clients))
+                 xwem-cl-other-include-active))
             ;; Found pretty good candidate
-            (setq rcl (car clients-list)
-                  clients-list nil)
+            (setq rcl (car clients)
+                  clients nil)
 
           (when (and also-active (null notgoodcl))
-            (setq notgoodcl (car clients-list)))))
-      (setq clients-list (cdr clients-list)))
+            (setq notgoodcl (car clients)))))
+      (setq clients (cdr clients)))
     
     ;; Return
     (or rcl notgoodcl)))
@@ -736,7 +755,7 @@
              (or allow-dummy
                  (not (xwem-dummy-client-p (xwem-last-client)))))
         (xwem-select-client (xwem-last-client))
-      (xwem-select-client (xwem-cl-other cl nil t)))))
+      (xwem-select-client (xwem-cl-other cl)))))
 
 
 ;;;###xwem-autoload
@@ -841,7 +860,7 @@
 
   (let ((ocl (xwem-cl-selected)))
     (while (> arg 0)
-      (setq ocl (xwem-cl-other ocl nil t))
+      (setq ocl (xwem-cl-other ocl))
       (decf arg))
     
     (unless (xwem-cl-p ocl)
@@ -935,7 +954,7 @@
   (let* ((win (xwem-window-other 1))
          (cl (xwem-win-cl win)))
     (while (> n 0)
-      (setq cl (xwem-cl-other cl (xwem-win-clients win)))
+      (setq cl (xwem-cl-other cl :clients (xwem-win-clients win)))
       (decf n))
 
     (unless (xwem-cl-alive-p cl)
@@ -2098,7 +2117,7 @@
 
 (define-xwem-method other-client default (cl)
   "Default other-client method."
-  (xwem-cl-other cl nil t))
+  (xwem-cl-other cl))
 
 
 ;;; Dummy client, used, when selecting `nil' client.


--- orig/lisp/xwem-clswi.el
+++ mod/lisp/xwem-clswi.el
@@ -91,12 +91,12 @@
       (setq arg (- arg)))
 
     (while (> arg 0)
-      (setq cl (xwem-cl-other cl ncls t t))
+      (setq cl (xwem-cl-other cl :clients ncls))
       (decf arg))
 
     (unless (xwem-cl-p cl)
       (error 'xwem-error (format "No other %s client"
-                                 (upcase (symbol-name mtype)))))
+                                (upcase (symbol-name mtype)))))
 
     (xwem-select-client cl)
     cl))


--- orig/lisp/xwem-edmacro.el
+++ mod/lisp/xwem-edmacro.el
@@ -78,7 +78,9 @@
   "Store new keyboard macro MAC."
   (setq mac (key-sequence-list-description mac))
   (cond ((eq xwem-edmacro-store-place 'xwem-keymacro-macros-stack)
-         (setcar xwem-keymacro-macros-stack mac)
+         (if xwem-keymacro-macros-stack
+             (setcar xwem-keymacro-macros-stack mac)
+           (setq xwem-keymacro-macros-stack (list mac)))
          (xwem-message 'info "New keymacro stored to `%S'"
                        xwem-edmacro-store-place))
 


--- orig/lisp/xwem-frame.el
+++ mod/lisp/xwem-frame.el
@@ -868,8 +868,10 @@
                  (XReparentWindow (xwem-dpy) (xwem-cl-xwin cl) (xwem-rootwin)
                                   (X-Geom-width (xwem-rootgeom))
                                   (X-Geom-height (xwem-rootgeom)))
-                 (setf (xwem-cl-win cl) nil)
-                 (xwem-client-change-state cl 'iconified)))
+                 (xwem-withdraw cl)
+;                 (setf (xwem-cl-win cl) nil)
+;                 (xwem-client-change-state cl 'iconified)
+                 ))
              xwem-clients))
      (xwem-frame-selwin frame))
 


--- orig/lisp/xwem-keyboard.el
+++ mod/lisp/xwem-keyboard.el
@@ -160,11 +160,11 @@
   :group 'xwem-keyboard
   :group 'xwem-hooks)
 
-(defcustom xwem-keyboard-use-syth-events nil
+(defcustom xwem-keyboard-use-synth-events nil
   "*Non-nil mean use XSendEvent instead of XTEST's FakeInput.
 Useful to set it to non-nil when using sticky modifiers or in any
 other case when xwem can't properly force modifiers releasing.
-However if having `xwem-keyboard-use-syth-events' to non-nil, make
+However if having `xwem-keyboard-use-synth-events' to non-nil, make
 sure you've configured clients to accept synthetic X events (f.i. set
 `x-allow-sendevents' to non-nil to make XEmacs accept synthetic
 events)."
@@ -864,12 +864,15 @@
 ;;;###xwem-autoload
 (defun xwem-kbd-force-mods-release (&optional mods)
   "Force release of MODS modifiers."
-  (xwem-key-send-xtest-internal
-   (mapcar (lambda (el) (cons X-Xtest-KeyRelease el))
-           (apply 'append
-                  (mapcar (lambda (mod)
-                            (get mod 'x-key-codes))
-                          (or mods '(shift control meta super hyper)))))))
+  (unless xwem-keyboard-use-synth-events
+    ;; Only needed when using XSendEvent for emulating keys 
+    (xwem-key-send-xtest-internal
+     (mapcar (lambda (el) (cons X-Xtest-KeyRelease el))
+            (apply 'append
+                   (mapcar (lambda (mod)
+                             (get mod 'x-key-codes))
+                           (or mods '(shift control meta super hyper))))))
+    (XFlush (xwem-dpy))))
 
 (defun xwem-kbd-wait-button-release (button)
   "Wait for BUTTON for release."
@@ -879,7 +882,7 @@
   "Apply pending keys to CL."
   (when (and (xwem-cl-alive-p cl)
              (xwem-cl-get-sys-prop cl 'pending-keys))
-    (if xwem-keyboard-use-syth-events
+    (if xwem-keyboard-use-synth-events
         ;; Using XSendEvent
         (xwem-key-send-synth (xwem-cl-get-sys-prop cl 'pending-keys) cl)
       
@@ -1384,6 +1387,14 @@
 
 ;;{{{ [-] Initializators
 
+(defun xwem-kbd-filter-keycodes (keycodes)
+  "Filter valid keycodes from KEYCODES list."
+  (delq nil (mapcar (lambda (kc)
+                     (and (>= kc (X-Dpy-min-keycode (xwem-dpy)))
+                          (<= kc (X-Dpy-max-keycode (xwem-dpy)))
+                          kc))
+                   keycodes)))
+
 ;;;###xwem-autoload
 (defun xwem-kbd-initialize-modifiers ()
   "Create internal modifier representation to speedup futher work.
@@ -1413,19 +1424,23 @@
           '(shift lock control alt meta hyper super numlock))
 
     ;; Shift
-    (put 'shift 'x-key-codes (nth 0 xwem-xmods-mapping))
+    (put 'shift 'x-key-codes
+        (xwem-kbd-filter-keycodes (nth 0 xwem-xmods-mapping)))
     (put 'shift 'x-mod-mask X-Shift)
     ;; Lock
-    (put 'lock 'x-key-codes (nth 1 xwem-xmods-mapping))
+    (put 'lock 'x-key-codes
+        (xwem-kbd-filter-keycodes (nth 1 xwem-xmods-mapping)))
     (put 'lock 'x-mod-mask X-Lock)
     ;; Control
-    (put 'control 'x-key-codes (nth 2 xwem-xmods-mapping))
+    (put 'control 'x-key-codes
+        (xwem-kbd-filter-keycodes (nth 2 xwem-xmods-mapping)))
     (put 'control 'x-mod-mask X-Control)
 
     (while slist
       ;; Update some private modifier mask
       (mapc (lambda (mods mod-sym)
-              (let ((ism (intersection (car slist) mods)))
+              (let ((ism (xwem-kbd-filter-keycodes
+                         (intersection (car slist) mods))))
                 (when ism
                   (put mod-sym 'x-key-codes
                        (nconc ism (get mod-sym 'x-key-codes)))


--- orig/lisp/xwem-keymacro.el
+++ mod/lisp/xwem-keymacro.el
@@ -181,20 +181,6 @@
     (when xwem-keymacro-debug
       (setf (X-Dpy-log-buffer xwem-keymacro-dpy) "XREC.log"))
 
-    ;; Advice `xwem-key-send-xtest-internal' to work with macroses.
-    (defadvice xwem-key-send-xtest-internal
-      (around enable-disable-record-context activate)
-      "Disable/enable recording context while executing keyboard macro."
-      (when xwem-keymacro-saving
-        (X-XRecordDisableContext (xwem-dpy) xwem-keymacro-rcontext))
-
-      ad-do-it
-
-      (when xwem-keymacro-saving
-        (XFlush (xwem-dpy))
-        (X-XRecordEnableContext xwem-keymacro-dpy xwem-keymacro-rcontext)
-        (XFlush xwem-keymacro-dpy)))
-
     (setq xwem-keymacro-initialized t)))
 
 (defun xwem-keymacro-extract (xevs &optional cutlen)
@@ -242,6 +228,7 @@
 (defun xwem-keymacro-stop-recording ()
   "Stop recording Keys."
   (X-XRecordDisableContext (xwem-dpy) xwem-keymacro-rcontext)
+  (XFlush (xwem-dpy))
   (setq xwem-keymacro-saving nil)
 
   ;; Change xwem's minibuffer background back
@@ -294,31 +281,32 @@
 ;;;###xwem-autoload
 (defun xwem-keymacro-internal-play (keys &optional times)
   "Play Emacs KEYS TIMES times."
-  (unless times
-    (setq times 1))
-
-  ;; Unset some variables
-  (setq xwem-this-command-keys [])
-  (setq xwem-kbd-now-grabbing nil)
-  (setq xwem-prefix-arg nil)
-
-  (when xwem-keymacro-show-macro
-    (xwem-message 'macro "Executing macro: '%s'%s"
-                  (key-description keys)
-                  (if (> times 1)
-                      (format " %d times" times)
-                    "")))
-
-  ;; Force release of modifiers
-  (xwem-kbd-force-mods-release)
-
-  ;; Adjust KEYS acording to TIMES argument
-  (let ((key-sequence []))
-    (while (> times 0)
-      (setq key-sequence (vconcat key-sequence keys))
-      (decf times))
-    ;; Finally execute keys
-    (xwem-keymacro-execute-keys key-sequence)))
+  (unless (xwem-keymacro-executing-p)
+    (unless times
+      (setq times 1))
+
+    ;; Unset some variables
+    (setq xwem-this-command-keys [])
+    (setq xwem-kbd-now-grabbing nil)
+    (setq xwem-prefix-arg nil)
+
+    (when xwem-keymacro-show-macro
+      (xwem-message 'macro "Executing macro: '%s'%s"
+                    (key-description keys)
+                    (if (> times 1)
+                        (format " %d times" times)
+                      "")))
+
+    ;; Force release of modifiers
+    (xwem-kbd-force-mods-release)
+
+    ;; Adjust KEYS acording to TIMES argument
+    (let ((key-sequence []))
+      (while (> times 0)
+        (setq key-sequence (vconcat key-sequence keys))
+        (decf times))
+      ;; Finally execute keys
+      (xwem-keymacro-execute-keys key-sequence))))
 
 ;; Commands to be used in `xwem-keymacro-user-macros'
 ;;;###autoload(autoload 'xwem-keymacro-undefined "xwem-keymacro" nil t)


--- orig/lisp/xwem-manage.el
+++ mod/lisp/xwem-manage.el
@@ -117,7 +117,7 @@
     ("acroread" (class-name "^AcroRead$"))
     ("djview" (and (class-inst "^djview$")
                    (class-name "^Djview$")))
-    ("mozilla" (class-inst "^[mM]ozilla"))
+    ("mozilla" (class-name "^[mM]ozilla"))
     ("firefox" (class-name "^Firefox"))
     ("opera" (class-name "^Opera$"))
     ("rdesktop" (and (class-inst "^rdesktop$")


--- orig/lisp/xwem-netwm.el
+++ mod/lisp/xwem-netwm.el
@@ -524,8 +524,9 @@
 ;;; Additional methods
 (define-xwem-method other-client fullscreen (cl)
   "Return fullscreen client other then CL."
-  (or (xwem-cl-other cl (xwem-clients-list 'xwem-cl-fullscreen-p) t)
-      (and xwem-fullscreen-switch-any-other(xwem-cl-other cl nil t))))
+  (or (xwem-cl-other cl :clients (xwem-clients-list 'xwem-cl-fullscreen-p))
+      (and xwem-fullscreen-switch-any-other
+          (xwem-cl-other cl))))
 
 ;;;; ---- Fullscreen Commands ----
 


--- orig/lisp/xwem-selections.el
+++ mod/lisp/xwem-selections.el
@@ -136,15 +136,20 @@
 
 ;;;###autoload(autoload 'xwem-copy-cutbuffer "xwem-selections" "Copy 
CUTBUFFER0 to `xwem-selections'." t)
 (define-xwem-command xwem-copy-cutbuffer (&optional which-one)
-  "Copy current cut"
+  "Copy WHICH-ONE cutbuffer to `xwem-selections'.
+However if Emacs region activated, region is copied instead of
+cutbuffer."
   (xwem-interactive "p")
 
-  (decf which-one)
-  (let ((cb0 (x-get-cutbuffer which-one)))
-    (if (not cb0)
-        (xwem-message 'note "No active CUTBUFFER")
-      (push cb0 xwem-selections)
-      (xwem-message 'info "Copying CUTBUFFER%d: %S" which-one cb0))))
+  (if (region-active-p)
+      (xwem-copy-region-as-cutbuffer)
+
+    (decf which-one)
+    (let ((cb0 (x-get-cutbuffer which-one)))
+      (if (not cb0)
+         (xwem-message 'note "No active CUTBUFFER")
+       (push cb0 xwem-selections)
+       (xwem-message 'info "Copying CUTBUFFER%d: %S" which-one cb0)))))
 
 ;;;###autoload(autoload 'xwem-paste-cutbuffer "xwem-selections" "Paste 
CUTBUFFER0 to `xwem-selections'." t)
 (define-xwem-command xwem-paste-cutbuffer (&optional no-remove)


--- orig/lisp/xwem-win.el
+++ mod/lisp/xwem-win.el
@@ -648,44 +648,45 @@
 
 (define-xwem-deffered xwem-win-redraw-win (win)
   "Redraw only one WIN in WIN's frame."
-  (XClearArea (xwem-dpy) (xwem-frame-xwin (xwem-win-frame win))
-              (xwem-win-x win) (xwem-win-y win)
-              (xwem-win-width win) (xwem-win-height win) nil)
-  (if (xwem-win-cl win)
-      (XFillRectangles
-       (xwem-dpy) (xwem-frame-xwin (xwem-win-frame win))
-       (xwem-win-choose-outline-gc win)
-       (list (make-X-Rect :x (xwem-win-x win)
-                          :y (xwem-win-y win)
-                          :width (xwem-win-width win)
-                          :height (xwem-win-border-width win))
-             (make-X-Rect :x (xwem-win-x win)
-                          :y (xwem-win-y win)
-                          :width (xwem-win-border-width win)
-                          :height (xwem-win-height win))
-             (make-X-Rect :x (+ (xwem-win-x win)
-                                (xwem-win-width win)
-                                (- (xwem-win-border-width win)))
-                          :y (xwem-win-y win)
-                          :width (xwem-win-border-width win)
-                          :height (xwem-win-height win))
-             (make-X-Rect :x (xwem-win-x win)
-                          :y (+ (xwem-win-y win)
-                                (xwem-win-height win)
-                                (- (xwem-win-border-width win)))
-                          :width (xwem-win-width win)
-                          :height (xwem-win-border-width win))))
-
-    (let ((cgc (xwem-win-choose-outline-gc win)))
-      (XSetClipRectangles (xwem-dpy) cgc 0 0
-                          (list (X-Geom-to-X-Rect (xwem-win-geom win))))
-      (XDrawRectangle (xwem-dpy) (xwem-frame-xwin (xwem-win-frame win))
-                      cgc
-                      (xwem-win-x win) (xwem-win-y win)
-                      (xwem-win-width win) (xwem-win-height win))
-      (setf (X-Gc-clip-mask cgc) X-None)
-      (XChangeGC (xwem-dpy) cgc)
-      )))
+  (when (and (xwem-win-p win)
+             (xwem-frame-p (xwem-win-frame win)))
+    (XClearArea (xwem-dpy) (xwem-frame-xwin (xwem-win-frame win))
+                (xwem-win-x win) (xwem-win-y win)
+                (xwem-win-width win) (xwem-win-height win) nil)
+    (if (xwem-win-cl win)
+        (XFillRectangles
+         (xwem-dpy) (xwem-frame-xwin (xwem-win-frame win))
+         (xwem-win-choose-outline-gc win)
+         (list (make-X-Rect :x (xwem-win-x win)
+                            :y (xwem-win-y win)
+                            :width (xwem-win-width win)
+                            :height (xwem-win-border-width win))
+               (make-X-Rect :x (xwem-win-x win)
+                            :y (xwem-win-y win)
+                            :width (xwem-win-border-width win)
+                            :height (xwem-win-height win))
+               (make-X-Rect :x (+ (xwem-win-x win)
+                                  (xwem-win-width win)
+                                  (- (xwem-win-border-width win)))
+                            :y (xwem-win-y win)
+                            :width (xwem-win-border-width win)
+                            :height (xwem-win-height win))
+               (make-X-Rect :x (xwem-win-x win)
+                            :y (+ (xwem-win-y win)
+                                  (xwem-win-height win)
+                                  (- (xwem-win-border-width win)))
+                            :width (xwem-win-width win)
+                            :height (xwem-win-border-width win))))
+
+      (let ((cgc (xwem-win-choose-outline-gc win)))
+        (XSetClipRectangles (xwem-dpy) cgc 0 0
+                            (list (X-Geom-to-X-Rect (xwem-win-geom win))))
+        (XDrawRectangle (xwem-dpy) (xwem-frame-xwin (xwem-win-frame win))
+                        cgc
+                        (xwem-win-x win) (xwem-win-y win)
+                        (xwem-win-width win) (xwem-win-height win))
+        (setf (X-Gc-clip-mask cgc) X-None)
+        (XChangeGC (xwem-dpy) cgc)))))
 
 (define-xwem-deffered xwem-win-redraw-frame (frame)
   "Outline windows in FRAME if needed."




<Prev in Thread] Current Thread [Next in Thread>
  • Summary for xwem--main--2.1--patch-12, Zajcev Evgeny <=