[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116809: * src/frame.h (SET_FRAME_VISIBLE): Keep fra
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r116809: * src/frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date. |
Date: |
Thu, 20 Mar 2014 14:09:48 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116809
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2014-03-20 10:09:37 -0400
message:
* src/frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
* src/xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
* src/frame.c (frame_garbaged): Make "docstring" more precise.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/alloc.c alloc.c-20091113204419-o5vbwnq5f7feedwu-252
src/frame.c frame.c-20091113204419-o5vbwnq5f7feedwu-243
src/frame.h frame.h-20091113204419-o5vbwnq5f7feedwu-229
src/term.c term.c-20091113204419-o5vbwnq5f7feedwu-220
src/xdisp.c xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
src/xterm.c xterm.c-20091113204419-o5vbwnq5f7feedwu-244
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-03-20 01:21:52 +0000
+++ b/src/ChangeLog 2014-03-20 14:09:37 +0000
@@ -1,3 +1,9 @@
+2014-03-20 Stefan Monnier <address@hidden>
+
+ * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
+ * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
+ * frame.c (frame_garbaged): Make "docstring" more precise.
+
2014-03-20 Glenn Morris <address@hidden>
* charset.c (init_charset): When we cannot find the charsets directory,
@@ -74,8 +80,8 @@
we eventually back up the iterator to the wrap point. This avoids
delusional behavior of move_it_to, whereby it proceeds to the next
display line, but sets current_x to zero for all the glyphs that
- without word-wrap would fit on the previous display line. One
- result was that visual-order cursor movement behaved erratically
+ without word-wrap would fit on the previous display line.
+ One result was that visual-order cursor movement behaved erratically
under word-wrap.
(Fmove_point_visually): Add code to find the x coordinate of the
last character before wrap point, under word-wrap on a TTY.
@@ -107,8 +113,8 @@
SSDATA (Vx_resource_name), which may be changed from Lisp.
(xim_close_display): For XUnregisterIMInstantiateCallback,
always eassert return value and pass exactly the same values
- as were used for XRegisterIMInstantiateCallback. Otherwise
- XUnregisterIMInstantiateCallback will always fail. See Xlib
+ as were used for XRegisterIMInstantiateCallback.
+ Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
sources to check why if you are interested.
2014-03-05 Martin Rudalics <address@hidden>
=== modified file 'src/alloc.c'
--- a/src/alloc.c 2014-02-28 21:45:34 +0000
+++ b/src/alloc.c 2014-03-20 14:09:37 +0000
@@ -1138,8 +1138,8 @@
}
abase = ABLOCK_ABASE (free_ablock);
- ABLOCKS_BUSY (abase) =
- (struct ablocks *) (2 + (intptr_t) ABLOCKS_BUSY (abase));
+ ABLOCKS_BUSY (abase)
+ = (struct ablocks *) (2 + (intptr_t) ABLOCKS_BUSY (abase));
val = free_ablock;
free_ablock = free_ablock->x.next_free;
=== modified file 'src/frame.c'
--- a/src/frame.c 2014-03-12 07:28:23 +0000
+++ b/src/frame.c 2014-03-20 14:09:37 +0000
@@ -125,8 +125,7 @@
static struct frame *last_nonminibuf_frame;
-/* Nonzero means there is at least one garbaged frame. */
-
+/* False means there are no visible garbaged frames. */
bool frame_garbaged;
#ifdef HAVE_WINDOW_SYSTEM
@@ -621,7 +620,7 @@
FRAME_MENU_BAR_LINES (f) = NILP (Vmenu_bar_mode) ? 0 : 1;
FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
- /* Set the top frame to the newly created frame. */
+ /* Set the top frame to the newly created frame. */
if (FRAMEP (FRAME_TTY (f)->top_frame)
&& FRAME_LIVE_P (XFRAME (FRAME_TTY (f)->top_frame)))
SET_FRAME_VISIBLE (XFRAME (FRAME_TTY (f)->top_frame), 2); /* obscured */
=== modified file 'src/frame.h'
--- a/src/frame.h 2014-01-01 07:43:34 +0000
+++ b/src/frame.h 2014-03-20 14:09:37 +0000
@@ -439,7 +439,7 @@
/* The baud rate that was used to calculate costs for this frame. */
int cost_calculation_baud_rate;
- /* frame opacity
+ /* Frame opacity
alpha[0]: alpha transparency of the active frame
alpha[1]: alpha transparency of inactive frames
Negative values mean not to change alpha. */
@@ -453,7 +453,7 @@
/* Additional space to put between text lines on this frame. */
int extra_line_spacing;
- /* All display backends seem to need these two pixel values. */
+ /* All display backends seem to need these two pixel values. */
unsigned long background_pixel;
unsigned long foreground_pixel;
};
@@ -946,6 +946,9 @@
} \
} while (false)
+/* False means there are no visible garbaged frames. */
+extern bool frame_garbaged;
+
/* Set visibility of frame F.
We call redisplay_other_windows to make sure the frame gets redisplayed
if some changes were applied to it while it wasn't visible (and hence
@@ -955,8 +958,13 @@
SET_FRAME_VISIBLE (struct frame *f, int v)
{
eassert (0 <= v && v <= 2);
- if (v == 1 && f->visible != 1)
- redisplay_other_windows ();
+ if (v)
+ {
+ if (v == 1 && f->visible != 1)
+ redisplay_other_windows ();
+ if (FRAME_GARBAGED_P (f))
+ frame_garbaged = true;
+ }
f->visible = v;
}
@@ -972,9 +980,6 @@
extern Lisp_Object Qterminal;
extern Lisp_Object Qnoelisp;
-/* True means there is at least one garbaged frame. */
-extern bool frame_garbaged;
-
extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern struct frame *decode_window_system_frame (Lisp_Object);
extern struct frame *decode_live_frame (Lisp_Object);
=== modified file 'src/term.c'
--- a/src/term.c 2014-02-28 21:45:34 +0000
+++ b/src/term.c 2014-03-20 14:09:37 +0000
@@ -3054,7 +3054,7 @@
int i;
if (!saved)
- return; /* already freed */
+ return; /* Already freed! */
for (i = 0; i < saved->nrows; ++i)
{
@@ -3170,7 +3170,7 @@
int statecount, x, y, i;
bool leave, onepane;
int result IF_LINT (= 0);
- int title_faces[4]; /* face to display the menu title */
+ int title_faces[4]; /* Face to display the menu title. */
int faces[4], buffers_num_deleted = 0;
struct frame *sf = SELECTED_FRAME ();
struct tty_display_info *tty = FRAME_TTY (sf);
@@ -3332,7 +3332,7 @@
have been opened. That does not include an open and
active submenu. */
if (i != statecount - 2
- || state[i].menu->submenu[dy] != state[i+1].menu)
+ || state[i].menu->submenu[dy] != state[i + 1].menu)
while (i != statecount - 1)
{
statecount--;
@@ -3383,7 +3383,7 @@
screen_update (sf, state[0].screen_behind);
while (statecount--)
free_saved_screen (state[statecount].screen_behind);
- tty_show_cursor (tty); /* turn cursor back on */
+ tty_show_cursor (tty); /* Turn cursor back on. */
fflush (tty->output);
/* Clean up any mouse events that are waiting inside Emacs event queue.
@@ -3474,7 +3474,7 @@
break;
i += 4;
}
- i -= 4; /* went one too far */
+ i -= 4; /* Went one too far! */
}
return i;
}
@@ -3519,7 +3519,7 @@
if (i < last_i)
*x = XINT (AREF (items, i + 4 + 3));
else
- *x = 0; /* wrap around to the first item */
+ *x = 0; /* Wrap around to the first item. */
}
else if (prev_x < 0)
{
@@ -3647,7 +3647,7 @@
if (!NILP (descrip))
{
- /* if alloca is fast, use that to make the space,
+ /* If alloca is fast, use that to make the space,
to reduce gc needs. */
item_data = (char *) alloca (maxwidth + SBYTES (descrip) + 1);
memcpy (item_data, SSDATA (item_name), SBYTES (item_name));
@@ -3694,7 +3694,7 @@
uly = dispheight - height;
}
- if (FRAME_HAS_MINIBUF_P (f) && uly+height > dispheight - 2)
+ if (FRAME_HAS_MINIBUF_P (f) && uly + height > dispheight - 2)
{
/* Move the menu away of the echo area, to avoid overwriting the
menu with help echo messages or vice versa. */
@@ -3723,8 +3723,8 @@
/* If position was not given by a mouse click, adjust so upper left
corner of the menu as a whole ends up at given coordinates. This
is what x-popup-menu says in its documentation. */
- x += width/2;
- y += 1.5*height/(maxlines+2);
+ x += width / 2;
+ y += 1.5 * height / (maxlines + 2);
}
#endif
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2014-03-09 11:36:51 +0000
+++ b/src/xdisp.c 2014-03-20 14:09:37 +0000
@@ -27253,7 +27253,7 @@
if (/* If window is in the process of being destroyed, don't bother
to do anything. */
w->current_matrix != NULL
- /* Don't update mouse highlight if hidden */
+ /* Don't update mouse highlight if hidden. */
&& (draw != DRAW_MOUSE_FACE || !hlinfo->mouse_face_hidden)
/* Recognize when we are called to operate on rows that don't exist
anymore. This can happen when a window is split. */
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2014-03-11 06:50:01 +0000
+++ b/src/xterm.c 2014-03-20 14:09:37 +0000
@@ -5667,7 +5667,7 @@
/* This is the filter function invoked by the GTK event loop.
It is invoked before the XEvent is translated to a GdkEvent,
- so we have a chance to act on the event before GTK. */
+ so we have a chance to act on the event before GTK. */
static GdkFilterReturn
event_handler_gdk (GdkXEvent *gxev, GdkEvent *ev, gpointer data)
{
@@ -5696,9 +5696,9 @@
if (! dpyinfo)
current_finish = X_EVENT_NORMAL;
else
- current_count +=
- handle_one_xevent (dpyinfo, xev, ¤t_finish,
- current_hold_quit);
+ current_count
+ += handle_one_xevent (dpyinfo, xev, ¤t_finish,
+ current_hold_quit);
}
else
current_finish = x_dispatch_event (xev, xev->xany.display);
@@ -6142,14 +6142,6 @@
if (f)
{
bool iconified = FRAME_ICONIFIED_P (f);
- /* wait_reading_process_output will notice this and update
- the frame's display structures.
- If we where iconified, we should not set garbaged,
- because that stops redrawing on Expose events. This looks
- bad if we are called from a recursive event loop
- (x_dispatch_event), for example when a dialog is up. */
- if (!iconified)
- SET_FRAME_GARBAGED (f);
/* Check if fullscreen was specified before we where mapped the
first time, i.e. from the command line. */
@@ -6700,7 +6692,7 @@
#ifdef USE_GTK
/* GTK creates windows but doesn't map them.
- Only get real positions when mapped. */
+ Only get real positions when mapped. */
if (FRAME_GTK_OUTER_WIDGET (f)
&& gtk_widget_get_mapped (FRAME_GTK_OUTER_WIDGET (f)))
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116809: * src/frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.,
Stefan Monnier <=