[sawfish] Revert "Revert "Revert "Added border-width and border-color to frame-part definition"""



commit 2979774f9a175176df763a3e2d59278527c257f6
Author: Christopher Roy Bratusek <zanghar freenet de>
Date:   Sun May 23 17:03:18 2010 +0200

    Revert "Revert "Revert "Added border-width and border-color to frame-part definition"""
    
    This reverts commit f1f3b4d3ab8642a2aaa7eb6d144e3c9632124d36.

 ChangeLog        |   15 +--------------
 man/news.texi    |   11 +----------
 man/sawfish.texi |   18 ++++--------------
 src/events.c     |    2 +-
 src/frames.c     |   41 ++++-------------------------------------
 src/sawfish.h    |    3 ---
 src/windows.c    |   10 ++++------
 7 files changed, 15 insertions(+), 85 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 29f8ee8..39541db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,18 +1,5 @@
 2010-05-23  Christopher Roy Bratusek <zanghar freenet de>
-	* lisp/sawfish/wm/util/prompt.jl: fix an unconfirmed compilation-error
-					  that has been reported [Harald van Dijk]
-
-	* man/sawfish.texi
-	* src/events.c
-	* src/frames.c
-	* src/sawfish.h
-	* src/windows.c: Add two new attributes to frame part definition:
-			 border-width and border-color [Alexey I. Froloff]
-
-	* man/news.texi: updated
-
-2010-05-22  Christopher Roy Bratusek <zanghar freenet de>
-	* configure.in: bumped version to 1.6.4 "Frozen Flame"
+	* lisp/sawfish/wm/util/prompt.jl: fix an unconfirmed compilation-error that has been reported
 
 2010-05-16  Christopher Bratusek <zanghar freenet de>
 	* src/display.c: allow compilation with -DDEBUG
diff --git a/man/news.texi b/man/news.texi
index df3d4b8..36764a2 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -15,16 +15,7 @@ they occurred between. For more detailed information see the
 @item Bugfixes
 @itemize @minus
 
- item Fixed a possible compilation-error in prompt-jl
-[Harald van Dijk]
- end itemize
-
- item New Features
- itemize @minus
-
- item Add two new attributes to frame part definition:
- code{border-width} and @code{border-color}
-[Alexey I. Froloff]
+ item Fixed a possible compilation-error in prompt-jl [Harald van Dijk]
 @end itemize
 @end itemize
 
diff --git a/man/sawfish.texi b/man/sawfish.texi
index 0f911d6..a185a30 100644
--- a/man/sawfish.texi
+++ b/man/sawfish.texi
@@ -3630,12 +3630,6 @@ Defines the width of the frame part.
 @item (height . @var{value})
 Defines the height of the frame part.
 
- item (border-width . @var{value})
-Defines window border width.
-
- item (border-color . @var{value})
-Defines window border color.
-
 @item (keymap . @var{value})
 Defines the keymap to use when evaluating events originating in this
 frame part.
@@ -3665,14 +3659,10 @@ frame part.
 The values specified for the @code{background}, @code{foreground},
 @code{render-scale}, @code{font}, @code{left-edge}, @code{right-edge},
 @code{top-edge}, @code{bottom-edge}, @code{width}, @code{height},
- code{border-color}, @code{cursor}, @code{below-client} and
- code{hidden} attributes may actually be functions. In which case the
-function will be called (with a single argument, the window object)
-when the frame is constructed, the value returned will be used as the
-actual value of the attribute.
-
-The values specified for the @code{border-width} and @code{border-color}
-are applied for the whole window instead of current frame part.
+ code{cursor}, @code{below-client} and @code{hidden} attributes may
+actually be functions. In which case the function will be called (with
+a single argument, the window object) when the frame is constructed,
+the value returned will be used as the actual value of the attribute.
 
 The coordinate system used for specifying the part's position is
 relative to the window edge that the position is defined against.
