xwem-patches
[Top] [All Lists]

Summary for xwem--main--2.1--patch-24

From: Zajcev Evgeny <lg@xxxxxxxx>
Subject: Summary for xwem--main--2.1--patch-24
Date: Fri, 18 Feb 2005 07:41:02 +0300 (MSK)
Location: lg@xxxxxxxxxxxxxx http://arch.xwem.org/2005/

Revision: xwem--main--2.1--patch-24
Archive: lg@xxxxxxxxxxxxxx
Creator: Zajcev Evgeny <lg@xxxxxxxx>
Date: Fri Feb 18 07:40:54 MSK 2005
Standard-date: 2005-02-18 04:40:54 GMT
Modified-files: lisp/xwem-clgen.el lisp/xwem-clients.el
    lisp/xwem-frame.el lisp/xwem-keyboard.el
    lisp/xwem-main.el
New-patches: dev@xxxxxxxxxxxxxxxx/xwem--dev--2.1--patch-19
    lg@xxxxxxxxxxxxxx/xwem--main--2.1--patch-24
Summary: merge from ckent, patch from ignotus, some bug fixs
Keywords: 

* lisp/xwem-frame.el (xwem-frame-configuration): [BUG fix] s/nconc/append

* lisp/xwem-main.el (xwem-init): [fix] reguarg larger `max-specpdl-size'
  and `max-lisp-eval-depth' values --ignotus.

* lisp/xwem-clgen.el (expect-win): [change] global option now.

* lisp/xwem-clients.el (xwem-client-first-manage): [addon] accepts PROPS
  argument now.

* lisp/xwem-keyboard.el (xwem-cl-apply-pending-keys): [fix]

* added files

    {arch}/xwem/xwem--dev/xwem--dev--2.1/dev@xxxxxxxxxxxxxxxx/patch-log/patch-19
    {arch}/xwem/xwem--main/xwem--main--2.1/lg@xxxxxxxxxxxxxx/patch-log/patch-24

* modified files

