[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115657: Remove fringe background extension code on
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] trunk r115657: Remove fringe background extension code on W32. |
Date: |
Sat, 21 Dec 2013 07:04:51 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115657
revision-id: address@hidden
parent: address@hidden
committer: YAMAMOTO Mitsuharu <address@hidden>
branch nick: trunk
timestamp: Sat 2013-12-21 16:04:07 +0900
message:
Remove fringe background extension code on W32.
* w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
* w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
fringe background extension.
(x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
because they are now always the same as `left' and `width',
respectively. Remove code for the case that `width' and
`sb_width' are different.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/w32term.c w32term.c-20091113204419-o5vbwnq5f7feedwu-950
src/w32term.h w32term.h-20091113204419-o5vbwnq5f7feedwu-954
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-12-20 10:48:36 +0000
+++ b/src/ChangeLog 2013-12-21 07:04:07 +0000
@@ -1,3 +1,14 @@
+2013-12-21 YAMAMOTO Mitsuharu <address@hidden>
+
+ * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
+
+ * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
+ fringe background extension.
+ (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
+ because they are now always the same as `left' and `width',
+ respectively. Remove code for the case that `width' and
+ `sb_width' are different.
+
2013-12-20 Martin Rudalics <address@hidden>
Remove scroll_bar_actual_width from frames.
=== modified file 'src/w32term.c'
--- a/src/w32term.c 2013-12-20 10:48:36 +0000
+++ b/src/w32term.c 2013-12-21 07:04:07 +0000
@@ -792,62 +792,13 @@
hdc = get_frame_dc (f);
- if (!p->overlay_p)
- {
- int bx = p->bx, by = p->by, nx = p->nx, ny = p->ny;
-
- /* If the fringe is adjacent to the left (right) scroll bar of a
- leftmost (rightmost, respectively) window, then extend its
- background to the gap between the fringe and the bar. */
- if ((WINDOW_LEFTMOST_P (w)
- && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
- || (WINDOW_RIGHTMOST_P (w)
- && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
- {
- int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
-
- if (sb_width > 0)
- {
- int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
- int bar_area_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
-
- if (bx < 0)
- {
- /* Bitmap fills the fringe. */
- if (bar_area_x + bar_area_width == p->x)
- bx = bar_area_x + sb_width;
- else if (p->x + p->wd == bar_area_x)
- bx = bar_area_x;
- if (bx >= 0)
- {
- int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
-
- nx = bar_area_width - sb_width;
- by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
- row->y));
- ny = row->visible_height;
- }
- }
- else
- {
- if (bar_area_x + bar_area_width == bx)
- {
- bx = bar_area_x + sb_width;
- nx += bar_area_width - sb_width;
- }
- else if (bx + nx == bar_area_x)
- nx += bar_area_width - sb_width;
- }
- }
- }
-
- if (bx >= 0 && nx > 0)
- w32_fill_area (f, hdc, face->background, bx, by, nx, ny);
- }
-
/* Must clip because of partially visible lines. */
w32_clip_to_row (w, row, ANY_AREA, hdc);
+ if (p->bx >= 0 && !p->overlay_p)
+ w32_fill_area (f, hdc, face->background,
+ p->bx, p->by, p->nx, p->ny);
+
if (p->which && p->which < max_fringe_bmp)
{
HBITMAP pixmap = fringe_bmp[p->which];
@@ -2693,31 +2644,6 @@
fringes of W. */
window_box (w, ANY_AREA, &x, &y, &width, &height);
- /* If the fringe is adjacent to the left (right) scroll bar of a
- leftmost (rightmost, respectively) window, then extend its
- background to the gap between the fringe and the bar. */
- if ((WINDOW_LEFTMOST_P (w)
- && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
- || (WINDOW_RIGHTMOST_P (w)
- && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
- {
- int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
-
- if (sb_width > 0)
- {
- int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
- int bar_area_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
-
- if (bar_area_x + bar_area_width == x)
- {
- x = bar_area_x + sb_width;
- width += bar_area_width - sb_width;
- }
- else if (x + width == bar_area_x)
- width += bar_area_width - sb_width;
- }
- }
-
from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
bottom_y = y + height;
@@ -3719,7 +3645,6 @@
bar->start = 0;
bar->end = 0;
bar->dragging = 0;
- bar->fringe_extended_p = 0;
/* Requires geometry to be set before call to create the real window */
@@ -3781,33 +3706,17 @@
struct frame *f = XFRAME (w->frame);
Lisp_Object barobj;
struct scroll_bar *bar;
- int top, height, left, sb_left, width, sb_width;
+ int top, height, left, width;
int window_y, window_height;
- bool fringe_extended_p;
/* Get window dimensions. */
window_box (w, ANY_AREA, 0, &window_y, 0, &window_height);
top = window_y;
- width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
height = window_height;
- /* Compute the left edge of the scroll bar area. */
+ /* Compute the left edge and the width of the scroll bar area. */
left = WINDOW_SCROLL_BAR_AREA_X (w);
-
- /* Compute the width of the scroll bar which might be less than
- the width of the area reserved for the scroll bar. */
- if (WINDOW_CONFIG_SCROLL_BAR_WIDTH (w) > 0)
- sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
- else
- sb_width = width;
-
- /* Compute the left edge of the scroll bar. */
- if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))
- sb_left = left + (WINDOW_RIGHTMOST_P (w) ? width - sb_width : 0);
- else
- sb_left = left + (WINDOW_LEFTMOST_P (w) ? 0 : width - sb_width);
-
- fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (w);
+ width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
/* Does the scroll bar exist yet? */
if (NILP (w->vertical_scroll_bar))
@@ -3817,15 +3726,12 @@
if (width > 0 && height > 0)
{
hdc = get_frame_dc (f);
- if (fringe_extended_p)
- w32_clear_area (f, hdc, sb_left, top, sb_width, height);
- else
- w32_clear_area (f, hdc, left, top, width, height);
+ w32_clear_area (f, hdc, left, top, width, height);
release_frame_dc (f, hdc);
}
unblock_input ();
- bar = x_scroll_bar_create (w, top, sb_left, sb_width, height);
+ bar = x_scroll_bar_create (w, top, left, width, height);
}
else
{
@@ -3836,11 +3742,10 @@
hwnd = SCROLL_BAR_W32_WINDOW (bar);
/* If already correctly positioned, do nothing. */
- if (bar->left == sb_left
+ if (bar->left == left
&& bar->top == top
- && bar->width == sb_width
- && bar->height == height
- && bar->fringe_extended_p == fringe_extended_p)
+ && bar->width == width
+ && bar->height == height)
{
/* Redraw after clear_frame. */
if (!my_show_window (f, hwnd, SW_NORMAL))
@@ -3857,17 +3762,13 @@
hdc = get_frame_dc (f);
/* Since Windows scroll bars are smaller than the space reserved
for them on the frame, we have to clear "under" them. */
- if (fringe_extended_p)
- w32_clear_area (f, hdc, sb_left, top, sb_width, height);
- else
- w32_clear_area (f, hdc, left, top, width, height);
+ w32_clear_area (f, hdc, left, top, width, height);
release_frame_dc (f, hdc);
}
/* Make sure scroll bar is "visible" before moving, to ensure the
area of the parent window now exposed will be refreshed. */
my_show_window (f, hwnd, SW_HIDE);
- MoveWindow (hwnd, sb_left, top, sb_width,
- max (height, 1), TRUE);
+ MoveWindow (hwnd, left, top, width, max (height, 1), TRUE);
si.cbSize = sizeof (si);
si.fMask = SIF_RANGE;
@@ -3881,16 +3782,14 @@
/* InvalidateRect (w, NULL, FALSE); */
/* Remember new settings. */
- bar->left = sb_left;
+ bar->left = left;
bar->top = top;
- bar->width = sb_width;
+ bar->width = width;
bar->height = height;
unblock_input ();
}
}
- bar->fringe_extended_p = fringe_extended_p;
-
w32_set_scroll_bar_thumb (bar, portion, position, whole);
XSETVECTOR (barobj, bar);
wset_vertical_scroll_bar (w, barobj);
=== modified file 'src/w32term.h'
--- a/src/w32term.h 2013-12-20 10:48:36 +0000
+++ b/src/w32term.h 2013-12-21 07:04:07 +0000
@@ -449,12 +449,6 @@
place where the user grabbed it. If the handle isn't currently
being dragged, this is Qnil. */
int dragging;
-
- /* 1 if the background of the fringe that is adjacent to a scroll
- bar is extended to the gap between the fringe and the bar. */
- /* Note: this could be a bit field, but we need to take its address
- in ALLOCATE_PSEUDOVECTOR (see x_scroll_bar_create). */
- bool fringe_extended_p;
};
/* Turning a lisp vector value into a pointer to a struct scroll_bar. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115657: Remove fringe background extension code on W32.,
YAMAMOTO Mitsuharu <=