diff --git a/src/events.c b/src/events.c
index 8e9ed65..158919e 100644
--- a/src/events.c
+++ b/src/events.c
@@ -1317,7 +1317,7 @@ send_synthetic_configure (Lisp_Window *w)
 	}
 	ev.xconfigure.width = w->attr.width;
 	ev.xconfigure.height = w->attr.height;
-	ev.xconfigure.border_width = w->border_width;
+	ev.xconfigure.border_width = w->attr.border_width;
 	ev.xconfigure.above = w->reparented ? w->frame : root_window;
 	ev.xconfigure.override_redirect = False;
 	XSendEvent (dpy, w->id, False, StructureNotifyMask, &ev);
diff --git a/src/frames.c b/src/frames.c
index e359a18..14e4d10 100644
--- a/src/frames.c
+++ b/src/frames.c
@@ -86,8 +86,6 @@ DEFSYM(override_frame_part_classes, "override-frame-part-classes");
 DEFSYM(below_client, "below-client");
 DEFSYM(scale_foreground, "scale-foreground");
 DEFSYM(hidden, "hidden");
-DEFSYM(border_width, "border-width");
-DEFSYM(border_color, "border-color");
 
 static repv state_syms[fps_MAX];
 
@@ -217,9 +215,6 @@ fp_sweep (void)
 	height . PIXELS
 	width . PIXELS
 
-	border-width . NUMBER
-	border-color . COLOR
-
 	keymap . KEYMAP
 	cursor . CURSOR-OR-CURSOR-DEF
 
@@ -343,11 +338,11 @@ set_frame_shapes (Lisp_Window *w, bool atomic)
 	XSetWindowAttributes wa;
 	int wamask;
 	wa.colormap = image_cmap;
-	wa.border_pixel = w->border_pixel;
+	wa.border_pixel = BlackPixel (dpy, screen_num);
 	wamask = CWColormap | CWBorderPixel;
 	shape_win = XCreateWindow (dpy, root_window, -100, -100,
 				   w->frame_width, w->frame_height,
-				   w->border_width, image_depth, InputOutput,
+				   0, image_depth, InputOutput,
 				   image_visual, wamask, &wa);
     }
     else
@@ -1251,26 +1246,6 @@ build_frame_part (struct frame_part *fp)
     else
 	fp->renderer = Qnil;
 
-    /* get border width */
-    tem = get_integer_prop (fp, Qborder_width, class_elt, ov_class_elt);
-    if (tem != Qnil) {
-	w->border_width = rep_INT(tem);
-    }
-
-    /* get border color */
-    tem = fp_assq (fp, Qborder_color, class_elt, ov_class_elt);
-    if (tem != Qnil)
-    {
-	tem = rep_CDR(tem);
-	if (Ffunctionp (tem) != Qnil)
-	    tem = call_protectedly_1 (tem, rep_VAL (w), Qnil);
-	if (!COLORP(tem) && tem != Qnil)
-	    tem = call_protectedly (get_color, tem, Qnil);
-	if (COLORP(tem)) {
-	    w->border_pixel = VCOLOR(tem)->pixel;
-	}
-    }
-
     /* get background images or colors */
     if (!get_pattern_prop (fp, fp->bg, get_color,
 			   Qbackground, class_elt, ov_class_elt))
@@ -1512,10 +1487,6 @@ list_frame_generator (Lisp_Window *w)
 
     rep_PUSHGC(gc_win, win);
 
