(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))
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))
{
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)
{
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);