#define ATTR_CUR_AND (~(ATTR_BOLD|ATTR_REVERSE|ATTR_BLINK|ATTR_COLOURS))
#define ATTR_CUR_XOR 0x00BA0000UL
-GLOBAL int alt_pressed;
-
GLOBAL int session_closed;
GLOBAL int nsessions;
Terminal *term_init(void *frontend);
void term_size(Terminal *, int, int, int);
void term_out(Terminal *);
-void term_paint(Terminal *, Context, int, int, int, int);
+void term_paint(Terminal *, Context, int, int, int, int, int);
void term_scroll(Terminal *, int, int);
void term_pwron(Terminal *);
void term_clrsb(Terminal *);
* Paint the window in response to a WM_PAINT message.
*/
void term_paint(Terminal *term, Context ctx,
- int left, int top, int right, int bottom)
+ int left, int top, int right, int bottom, int immediately)
{
int i, j;
if (left < 0) left = 0;
* fails to actually do anything when re-sizing ... painting the wrong
* window perhaps ?
*/
- if (alt_pressed)
+ if (immediately)
do_paint (term, ctx, FALSE);
}
(p.rcPaint.left-offset_width)/font_width,
(p.rcPaint.top-offset_height)/font_height,
(p.rcPaint.right-offset_width-1)/font_width,
- (p.rcPaint.bottom-offset_height-1)/font_height);
+ (p.rcPaint.bottom-offset_height-1)/font_height,
+ is_alt_pressed());
if (p.fErase ||
p.rcPaint.left < offset_width ||
* 1) Keep the sizetip uptodate
* 2) Make sure the window size is _stepped_ in units of the font size.
*/
- if (cfg.resize_action != RESIZE_FONT && !alt_pressed) {
+ if (cfg.resize_action != RESIZE_FONT && !is_alt_pressed()) {
int width, height, w, h, ew, eh;
LPRECT r = (LPRECT) lParam;
* down the connection during an NT opaque drag.)
*/
if (resizing) {
- if (cfg.resize_action != RESIZE_FONT && !alt_pressed) {
+ if (cfg.resize_action != RESIZE_FONT && !is_alt_pressed()) {
need_backend_resize = TRUE;
w = (width-cfg.window_border*2) / font_width;
if (w < 1) w = 1;
}
default:
if (message == wm_mousewheel || message == WM_MOUSEWHEEL) {
- int shift_pressed=0, control_pressed=0, alt_pressed=0;
+ int shift_pressed=0, control_pressed=0;
if (message == WM_MOUSEWHEEL) {
wheel_accumulator += (short)HIWORD(wParam);
}
}
- alt_pressed = (left_alt && key_down);
-
scan = (HIWORD(lParam) & (KF_UP | KF_EXTENDED | 0xFF));
shift_state = ((keystate[VK_SHIFT] & 0x80) != 0)
+ ((keystate[VK_CONTROL] & 0x80) != 0) * 2;