Przeglądaj źródła

Give the new frame a name so that tiling WM's can handle it properly. Also specify the default width/height.

Wei Hu 15 lat temu
rodzic
commit
dbc14cc70f
1 zmienionych plików z 13 dodań i 2 usunięć
  1. 13 2
      edit-server.el

+ 13 - 2
edit-server.el

@@ -58,6 +58,15 @@ Current buffer holds the text that is about to be sent back to the client."
 (defconst edit-server-edit-buffer-name "TEXTAREA"
   "Template name of the edit-server text editing buffers.")
 
+(defconst edit-server-new-frame-title "Emacs TEXTAREA"
+  "Template name of the emacs frame's title.")
+
+(defconst edit-server-new-frame-width 80
+  "The emacs frame's width.")
+
+(defconst edit-server-new-frame-height 25
+  "The emacs frame's height.")
+
 (defvar edit-server-proc 'nil
   "Network process associated with the current edit, made local when
  the edit buffer is created")
@@ -225,7 +234,7 @@ If `edit-server-verbose' is non-nil, then STRING is also echoed to the message l
           (edit-server-log proc 
                            "Received %d bytes of %d ..." 
                            edit-server-received edit-server-content-length)
-        ;; all content trasnferred - process request now
+        ;; all content transferred - process request now
         (cond
          ((string= edit-server-request "POST")
           ;; create editing buffer, and move content to it
@@ -249,7 +258,9 @@ If `edit-server-verbose' is non-nil, then STRING is also echoed to the message l
       (set (make-local-variable 'edit-server-proc) proc)
       (set (make-local-variable 'edit-server-frame) 
            (if edit-server-new-frame
-	       (make-frame-on-display (getenv "DISPLAY")) nil))
+               (make-frame-on-display (getenv "DISPLAY")
+                 `((name . ,edit-server-new-frame-title) (width . ,edit-server-new-frame-width) (height . ,edit-server-new-frame-height)))
+             nil))
       (if edit-server-new-frame
           (raise-frame edit-server-frame)
         (pop-to-buffer buffer)))))