-    /* clear window border */
-    w->border_width = 0;
-    w->border_pixel = BlackPixel (dpy, screen_num);
-
     /* construct the component list, and find the bounding box */
 
     /* if w->destroy_frame is set then we're rebuilding an existing
@@ -1610,12 +1581,12 @@ list_frame_generator (Lisp_Window *w)
 
 	wa.override_redirect = True;
 	wa.colormap = colormap;
-	wa.border_pixel = w->border_pixel;
+	wa.border_pixel = BlackPixel (dpy, screen_num);
 	wa.save_under = w->attr.save_under;
 	wamask = CWOverrideRedirect | CWColormap | CWBorderPixel | CWSaveUnder;
 
 	w->frame = XCreateWindow (dpy, root_window, w->attr.x, w->attr.y,
-				  w->frame_width, w->frame_height, w->border_width,
+				  w->frame_width, w->frame_height, 0,
 				  depth, InputOutput, visual, wamask, &wa);
     }
     else
@@ -1624,8 +1595,6 @@ list_frame_generator (Lisp_Window *w)
 	w->attr.x += w->frame_x - old_x_off;
 	w->attr.y += w->frame_y - old_y_off;
 
-	XSetWindowBorder (dpy, w->frame, w->border_pixel);
-	XSetWindowBorderWidth (dpy, w->frame, w->border_width);
 	XMoveResizeWindow (dpy, w->frame, w->attr.x, w->attr.y,
 			   w->frame_width, w->frame_height);
 
@@ -1997,8 +1966,6 @@ frames_init (void)
     rep_INTERN(below_client);
     rep_INTERN(scale_foreground);
     rep_INTERN(hidden);
-    rep_INTERN(border_width);
-    rep_INTERN(border_color);
 
     rep_INTERN_SPECIAL(frame_part_classes);
     rep_INTERN_SPECIAL(override_frame_part_classes);
diff --git a/src/sawfish.h b/src/sawfish.h
index 69162b8..1a6fb7e 100644
--- a/src/sawfish.h
+++ b/src/sawfish.h
@@ -142,9 +142,6 @@ typedef struct lisp_window {
        But the position is the position of the frame, while the
        dimensions are those of the client */
     XWindowAttributes attr;
-    unsigned int old_border_width;		/* saved border width of window */
-    unsigned int border_width;
-    unsigned long border_pixel;
     XSizeHints hints;
     XWMHints *wmhints;
     Window *cmap_windows;
diff --git a/src/windows.c b/src/windows.c
index 208ff0d..7239f64 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -458,7 +458,6 @@ add_window (Window id)
 	w->name = rep_null_string ();
 	w->net_name = Qnil;
 	w->net_icon_name = Qnil;
-	w->border_pixel = BlackPixel (dpy, screen_num);
 
         /* Don't garbage collect the window before we are done. */
         /* Note: must not return without rep_POPGC. */
@@ -474,7 +473,6 @@ add_window (Window id)
 	XGetWindowAttributes (dpy, id, &w->attr);
 	DB(("  orig: width=%d height=%d x=%d y=%d\n",
 	    w->attr.width, w->attr.height, w->attr.x, w->attr.y));
-	w->old_border_width = w->attr.border_width;
 
 	get_window_name(w);
 
@@ -601,7 +599,7 @@ remove_window (Lisp_Window *w, bool destroyed, bool from_error)
 	    remove_window_frame (w);
 
 	    /* Restore original border width of the client */
-	    XSetWindowBorderWidth (dpy, w->id, w->old_border_width);
+	    XSetWindowBorderWidth (dpy, w->id, w->attr.border_width);
 	}
 
 	if (!from_error)
@@ -962,8 +960,8 @@ surrounding WINDOW.
     rep_DECLARE1(win, WINDOWP);
     if (VWIN(win)->reparented)
     {
-	return Fcons (rep_MAKE_INT(VWIN(win)->frame_width + 2*VWIN(win)->border_width),
-		      rep_MAKE_INT(VWIN(win)->frame_height + 2*VWIN(win)->border_width));
+	return Fcons (rep_MAKE_INT(VWIN(win)->frame_width),
+		      rep_MAKE_INT(VWIN(win)->frame_height));
     }
     else
 	return Fwindow_dimensions (win);
@@ -1271,7 +1269,7 @@ window-border-width WINDOW
 ::end:: */
 {
     rep_DECLARE1(win, WINDOWP);
-    return rep_MAKE_INT(VWIN(win)->border_width);
+    return rep_MAKE_INT(VWIN(win)->attr.border_width);
 }
 
 DEFUN("window-size-hints", Fwindow_size_hints, Swindow_size_hints,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]