--- orig/lisp/xwem-clgen.el
+++ mod/lisp/xwem-clgen.el
@@ -220,7 +220,7 @@
   (xwem-message 'init "Initializing generic clients ... done"))
 
 ;;;; ---- Generic methods ----
-(define-xwem-client-property expect-win generic
+(define-xwem-client-property expect-win nil
   "Expectance window."
   :type 'window
   :get 'xwem-cl-get-sys-prop
@@ -289,20 +289,23 @@
 
 (defun xwem-clgen-refit (cl)
   "Refit generic client CL."
-  (let* ((xwem-win (xwem-cl-win cl))
-         (hthi (xwem-win-border-width xwem-win)))
-    (when (and (xwem-cl-new-xgeom cl)
-               (X-Geom-border-width (xwem-cl-new-xgeom cl)))
-      ;; Border width changed
-      (setf (X-Geom-border-width (xwem-cl-xgeom cl))
-            (X-Geom-border-width (xwem-cl-new-xgeom cl))))
+  (let ((xwem-win (xwem-cl-win cl))
+        hthi)
+    (when (xwem-win-alive-p xwem-win)
+      (setq hthi (xwem-win-border-width xwem-win))
+      (when (and (xwem-cl-new-xgeom cl)
+                 (X-Geom-border-width (xwem-cl-new-xgeom cl)))
+        ;; Border width changed
+        (setf (X-Geom-border-width (xwem-cl-xgeom cl))
+              (X-Geom-border-width (xwem-cl-new-xgeom cl))))
 
-    (xwem-cl-correct-size-for-size cl
+      (xwem-cl-correct-size-for-size
+       cl
        (make-X-Geom :x (+ (xwem-win-x xwem-win) hthi)
                     :y (+ (xwem-win-y xwem-win) hthi)
                     :width (- (xwem-win-width xwem-win) (* 2 hthi))
                     :height (- (xwem-win-height xwem-win) (* 2 hthi))
-                    :border-width (X-Geom-border-width (xwem-cl-xgeom cl))))))
+                    :border-width (X-Geom-border-width (xwem-cl-xgeom cl)))))))
   
 (defun xwem-refit-generic (cl)
   "Refit method for generic client CL.


--- orig/lisp/xwem-clients.el
+++ mod/lisp/xwem-clients.el
@@ -1193,12 +1193,15 @@
   (X-Win-rem-prop (xwem-cl-xwin cl) 'xwem-cl)
   (X-Win-EventHandler-rem (xwem-cl-xwin cl) 'xwem-cl-events-handler)
 
+  ;; Remove from mark ring
+  (setq xwem-cl-mark-ring (delq cl xwem-cl-mark-ring))
+
   ;; Make sure CL not in xwem-clients
   (setq xwem-clients (delq cl xwem-clients))
 
   (X-invalidate-cl-struct cl))
 
-(defun xwem-client-first-manage (cl)
+(defun xwem-client-first-manage (cl &optional props)
   "Manage client CL for the first time.
 Return non-nil if CL successfully managed."
   ;; Find match spec for CL
@@ -1208,20 +1211,15 @@
       ;; Add CL to clients list
       (pushnew cl xwem-clients :test 'eq)
 
-      ;; Apply plist before setting managing model, becase seting
-      ;; properties may depend on it and will fail because client is
-      ;; not yet managed by this managing model.
-
-      ;; On the other hand not seting managing model before applying
-      ;; properties may cause seting property to fail, for example
-      ;; 'expect-win property, which only set for 'generic managing
-      ;; model.
-      
-      (setf (xwem-cl-manage-spec cl) mspec)
-      (xwem-cl-apply-plist cl (cadr mspec))
-
-      ;; Also import saved(in X property) CL's plist
-      (xwem-cl-apply-plist cl (xwem-cl-XProperty-plist cl))
+      ;; Collaborate all the properties for client from different
+      ;; sources and apply them to client.
+      ;; 
+      ;; Sources are:
+      ;;   - Specified PROPS
+      ;;   - Specified in manage specification
+      ;;   - Import from X property
+      (xwem-cl-apply-plist
+       cl (append props (cadr mspec) (xwem-cl-XProperty-plist cl)))
 
       ;; Set expectance if 'client-window property is set
       (let ((ewin (xwem-client-property cl 'client-window)))
@@ -1229,16 +1227,24 @@
           (xwem-cl-was-expected cl t)
           (xwem-client-set-property cl 'expect-win ewin)))
 
-      (xwem-debug 'xwem-cl "Managing model: %S selected"
-                  '(xwem-cl-manage-type cl))
-
       ;; Setup focus mode if not already setuped
       (unless (xwem-client-property cl 'xwem-focus-mode)
         (xwem-focus-mode-set cl))
-
       (xwem-debug 'xwem-cl "Focus model: %S selected"
                   '(xwem-client-property cl 'xwem-focus-mode))
 
+      ;; Apply plist before setting managing model, becase seting
+      ;; properties may depend on it and will fail because client is
+      ;; not yet managed by this managing model.
+
+      ;; On the other hand not seting managing model before applying
+      ;; properties may cause seting property to fail, for example
+      ;; 'expect-win property, which only set for 'generic managing
+      ;; model.
+      (setf (xwem-cl-manage-spec cl) mspec)
+      (xwem-debug 'xwem-cl "Managing model: %S selected"
+                  '(xwem-cl-manage-type cl))
+
       ;; Run manage method
       (xwem-manage cl)
 
@@ -1264,9 +1270,9 @@
   "Try to manage X window XWIN.
 Return managed client, or nil if client wasnt managed."
   (unless (xwem-xwin-cl xwin)
-    (let ((cl (xwem-make-client xwin xwem-client-default-properties)))
+    (let ((cl (xwem-make-client xwin)))
       (when (xwem-cl-p cl)
-        (unless (xwem-client-first-manage cl)
+        (unless (xwem-client-first-manage cl xwem-client-default-properties)
           (xwem-unmake-client cl)))
       (and (xwem-cl-p cl) cl))))
 


--- orig/lisp/xwem-frame.el
+++ mod/lisp/xwem-frame.el
@@ -1054,9 +1054,9 @@
                    :name (xwem-frame-name frame)
                    :xgeom (copy-X-Geom (xwem-frame-xgeom frame))
                    :state (xwem-frame-state frame)
-                   :plist (nconc (unless (xwem-frame-mapped-p frame)
-                                   '(initially-unmapped t))
-                                 (xwem-frame-properties frame))
+                   :plist (append (xwem-frame-properties frame)
+                                  (unless (xwem-frame-mapped-p frame)
+                                    '(initially-unmapped t)))
                    :winconfig (xwem-window-configuration frame)))
                 (xwem-frames-list))))
 


--- orig/lisp/xwem-keyboard.el
+++ mod/lisp/xwem-keyboard.el
@@ -886,7 +886,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-synth-events
+    (if (xwem-client-local-variable-value cl 'xwem-keyboard-use-synth-events)
         ;; Using XSendEvent
         (xwem-key-send-synth (xwem-cl-get-sys-prop cl 'pending-keys) cl)
       


--- orig/lisp/xwem-main.el
+++ mod/lisp/xwem-main.el
@@ -274,12 +274,16 @@
   (setq inhibit-startup-message t)      ; DO NOT REMOVE
 
   (when xwem-use-presetup
-    (setf allow-deletion-of-last-visible-frame t
-          auto-lower-frame t
+    (setq allow-deletion-of-last-visible-frame t
+          auto-lower-frame t)
 
-          ;; Yes, do it
-          max-specpdl-size 10000
-          max-lisp-eval-depth 10000)
+    ;; Yes, do it --ignotus
+    (let ((xwem-max-specdpl 10000)
+          (xwem-max-lisp-eval-depth 10000))
+      (when (< max-specpdl-size xwem-max-specdpl)
+        (setq max-specpdl-size xwem-max-specdpl))
+      (when (< max-lisp-eval-depth xwem-max-lisp-eval-depth)
+        (setq max-lisp-eval-depth xwem-max-lisp-eval-depth)))
 
     ;; Destroy XEmacs frame when killing dedicated buffer
     (defadvice kill-buffer (before delete-dedicated-frame activate)




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