From: YAMAMOTO Mitsuharu Date: Sun, 11 Apr 2010 00:59:04 +0000 (+0300) Subject: Make things more consistent with 2010-01-09 changes of YAMAMOTO Mitsuharu. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d607878ab555b09d53ef87aaaa2fc4547d3668f2;p=emacs.git Make things more consistent with 2010-01-09 changes of YAMAMOTO Mitsuharu. http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00420.html --- diff --git a/src/window.h b/src/window.h index 53419215883..5e142ebebc4 100644 --- a/src/window.h +++ b/src/window.h @@ -415,11 +415,17 @@ struct window (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \ && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window)) +/* 1 if W is a tab bar window. */ + +#define WINDOW_TAB_BAR_P(W) \ + (WINDOWP (WINDOW_XFRAME (W)->tab_bar_window) \ + && (W) == XWINDOW (WINDOW_XFRAME (W)->tab_bar_window)) + /* Return the frame y-position at which window W starts. This includes a header line, if any. */ #define WINDOW_TOP_EDGE_Y(W) \ - (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \ + (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W) || WINDOW_TAB_BAR_P (W)) \ ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ + WINDOW_TOP_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W)) @@ -427,7 +433,7 @@ struct window This includes a mode line, if any. */ #define WINDOW_BOTTOM_EDGE_Y(W) \ - (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \ + (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W) || WINDOW_TAB_BAR_P (W)) \ ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ + WINDOW_BOTTOM_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W)) diff --git a/src/xfns.c b/src/xfns.c index 3ac290d13ea..4d2a6986b11 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1540,7 +1540,8 @@ x_set_tab_bar_lines (f, value, oldval) { int height = FRAME_INTERNAL_BORDER_WIDTH (f); int width = FRAME_PIXEL_WIDTH (f); - int y = nlines * FRAME_LINE_HEIGHT (f); + int y = (FRAME_MENU_BAR_LINES (f) + FRAME_TOOL_BAR_LINES (f) + + nlines) * FRAME_LINE_HEIGHT (f); /* height can be zero here. */ if (height > 0 && width > 0) diff --git a/src/xterm.c b/src/xterm.c index 50fbd6ce36d..549fa5f1cd7 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -751,11 +751,6 @@ x_after_update_window_line (desired_row) { int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); - /* Internal border is drawn below the tab bar. */ - if (WINDOWP (f->tab_bar_window) - && w == XWINDOW (f->tab_bar_window)) - y -= width; - BLOCK_INPUT; x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, y, width, height, False);