THINGS TO DO
------------
-** emacsclient -t on the console does not work after su:
+** emacsclient -t on the console does not work after su. You have to
+ use non-root accounts or start as root to see this.
+ Login: root
+ Password:
# su lorentey
$ emacsclient -t
*ERROR*: Could not open file: /dev/tty1
bring back the ugly pty proxy hack from the initial versions of
multi-tty. Suggestions would be appreciated.
+ Update: we could change emacsclient to pass its open file
+ descriptor to the Emacs process. Unfortunately, this requires a
+ new Lisp-level Emacs API, and as file descriptors are not otherwise
+ exported to Lisp, this approach seems at least as ugly as the pty
+ proxy idea.
+
** Understand how `quit_throw_to_read_char' works, and fix any bugs
that come to light.
(Done in patch-539.)
+-- The borders on tooltip frames on X are messed up. More
+ specifically, the frame's internal border (internal-border-width
+ frame parameter) is not filled with the correct background color.
+
+ It seems the border contents are drawn onto by the
+ update_single_window call in `x-show-tip'. After some debugging, I
+ think the window's background color is not set up
+ correctly---calling `x_clear_area' fills the specified area with
+ black, not light yellow.
+
+ (Done in patch-544. A background_pixel field was defined both in
+ struct frame and struct x_output, and Emacs got confused between
+ them.)
+
;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d
unsigned long fg, old_fg;
fg = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
- old_fg = x->foreground_pixel;
- x->foreground_pixel = fg;
+ old_fg = FRAME_FOREGROUND_PIXEL (f);
+ FRAME_FOREGROUND_PIXEL (f) = fg;
if (FRAME_X_WINDOW (f) != 0)
{
unsigned long bg;
bg = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f));
- unload_color (f, x->background_pixel);
- x->background_pixel = bg;
+ unload_color (f, FRAME_BACKGROUND_PIXEL (f));
+ FRAME_BACKGROUND_PIXEL (f) = bg;
if (FRAME_X_WINDOW (f) != 0)
{
Cursor cursor, nontext_cursor, mode_cursor, hand_cursor;
Cursor hourglass_cursor, horizontal_drag_cursor;
unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
- unsigned long mask_color = x->background_pixel;
+ unsigned long mask_color = FRAME_BACKGROUND_PIXEL (f);
/* Don't let pointers be invisible. */
if (mask_color == pixel)
{
x_free_colors (f, &pixel, 1);
- pixel = x_copy_color (f, x->foreground_pixel);
+ pixel = x_copy_color (f, FRAME_FOREGROUND_PIXEL (f));
}
unload_color (f, x->mouse_pixel);
fore_pixel_allocated_p = 1;
}
else
- fore_pixel = x->background_pixel;
+ fore_pixel = FRAME_BACKGROUND_PIXEL (f);
pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
pixel_allocated_p = 1;
/* Make sure that the cursor color differs from the background color. */
- if (pixel == x->background_pixel)
+ if (pixel == FRAME_BACKGROUND_PIXEL (f))
{
if (pixel_allocated_p)
{
x_free_colors (f, &fore_pixel, 1);
fore_pixel_allocated_p = 0;
}
- fore_pixel = x->background_pixel;
+ fore_pixel = FRAME_BACKGROUND_PIXEL (f);
}
}
/* Normal video */
gc_values.font = FRAME_FONT (f)->fid;
- gc_values.foreground = f->output_data.x->foreground_pixel;
- gc_values.background = f->output_data.x->background_pixel;
+ gc_values.foreground = FRAME_FOREGROUND_PIXEL (f);
+ gc_values.background = FRAME_BACKGROUND_PIXEL (f);
gc_values.line_width = 0; /* Means 1 using fast algorithm. */
f->output_data.x->normal_gc
= XCreateGC (FRAME_X_DISPLAY (f),
&gc_values);
/* Reverse video style. */
- gc_values.foreground = f->output_data.x->background_pixel;
- gc_values.background = f->output_data.x->foreground_pixel;
+ gc_values.foreground = FRAME_BACKGROUND_PIXEL (f);
+ gc_values.background = FRAME_FOREGROUND_PIXEL (f);
f->output_data.x->reverse_gc
= XCreateGC (FRAME_X_DISPLAY (f),
FRAME_X_WINDOW (f),
&gc_values);
/* Cursor has cursor-color background, background-color foreground. */
- gc_values.foreground = f->output_data.x->background_pixel;
+ gc_values.foreground = FRAME_BACKGROUND_PIXEL (f);
gc_values.background = f->output_data.x->cursor_pixel;
gc_values.fill_style = FillOpaqueStippled;
gc_values.stipple
= (XCreatePixmapFromBitmapData
(FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window,
gray_bits, gray_width, gray_height,
- f->output_data.x->foreground_pixel,
- f->output_data.x->background_pixel,
+ FRAME_FOREGROUND_PIXEL (f),
+ FRAME_BACKGROUND_PIXEL (f),
DefaultDepth (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f))));
UNBLOCK_INPUT;
/* Function x_decode_color can signal an error. Make
sure to initialize color slots so that we won't try
to free colors we haven't allocated. */
- f->output_data.x->foreground_pixel = -1;
- f->output_data.x->background_pixel = -1;
+ FRAME_FOREGROUND_PIXEL (f) = -1;
+ FRAME_BACKGROUND_PIXEL (f) = -1;
f->output_data.x->cursor_pixel = -1;
f->output_data.x->cursor_foreground_pixel = -1;
f->output_data.x->border_pixel = -1;
black = build_string ("black");
GCPRO1 (black);
- f->output_data.x->foreground_pixel
+ FRAME_FOREGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
- f->output_data.x->background_pixel
+ FRAME_BACKGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
f->output_data.x->cursor_pixel
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
/* Function x_decode_color can signal an error. Make
sure to initialize color slots so that we won't try
to free colors we haven't allocated. */
- f->output_data.x->foreground_pixel = -1;
- f->output_data.x->background_pixel = -1;
+ FRAME_FOREGROUND_PIXEL (f) = -1;
+ FRAME_BACKGROUND_PIXEL (f) = -1;
f->output_data.x->cursor_pixel = -1;
f->output_data.x->cursor_foreground_pixel = -1;
f->output_data.x->border_pixel = -1;
black = build_string ("black");
GCPRO1 (black);
- f->output_data.x->foreground_pixel
+ FRAME_FOREGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
- f->output_data.x->background_pixel
+ FRAME_BACKGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
f->output_data.x->cursor_pixel
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));